mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Some cosmetic improvements in examples
This commit is contained in:
parent
3830a21093
commit
056026428f
3 changed files with 4 additions and 6 deletions
|
|
@ -131,6 +131,8 @@ if __name__ == '__main__':
|
|||
parser.add_argument('--generate', action='store_true')
|
||||
parser.add_argument('--run', action='store_true')
|
||||
args = parser.parse_args()
|
||||
if not args.generate and not args.run:
|
||||
parser.print_help()
|
||||
|
||||
if args.generate or args.run:
|
||||
model = assembly_model()
|
||||
|
|
|
|||
|
|
@ -10,9 +10,8 @@ class RingSource : public openmc::Source
|
|||
openmc::SourceSite sample(uint64_t* seed) const
|
||||
{
|
||||
openmc::SourceSite particle;
|
||||
// wgt
|
||||
// particle type
|
||||
particle.particle = openmc::ParticleType::neutron;
|
||||
particle.wgt = 1.0;
|
||||
// position
|
||||
double angle = 2.0 * M_PI * openmc::prn(seed);
|
||||
double radius = 3.0;
|
||||
|
|
@ -22,7 +21,6 @@ class RingSource : public openmc::Source
|
|||
// angle
|
||||
particle.u = {1.0, 0.0, 0.0};
|
||||
particle.E = 14.08e6;
|
||||
particle.delayed_group = 0;
|
||||
return particle;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,9 +34,8 @@ class RingSource : public openmc::Source {
|
|||
openmc::SourceSite sample(uint64_t* seed) const
|
||||
{
|
||||
openmc::SourceSite particle;
|
||||
// wgt
|
||||
// particle type
|
||||
particle.particle = openmc::ParticleType::neutron;
|
||||
particle.wgt = 1.0;
|
||||
// position
|
||||
double angle = 2.0 * M_PI * openmc::prn(seed);
|
||||
double radius = this->radius_;
|
||||
|
|
@ -46,7 +45,6 @@ class RingSource : public openmc::Source {
|
|||
// angle
|
||||
particle.u = {1.0, 0.0, 0.0};
|
||||
particle.E = this->energy_;
|
||||
particle.delayed_group = 0;
|
||||
|
||||
return particle;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue