mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Reorganizing some of the DAGMC-related code and using shared pointers instead.
This commit is contained in:
parent
4c4b7a8234
commit
be5318fdb0
6 changed files with 42 additions and 17 deletions
|
|
@ -75,6 +75,20 @@ public:
|
|||
unique_ptr<UniversePartitioner> partitioner_;
|
||||
};
|
||||
|
||||
#ifdef DAGMC
|
||||
|
||||
class DAGUniverse : public Universe {
|
||||
|
||||
public:
|
||||
explicit DAGUniverse(std::string filename);
|
||||
|
||||
|
||||
// Data Members
|
||||
std::shared_ptr<moab::DagMC> dag_instance_; //! DAGMC Instance for this universe
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
//==============================================================================
|
||||
|
||||
|
|
@ -271,7 +285,7 @@ public:
|
|||
|
||||
void to_hdf5(hid_t group_id) const;
|
||||
|
||||
moab::DagMC* dagmc_ptr_; //!< Pointer to DagMC instance
|
||||
std::shared_ptr<moab::DagMC> dagmc_ptr_; //!< Pointer to DagMC instance
|
||||
int32_t dag_index_; //!< DagMC index of cell
|
||||
};
|
||||
#endif
|
||||
|
|
@ -343,6 +357,7 @@ struct CellInstanceHash {
|
|||
void read_cells(pugi::xml_node node);
|
||||
|
||||
#ifdef DAGMC
|
||||
void read_dagmc_universes(pugi::xml_node node);
|
||||
int32_t next_cell(DAGCell* cur_cell, DAGSurface* surf_xed);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ extern "C" const bool DAGMC_ENABLED;
|
|||
namespace openmc {
|
||||
|
||||
namespace model {
|
||||
extern moab::DagMC* DAG;
|
||||
extern std::shared_ptr<moab::DagMC> DAG;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -23,7 +23,7 @@ namespace model {
|
|||
//==============================================================================
|
||||
|
||||
void load_dagmc_geometry();
|
||||
void free_memory_dagmc();
|
||||
void create_dagmc_universe(const std::string& filename);
|
||||
void read_geometry_dagmc();
|
||||
bool read_uwuw_materials(pugi::xml_document& doc);
|
||||
bool get_uwuw_materials_xml(std::string& s);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public:
|
|||
|
||||
void to_hdf5(hid_t group_id) const;
|
||||
|
||||
moab::DagMC* dagmc_ptr_; //!< Pointer to DagMC instance
|
||||
std::shared_ptr<moab::DagMC> dagmc_ptr_; //!< Pointer to DagMC instance
|
||||
int32_t dag_index_; //!< DagMC index of surface
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue