mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Generalizing slice operation. Using templates to specialize data returned.
This commit is contained in:
parent
6720375e72
commit
1d78df26eb
2 changed files with 117 additions and 66 deletions
|
|
@ -53,6 +53,7 @@ struct RGBColor {
|
|||
|
||||
typedef xt::xtensor<RGBColor, 2> ImageData;
|
||||
typedef xt::xtensor<int32_t, 3> IdData;
|
||||
typedef xt::xtensor<double, 3> PropertyData;
|
||||
|
||||
enum class PlotType {
|
||||
slice = 1,
|
||||
|
|
@ -73,8 +74,17 @@ enum class PlotColorBy {
|
|||
//===============================================================================
|
||||
// Plot class
|
||||
//===============================================================================
|
||||
struct PlotBase {
|
||||
class PlotBase {
|
||||
public:
|
||||
IdData get_id_map() const;
|
||||
PropertyData get_property_map() const;
|
||||
|
||||
private:
|
||||
template<class D, typename setter>
|
||||
D generate_data() const;
|
||||
|
||||
// Members
|
||||
public:
|
||||
Position origin_; //!< Plot origin in geometry
|
||||
Position width_; //!< Plot width in geometry
|
||||
PlotBasis basis_; //!< Plot basis (XY/XZ/YZ)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue