-
Notifications
You must be signed in to change notification settings - Fork 25
Adding mixture of initial sources #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding mixture of initial sources #150
Conversation
Update rng in PPs after source generation
| !! Sample particle Energy/Group and angle Angle | ||
| !! Sample particle Energy/Group and angle | ||
| !! | ||
| !! Sets diraction of a particle together with its energy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| !! Sets diraction of a particle together with its energy. | |
| !! Sets direction of a particle together with its energy. |
| !! See source_inter for details | ||
| !! | ||
| !! Errors: | ||
| !! - when the number of weigths doesn't correspond to the number of sources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| !! - when the number of weigths doesn't correspond to the number of sources | |
| !! - when the number of weights doesn't correspond to the number of sources |
SharedModules/genericProcedures.f90
Outdated
| w = dir(3) | ||
|
|
||
| ! Perform standard roatation. Note that indexes are parametrised | ||
| ! Perform standard rotation. Note that indexes are parametrised |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ! Perform standard rotation. Note that indexes are parametrised | |
| ! Perform standard rotation. Note that indexes are parameterised |
Tallies/tallyAdmin_class.f90
Outdated
|
|
||
| end do | ||
|
|
||
| ! Register all clerks to recive their reports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ! Register all clerks to recive their reports | |
| ! Register all clerks to receive their reports |
Tallies/tallyAdmin_class.f90
Outdated
|
|
||
| end do | ||
|
|
||
| ! Verify that final memLoc and memSize are consistant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ! Verify that final memLoc and memSize are consistant | |
| ! Verify that final memLoc and memSize are consistent |
| !! | ||
| !! Result: | ||
| !! Null is source is not of ceNuclearDatabase class | ||
| !! Null if source is not of ceNuclearDatabase class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| !! Null if source is not of ceNuclearDatabase class | |
| !! Null if source is not of ceNeutronDatabase class |
| !! Result: | ||
| !! Null is source is not of ceNuclearDatabase class | ||
| !! Null if source is not of ceNuclearDatabase class | ||
| !! Target points to source if source is ceNuclearDatabase class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| !! Target points to source if source is ceNuclearDatabase class | |
| !! Target points to source if source is ceNeutronDatabase class |
| !! Sample particle Energy/Group and angle Angle | ||
| !! Sample particle Energy/Group and angle | ||
| !! | ||
| !! Sets diraction of a particle together with its energy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| !! Sets diraction of a particle together with its energy. | |
| !! Sets direction of a particle together with its energy. |
| use particle_class, only : particleState | ||
|
|
||
| ! Source | ||
| use source_inter, only : source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| use source_inter, only : source | |
| use source_inter, only : source |
| character(100), parameter :: Here = 'init (mixSource_class.f90)' | ||
|
|
||
| ! Get number of sources | ||
| N = size(self % sources) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit bewildering. Might be good to highlight that sources has already been initialised elsewhere due to trying to avoid circular dependencies.
| if (size(weights) /= N) then | ||
| call fatalError(Here, 'The number of sources and weights is not the same') | ||
| end if | ||
| if (any(weights == ZERO)) call fatalError(Here, 'Some of the weights are zero') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we also want to ensure weights are positive?
| if (any(weights == ZERO)) call fatalError(Here, 'Some of the weights are zero') | |
| if (any(weights <= ZERO)) call fatalError(Here, 'Some of the weights are not positive') |
ChasingNeutrons
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few small things.
Update rng in PPs after source generation
I've added a source which is a combination of sources, each assigned a weight (or probability). The mixSource samples which source is actually used from the weights. the sources inside mixSource have to be built inside the Factory, which is a bit unusual; however it's necessary to avoid circular dependencies.
This PR also advances the RNG in both fixedSource and eigen PP after source generation, as this was not done before and resulting in a considerable bias in fixed source mode D: