Skip to content

Commit 061156e

Browse files
committed
address PR comments
1 parent f0e1110 commit 061156e

35 files changed

Lines changed: 110 additions & 114 deletions

‎include/openmc/bank.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ namespace openmc {
1616

1717
namespace simulation {
1818

19-
extern vector<ParticleBank> source_bank;
19+
extern vector<SourceSite> source_bank;
2020

21-
extern SharedArray<ParticleBank> surf_source_bank;
21+
extern SharedArray<SourceSite> surf_source_bank;
2222

23-
extern SharedArray<ParticleBank> fission_bank;
23+
extern SharedArray<SourceSite> fission_bank;
2424

2525
extern vector<int64_t> progeny_per_particle;
2626

‎include/openmc/cell.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ class UniversePartitioner
303303
//! `partitions_.back()` gives the cells that lie on the positive side of
304304
//! `surfs_.back()`. Otherwise, `partitions_[i]` gives cells sandwiched
305305
//! between `surfs_[i-1]` and `surfs_[i]`.
306-
vector<std::vector<int32_t>> partitions_;
306+
vector<vector<int32_t>> partitions_;
307307
};
308308

309309

‎include/openmc/constants.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
namespace openmc {
1515

16-
using double_2dvec = vector<std::vector<double>>;
17-
using double_3dvec = vector<std::vector<std::vector<double>>>;
18-
using double_4dvec = vector<std::vector<std::vector<std::vector<double>>>>;
16+
using double_2dvec = vector<vector<double>>;
17+
using double_3dvec = vector<vector<vector<double>>>;
18+
using double_4dvec = vector<vector<vector<vector<double>>>>;
1919

2020
// ============================================================================
2121
// VERSIONING NUMBERS

‎include/openmc/cross_sections.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ void read_cross_sections_xml();
6565
//
6666
//! \param[in] nuc_temps Temperatures for each nuclide in [K]
6767
//! \param[in] thermal_temps Temperatures for each thermal scattering table in [K]
68-
void read_ce_cross_sections(const vector<std::vector<double>>& nuc_temps,
69-
const vector<std::vector<double>>& thermal_temps);
68+
void read_ce_cross_sections(const vector<vector<double>>& nuc_temps,
69+
const vector<vector<double>>& thermal_temps);
7070

7171
//! Read cross_sections.xml and populate data libraries
7272
void read_ce_cross_sections_xml();

‎include/openmc/geometry_aux.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ void assign_temperatures();
4242
//! table
4343
//==============================================================================
4444

45-
void get_temperatures(vector<std::vector<double>>& nuc_temps,
46-
vector<std::vector<double>>& thermal_temps);
45+
void get_temperatures(
46+
vector<vector<double>>& nuc_temps, vector<vector<double>>& thermal_temps);
4747

4848
//==============================================================================
4949
//! \brief Perform final setup for geometry

‎include/openmc/material.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ double sternheimer_adjustment(const vector<double>& f,
197197
double log_I, double tol, int max_iter);
198198

199199
//! Calculate density effect correction
200-
double density_effect(const vector<double>& f,
201-
const std::vector<double>& e_b_sq, double e_p_sq, double n_conduction,
202-
double rho, double E, double tol, int max_iter);
200+
double density_effect(const vector<double>& f, const vector<double>& e_b_sq,
201+
double e_p_sq, double n_conduction, double rho, double E, double tol,
202+
int max_iter);
203203

204204
//! Read material data from materials.xml
205205
void read_materials_xml();

‎include/openmc/mesh.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Mesh
122122
//! of the plot's axes. For example an xy-slice plot will get back a vector
123123
//! of x-coordinates and another of y-coordinates. These vectors may be
124124
//! empty for low-dimensional meshes.
125-
virtual std::pair<vector<double>, std::vector<double>> plot(
125+
virtual std::pair<vector<double>, vector<double>> plot(
126126
Position plot_ll, Position plot_ur) const = 0;
127127

128128
//! Return a string representation of the mesh bin
@@ -159,7 +159,7 @@ class StructuredMesh : public Mesh {
159159
//! \param[in] Number of bank sites
160160
//! \param[out] Whether any bank sites are outside the mesh
161161
xt::xtensor<double, 1> count_sites(
162-
const ParticleBank* bank, int64_t length, bool* outside) const;
162+
const SourceSite* bank, int64_t length, bool* outside) const;
163163

164164
//! Get bin given mesh indices
165165
//
@@ -244,7 +244,7 @@ class RegularMesh : public StructuredMesh
244244

245245
double negative_grid_boundary(int* ijk, int i) const override;
246246

247-
std::pair<vector<double>, std::vector<double>> plot(
247+
std::pair<vector<double>, vector<double>> plot(
248248
Position plot_ll, Position plot_ur) const override;
249249

250250
void to_hdf5(hid_t group) const override;
@@ -257,7 +257,7 @@ class RegularMesh : public StructuredMesh
257257
//! \param[out] Whether any bank sites are outside the mesh
258258
//! \return Array indicating number of sites in each mesh/energy bin
259259
xt::xtensor<double, 1> count_sites(
260-
const ParticleBank* bank, int64_t length, bool* outside) const;
260+
const SourceSite* bank, int64_t length, bool* outside) const;
261261

262262
// Data members
263263
double volume_frac_; //!< Volume fraction of each mesh element
@@ -285,12 +285,12 @@ class RectilinearMesh : public StructuredMesh
285285

286286
double negative_grid_boundary(int* ijk, int i) const override;
287287

288-
std::pair<vector<double>, std::vector<double>> plot(
288+
std::pair<vector<double>, vector<double>> plot(
289289
Position plot_ll, Position plot_ur) const override;
290290

291291
void to_hdf5(hid_t group) const override;
292292

293-
vector<std::vector<double>> grid_;
293+
vector<vector<double>> grid_;
294294

295295
int set_grid();
296296
};
@@ -382,7 +382,7 @@ class MOABMesh : public UnstructuredMesh {
382382

383383
int n_surface_bins() const override;
384384

385-
std::pair<vector<double>, std::vector<double>> plot(
385+
std::pair<vector<double>, vector<double>> plot(
386386
Position plot_ll, Position plot_ur) const override;
387387

388388
std::string library() const override;
@@ -534,7 +534,7 @@ class LibMesh : public UnstructuredMesh {
534534

535535
int n_surface_bins() const override;
536536

537-
std::pair<vector<double>, std::vector<double>> plot(
537+
std::pair<vector<double>, vector<double>> plot(
538538
Position plot_ll, Position plot_ur) const override;
539539

540540
void add_score(const std::string& var_name) override;

‎include/openmc/mgxs.h‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Mgxs {
6464
void init(const std::string& in_name, double in_awr,
6565
const vector<double>& in_kTs, bool in_fissionable,
6666
AngleDistributionType in_scatter_format, bool in_is_isotropic,
67-
const vector<double>& in_polar, const std::vector<double>& in_azimuthal);
67+
const vector<double>& in_polar, const vector<double>& in_azimuthal);
6868

6969
//! \brief Initializes the Mgxs object metadata from the HDF5 file
7070
//!
@@ -84,9 +84,8 @@ class Mgxs {
8484
//! @param micro_ts The temperature index of the microscopic objects that
8585
//! corresponds to the temperature of interest.
8686
//! @param this_t The temperature index of the macroscopic object.
87-
void combine(const vector<Mgxs*>& micros,
88-
const std::vector<double>& scalars, const vector<int>& micro_ts,
89-
int this_t);
87+
void combine(const vector<Mgxs*>& micros, const vector<double>& scalars,
88+
const vector<int>& micro_ts, int this_t);
9089

9190
//! \brief Checks to see if this and that are able to be combined
9291
//!
@@ -124,7 +123,7 @@ class Mgxs {
124123
//! @param num_group number of energy groups
125124
//! @param num_delay number of delayed groups
126125
Mgxs(const std::string& in_name, const vector<double>& mat_kTs,
127-
const vector<Mgxs*>& micros, const std::vector<double>& atom_densities,
126+
const vector<Mgxs*>& micros, const vector<double>& atom_densities,
128127
int num_group, int num_delay);
129128

130129
//! \brief Provides a cross section value given certain parameters

‎include/openmc/mgxs_interface.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ class MgxsInterface {
2323
// of XS to read and the corresponding temperatures for each XS
2424
MgxsInterface(const std::string& path_cross_sections,
2525
const vector<std::string> xs_to_read,
26-
const vector<std::vector<double>> xs_temps);
26+
const vector<vector<double>> xs_temps);
2727

2828
// Does things to construct after the nuclides and temperatures to
2929
// read have been specified.
3030
void init();
3131

3232
// Set which nuclides and temperatures are to be read
3333
void set_nuclides_and_temperatures(
34-
vector<std::string> xs_to_read, vector<std::vector<double>> xs_temps);
34+
vector<std::string> xs_to_read, vector<vector<double>> xs_temps);
3535

3636
// Add an Mgxs object to be managed
3737
void add_mgxs(
@@ -45,20 +45,20 @@ class MgxsInterface {
4545
void create_macro_xs();
4646

4747
// Get the kT values which are used in the OpenMC model
48-
vector<std::vector<double>> get_mat_kTs();
48+
vector<vector<double>> get_mat_kTs();
4949

5050
int num_energy_groups_;
5151
int num_delayed_groups_;
5252
vector<std::string> xs_names_; // available names in HDF5 file
5353
vector<std::string> xs_to_read_; // XS which appear in materials
54-
vector<std::vector<double>> xs_temps_to_read_; // temperatures used
54+
vector<vector<double>> xs_temps_to_read_; // temperatures used
5555
std::string cross_sections_path_; // path to MGXS h5 file
5656
vector<Mgxs> nuclides_;
5757
vector<Mgxs> macro_xs_;
5858
vector<double> energy_bins_;
5959
vector<double> energy_bin_avg_;
6060
vector<double> rev_energy_bins_;
61-
vector<std::vector<double>> nuc_temps_; // all available temperatures
61+
vector<vector<double>> nuc_temps_; // all available temperatures
6262
};
6363

6464
namespace data {

‎include/openmc/particle.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Particle : public ParticleData {
5151
//! site may have been produced from an external source, from fission, or
5252
//! simply as a secondary particle.
5353
//! \param src Source site data
54-
void from_source(const ParticleBank* src);
54+
void from_source(const SourceSite* src);
5555

5656
// Coarse-grained particle events
5757
void event_calculate_xs();

0 commit comments

Comments
 (0)