Skip to content
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

Conversation

drewejohnson
Copy link
Collaborator

@drewejohnson drewejohnson commented May 14, 2018

Closes #139 with a new setting xs.reshapeScatter that, if True, reshapes scattering matrices
on HomogUniv objects. This is done solely by the container, so that Readers need not worry about reshaping before calling HomogUniv.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 set

To do

  • Update changelog to include this change
  • Rebuild default settings doc file

andrewjohnson added 7 commits May 14, 2018 14:19
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.
@drewejohnson drewejohnson added this to Review in Main May 15, 2018
@drewejohnson drewejohnson merged commit 630e617 into CORE-GATECH-GROUP:develop May 15, 2018
@drewejohnson drewejohnson deleted the reshape-scatter-mats branch May 15, 2018 12:31
@drewejohnson drewejohnson removed this from Review in Main May 15, 2018
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants