mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Turn Particle.coord_ into a std::vector (remove MAX_COORD)
This commit is contained in:
parent
d70cfda07c
commit
86d187a0a7
8 changed files with 15 additions and 25 deletions
|
|
@ -15,7 +15,8 @@ namespace openmc {
|
|||
|
||||
namespace model {
|
||||
|
||||
extern "C" int root_universe;
|
||||
extern int root_universe; //!< Index of root universe
|
||||
extern int n_coord_levels; //!< Number of CSG coordinate levels
|
||||
|
||||
extern std::vector<int64_t> overlap_check_count;
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void finalize_geometry(std::vector<std::vector<double>>& nuc_temps,
|
|||
//! \return The index of the root universe.
|
||||
//==============================================================================
|
||||
|
||||
extern "C" int32_t find_root_universe();
|
||||
int32_t find_root_universe();
|
||||
|
||||
//==============================================================================
|
||||
//! Populate all data structures needed for distribcells.
|
||||
|
|
@ -74,7 +74,7 @@ void prepare_distribcell();
|
|||
//! the root universe).
|
||||
//==============================================================================
|
||||
|
||||
extern "C" void count_cell_instances(int32_t univ_indx);
|
||||
void count_cell_instances(int32_t univ_indx);
|
||||
|
||||
//==============================================================================
|
||||
//! Recursively search through universes and count universe instances.
|
||||
|
|
@ -84,8 +84,7 @@ extern "C" void count_cell_instances(int32_t univ_indx);
|
|||
//! search_univ.
|
||||
//==============================================================================
|
||||
|
||||
extern "C" int
|
||||
count_universe_instances(int32_t search_univ, int32_t target_univ_id);
|
||||
int count_universe_instances(int32_t search_univ, int32_t target_univ_id);
|
||||
|
||||
//==============================================================================
|
||||
//! Build a character array representing the path to a distribcell instance.
|
||||
|
|
@ -107,7 +106,7 @@ distribcell_path(int32_t target_cell, int32_t map, int32_t target_offset);
|
|||
//! \return The number of coordinate levels.
|
||||
//==============================================================================
|
||||
|
||||
extern "C" int maximum_levels(int32_t univ);
|
||||
int maximum_levels(int32_t univ);
|
||||
|
||||
//==============================================================================
|
||||
//! Deallocates global vectors and maps for cells, universes, and lattices.
|
||||
|
|
|
|||
|
|
@ -229,11 +229,11 @@ public:
|
|||
|
||||
int n_coord_ {1}; //!< number of current coordinate levels
|
||||
int cell_instance_; //!< offset for distributed properties
|
||||
LocalCoord coord_[MAX_COORD]; //!< coordinates for all levels
|
||||
std::vector<LocalCoord> coord_; //!< coordinates for all levels
|
||||
|
||||
// Particle coordinates before crossing a surface
|
||||
int n_coord_last_ {1}; //!< number of current coordinates
|
||||
int cell_last_[MAX_COORD]; //!< coordinates for all levels
|
||||
std::vector<int> cell_last_; //!< coordinates for all levels
|
||||
|
||||
// Energy data
|
||||
double E_; //!< post-collision energy in eV
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue