mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Merge branch 'mcpl_output_dev' of github.com:ebknudsen/openmc into mcpl_output_dev
This commit is contained in:
commit
4623cb4c9c
1 changed files with 7 additions and 4 deletions
|
|
@ -343,11 +343,13 @@ FileSource::FileSource(mcpl_file_t mcpl_file)
|
|||
const mcpl_particle_t *mcpl_particle;
|
||||
//extract particle from mcpl-file
|
||||
mcpl_particle=mcpl_read(mcpl_file);
|
||||
// check if it is a neutron or a photon. otherwise skip
|
||||
while ( mcpl_particle->pdgcode!=2112 && mcpl_particle->pdgcode!=22 ) {
|
||||
// check if it is a neutron, photon, electron, or positron. Otherwise skip.
|
||||
int pdg=mcpl_particle->pdgcode;
|
||||
while ( pdg!=2112 && pdg!=22 && pdg!=11 && pdg!=-11) {
|
||||
mcpl_particle=mcpl_read(mcpl_file);
|
||||
//should check for file exhaustion This could happen if particles are other than
|
||||
//neutrons or photons
|
||||
pdg=mcpl_particle->pdgcode;
|
||||
//should check for file exhaustion. This could happen if particles are other than
|
||||
//neutrons, photons, electrons, or positrons.
|
||||
}
|
||||
|
||||
switch(pdg){
|
||||
|
|
@ -445,6 +447,7 @@ CustomSourceWrapper::~CustomSourceWrapper()
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// Non-member functions
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue