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
Reshape scatter mats #141
Merged
drewejohnson
merged 9 commits into
CORE-GATECH-GROUP:develop
from
drewejohnson:reshape-scatter-mats
May 15, 2018
Merged
Reshape scatter mats #141
drewejohnson
merged 9 commits into
CORE-GATECH-GROUP:develop
from
drewejohnson:reshape-scatter-mats
May 15, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HomogUniv containers now reshape incoming scattering matrices depending upon the value of settings xs.reshapeScatter. Number of groups is inferred from the first value added to the object, and all incoming values are compared against this group structure. If the number of groups for the incoming value does not match the current group structure, a warning messages is raised, but the value is still stored.
If no values are presented in a line, such as INF_REM 0 then the branching reader will not attempt to store this variable. A debug messages is printed
Upcoming and in-progress changes to containers.py work only if the values passed to our container objects are arrays, as the shape property is used to determine/compare group structure
The HomogUniv container will now attempt to convert non-numpy array values to arrays. This is done because the method for determining number of groups relies upon the shape command. Fewer warnings are printed now for variables having different group structures. If an array comes in that should be converted to a matrix, it's shape will be different than the current group structure would indicate.
DanKotlyar
approved these changes
May 15, 2018
1 task
drewejohnson
added a commit
that referenced
this pull request
May 16, 2018
…ats (#146) Metadata dictionary for HomogUniv objects is no more. Instead, the following changes have been made to the underlying structure: 1. Micro and macro group structure, and number of groups, are stored directly on the object, not in metadata dictionaries 1. Non `INF` nor `B1` quantities, such as `CMM_*` or `IMP_KEFF` are stored in two new sub-dictionaries: `gc` and `gcUnc` for group constants and their associated relative uncertainties HomogUniv now cleans incoming data from `addData` by 1. Converting all incoming data to numpy arrays 1. Returning floats for criticality related values, anything that matches `K[EI][FN]F` 1. Reshaping scattering matrices via #141 Unit tests were updated accordingly. Also update the Branching notebook with links and the more recent changes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #139 with a new setting
xs.reshapeScatter
that, ifTrue
, reshapes scattering matriceson
HomogUniv
objects. This is done solely by the container, so that Readers need not worry about reshaping before callingHomogUniv.addData
.Modified the
test_containers.py
to compare reshaped and not reshaped scattering matrices.Variables to be reshaped are determined by
serpentTools.objects.containers.SCATTER_MATS
setTo do