8
8
#include < vector>
9
9
#include < map>
10
10
#include < iostream>
11
+ #include < cstdint>
11
12
12
13
struct GeometryParameters
13
14
{
14
- enum Shape{UNDEFINED, BRICK, SPHERE};
15
+ enum Shape
16
+ {
17
+ UNDEFINED,
18
+ BRICK,
19
+ SPHERE
20
+ };
15
21
16
22
GeometryParameters ()
17
- : materialName(),
18
- shape (UNDEFINED),
19
- radius(0.0 ),
20
- xCenter(0.0 ),
21
- yCenter(0.0 ),
22
- zCenter(0.0 ),
23
- xMin(0.0 ),
24
- yMin(0.0 ),
25
- zMin(0.0 ),
26
- xMax(0.0 ),
27
- yMax(0.0 ),
28
- zMax(0.0 )
29
- {};
23
+ : materialName(),
24
+ shape (UNDEFINED),
25
+ radius(0.0 ),
26
+ xCenter(0.0 ),
27
+ yCenter(0.0 ),
28
+ zCenter(0.0 ),
29
+ xMin(0.0 ),
30
+ yMin(0.0 ),
31
+ zMin(0.0 ),
32
+ xMax(0.0 ),
33
+ yMax(0.0 ),
34
+ zMax(0.0 ){};
30
35
31
36
std::string materialName;
32
37
Shape shape;
@@ -45,19 +50,18 @@ struct GeometryParameters
45
50
struct MaterialParameters
46
51
{
47
52
MaterialParameters ()
48
- : name(),
49
- mass (1000.0 ),
50
- totalCrossSection(1.0 ),
51
- nIsotopes(10 ),
52
- nReactions(9 ),
53
- sourceRate(0.0 ),
54
- scatteringCrossSection(),
55
- absorptionCrossSection(),
56
- fissionCrossSection(),
57
- scatteringCrossSectionRatio(1.0 ),
58
- absorptionCrossSectionRatio(1.0 ),
59
- fissionCrossSectionRatio(1.0 )
60
- {};
53
+ : name(),
54
+ mass (1000.0 ),
55
+ totalCrossSection(1.0 ),
56
+ nIsotopes(10 ),
57
+ nReactions(9 ),
58
+ sourceRate(0.0 ),
59
+ scatteringCrossSection(),
60
+ absorptionCrossSection(),
61
+ fissionCrossSection(),
62
+ scatteringCrossSectionRatio(1.0 ),
63
+ absorptionCrossSectionRatio(1.0 ),
64
+ fissionCrossSectionRatio(1.0 ){};
61
65
62
66
std::string name;
63
67
double mass;
@@ -76,14 +80,13 @@ struct MaterialParameters
76
80
struct CrossSectionParameters
77
81
{
78
82
CrossSectionParameters ()
79
- : name(),
80
- aa (0.0 ),
81
- bb(0.0 ),
82
- cc(0.0 ),
83
- dd(0.0 ),
84
- ee(1.0 ),
85
- nuBar(2.4 )
86
- {};
83
+ : name(),
84
+ aa (0.0 ),
85
+ bb(0.0 ),
86
+ cc(0.0 ),
87
+ dd(0.0 ),
88
+ ee(1.0 ),
89
+ nuBar(2.4 ){};
87
90
88
91
std::string name;
89
92
double aa;
@@ -97,89 +100,88 @@ struct CrossSectionParameters
97
100
struct SimulationParameters
98
101
{
99
102
SimulationParameters ()
100
- : inputFile(),
101
- crossSectionsOut (" " ),
102
- boundaryCondition(" reflect" ),
103
- energySpectrum(" " ),
104
- loadBalance(0 ),
105
- cycleTimers(0 ),
106
- debugThreads(0 ),
107
- nParticles(1000000 ), // 10^6
108
- batchSize(0 ), // default to use nBatches
109
- nBatches(10 ),
110
- nSteps(10 ),
111
- nx(10 ), // speed up early testing
112
- ny(10 ),
113
- nz(10 ),
114
- // nx(100),
115
- // ny(100),
116
- // nz(100),
117
- seed(1029384756 ),
118
- xDom(0 ),
119
- yDom(0 ),
120
- zDom(0 ),
121
- dt(1e-8 ),
122
- fMax(0.1 ),
123
- lx(100.0 ),
124
- ly(100.0 ),
125
- lz(100.0 ),
126
- eMin(1e-9 ),
127
- eMax(20 ),
128
- nGroups(230 ),
129
- lowWeightCutoff(0.001 ),
130
- balanceTallyReplications(1 ),
131
- fluxTallyReplications(1 ),
132
- cellTallyReplications(1 ),
133
- coralBenchmark(0 )
134
- {};
103
+ : inputFile(),
104
+ crossSectionsOut (" " ),
105
+ boundaryCondition(" reflect" ),
106
+ energySpectrum(" " ),
107
+ loadBalance(0 ),
108
+ cycleTimers(0 ),
109
+ debugThreads(0 ),
110
+ nParticles(1000000 ), // 10^6
111
+ batchSize(0 ), // default to use nBatches
112
+ nBatches(10 ),
113
+ nSteps(10 ),
114
+ nx(10 ), // speed up early testing
115
+ ny(10 ),
116
+ nz(10 ),
117
+ // nx(100),
118
+ // ny(100),
119
+ // nz(100),
120
+ seed(1029384756 ),
121
+ xDom(0 ),
122
+ yDom(0 ),
123
+ zDom(0 ),
124
+ dt(1e-8 ),
125
+ fMax(0.1 ),
126
+ lx(100.0 ),
127
+ ly(100.0 ),
128
+ lz(100.0 ),
129
+ eMin(1e-9 ),
130
+ eMax(20 ),
131
+ nGroups(230 ),
132
+ lowWeightCutoff(0.001 ),
133
+ balanceTallyReplications(1 ),
134
+ fluxTallyReplications(1 ),
135
+ cellTallyReplications(1 ),
136
+ coralBenchmark(0 ){};
135
137
136
- std::string inputFile; // !< name of input file
137
- std::string energySpectrum; // !< enble computing and printing energy spectrum via of energy spectrum file
138
- std::string crossSectionsOut; // !< enable or disable printing cross section data to a file
139
- std::string boundaryCondition;// !< specifies boundary conditions
140
- int loadBalance; // !< enable or disable load balancing
141
- int cycleTimers; // !< enable or disable cycle timers
142
- int debugThreads; // !< enable or disable thread debugging lines
143
- uint64_t nParticles; // !< number of particles
144
- uint64_t batchSize; // !< number of particles in a batch
145
- uint64_t nBatches; // !< number of batches to start
146
- int nSteps; // !< number of time steps
147
- int nx; // !< number of mesh elements in x-direction
148
- int ny; // !< number of mesh elements in y-direction
149
- int nz; // !< number of mesh elements in z-direction
150
- int seed; // !< random number seed
151
- int xDom; // !< number of MPI ranks in x-direction
152
- int yDom; // !< number of MPI ranks in y-direction
153
- int zDom; // !< number of MPI ranks in z-direction
154
- double dt; // !< time step (seconds)
155
- double fMax ; // !< max random fractional displacement of mesh
156
- double lx; // !< size of problem domain in x-direction (cm)
157
- double ly; // !< size of problem domain in y-direction (cm)
158
- double lz; // !< size of problem domain in z-direction (cm)
159
- double eMin; // !< min energy of cross section
160
- double eMax; // !< max energy of cross section
161
- int nGroups; // !< number of groups for cross sections
162
- double lowWeightCutoff; // !< low weight roulette cutoff
163
- int balanceTallyReplications; // !< Number of replications for the balance tallies
164
- int fluxTallyReplications; // !< Number of replications for the scalar flux tally
165
- int cellTallyReplications; // !< Number of replications for the scalar cell tally
166
- int coralBenchmark; // !< enable correctness check for Coral2 benchmark
138
+ std::string inputFile; // !< name of input file
139
+ std::string energySpectrum; // !< enble computing and printing energy spectrum via of energy spectrum file
140
+ std::string crossSectionsOut; // !< enable or disable printing cross section data to a file
141
+ std::string boundaryCondition; // !< specifies boundary conditions
142
+ int loadBalance; // !< enable or disable load balancing
143
+ int cycleTimers; // !< enable or disable cycle timers
144
+ int debugThreads; // !< enable or disable thread debugging lines
145
+ uint64_t nParticles; // !< number of particles
146
+ uint64_t batchSize; // !< number of particles in a batch
147
+ uint64_t nBatches; // !< number of batches to start
148
+ int nSteps; // !< number of time steps
149
+ int nx; // !< number of mesh elements in x-direction
150
+ int ny; // !< number of mesh elements in y-direction
151
+ int nz; // !< number of mesh elements in z-direction
152
+ int seed; // !< random number seed
153
+ int xDom; // !< number of MPI ranks in x-direction
154
+ int yDom; // !< number of MPI ranks in y-direction
155
+ int zDom; // !< number of MPI ranks in z-direction
156
+ double dt; // !< time step (seconds)
157
+ double fMax ; // !< max random fractional displacement of mesh
158
+ double lx; // !< size of problem domain in x-direction (cm)
159
+ double ly; // !< size of problem domain in y-direction (cm)
160
+ double lz; // !< size of problem domain in z-direction (cm)
161
+ double eMin; // !< min energy of cross section
162
+ double eMax; // !< max energy of cross section
163
+ int nGroups; // !< number of groups for cross sections
164
+ double lowWeightCutoff; // !< low weight roulette cutoff
165
+ int balanceTallyReplications; // !< Number of replications for the balance tallies
166
+ int fluxTallyReplications; // !< Number of replications for the scalar flux tally
167
+ int cellTallyReplications; // !< Number of replications for the scalar cell tally
168
+ int coralBenchmark; // !< enable correctness check for Coral2 benchmark
167
169
};
168
170
169
171
struct Parameters
170
172
{
171
- SimulationParameters simulationParams;
172
- std::vector<GeometryParameters> geometryParams;
173
- std::map<std::string, MaterialParameters> materialParams;
173
+ SimulationParameters simulationParams;
174
+ std::vector<GeometryParameters> geometryParams;
175
+ std::map<std::string, MaterialParameters> materialParams;
174
176
std::map<std::string, CrossSectionParameters> crossSectionParams;
175
177
};
176
178
177
- Parameters getParameters (int argc, char ** argv);
178
- void printParameters (const Parameters& params, std::ostream& out);
179
+ Parameters getParameters (int argc, char ** argv);
180
+ void printParameters (const Parameters & params, std::ostream & out);
179
181
180
- std::ostream& operator <<(std::ostream& out, const SimulationParameters& pp);
181
- std::ostream& operator <<(std::ostream& out, const GeometryParameters& pp);
182
- std::ostream& operator <<(std::ostream& out, const MaterialParameters& pp);
183
- std::ostream& operator <<(std::ostream& out, const CrossSectionParameters& pp);
182
+ std::ostream & operator <<(std::ostream & out, const SimulationParameters & pp);
183
+ std::ostream & operator <<(std::ostream & out, const GeometryParameters & pp);
184
+ std::ostream & operator <<(std::ostream & out, const MaterialParameters & pp);
185
+ std::ostream & operator <<(std::ostream & out, const CrossSectionParameters & pp);
184
186
185
187
#endif
0 commit comments