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

Updated XSCreator.py for PHISICS interface #810

Closed
wants to merge 166 commits into from

Conversation

alfoa
Copy link
Collaborator

@alfoa alfoa commented Oct 2, 2018


Pull Request Description

What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)

#611

What are the significant changes in functionality due to this change request?

Acceleration of parsing input


For Change Control Board: Change Request Review

The following review must be completed by an authorized member of the Change Control Board.

  • 1. Review all computer code.
  • 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
  • 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
  • 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
  • 5. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in XML block, the node <internalParallel> to True.
  • 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change. The requirements and the requirements test shall be in sync.
  • 7. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.
  • 8. If an analytic test is changed/added is the the analytic documentation updated/added?

rouxpn and others added 3 commits September 25, 2018 14:35
The scattering cross section was not accepted as a variable (although the RAVEN manual was stating so, and PHISICS can generate scaling factors relative to the scattering XS).  
The  scattering XS variable was simply missing in the interface.
@alfoa alfoa added priority_normal devel issues in current devel task labels Oct 2, 2018
Copy link
Collaborator Author

@alfoa alfoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some few modifications required

@@ -152,7 +152,7 @@ def fileReconstruction(self,deconstructedDict):
Converts the formatted dictionary -> {'XS|FUEL1|U235|FISSION|1':1.30, 'XS|FUEL2|U238|ABS|2':4.69}
into a dictionary of dictionaries that has the format -> {'XS':{'FUEL1':{'U235':{'FISSION':{'1':1.30}}}}, 'FUEL2':{'U238':{'ABS':{'2':4.69}}}}
@ In, deconstructedDict, dictionary, dictionary of perturbed variables
@ Out, leanReconstructedDict, dict, nested dictionary of perturbed variables
@ Out, leanReconstructedDict, dictionary, nested dictionary of perturbed variables
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dict

@@ -134,7 +134,7 @@ def formatXS(self,reaction):
else:
raise IOError('the type of cross section '+reaction+' cannot be processed. Refer to manual for available reactions.')
return reactionTemplated

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove trailing spaces...

run the script ./developer_tools/delete_trailing_whitespace.sh framework

for typeKey, value in deconstructedDict.iteritems():
if typeKey in pertDictSet:
keyWords = typeKey.split('|')
reconstructedDict[keyWords[0]][keyWords[1]][keyWords[2]][keyWords[3]][keyWords[4]][keyWords[5]][keyWords[6]] = value
leanReconstructedDict = self.cleanEmpty(reconstructedDict)
return leanReconstructedDict
return leanReconstructedDict
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add empty line

@alfoa alfoa requested review from aalfonsi and wangcj05 and removed request for aalfonsi October 2, 2018 22:00
@alfoa
Copy link
Collaborator Author

alfoa commented Oct 2, 2018

@wangcj05 Since i added some modifications, I can not review this PR.
Can you do that?
Andrea

@wangcj05
Copy link
Collaborator

wangcj05 commented Oct 2, 2018 via email

Copy link
Collaborator

@wangcj05 wangcj05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one comment

@@ -129,6 +129,8 @@ def formatXS(self,reaction):
reactionTemplated = 'nalphaXS'
elif reaction == 'NGXS':
reactionTemplated = 'ngXS'
elif reaction == 'SCATTERINGXS':
reactionTemplated = 'ScatteringXS'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test case to cover this modification?

@wangcj05
Copy link
Collaborator

wangcj05 commented Oct 2, 2018

In addition, why all these commits are showing in this PR?

@alfoa alfoa added task This tag should be used for any new capability, improvement or enanchment and removed task2 labels Oct 18, 2018
@wangcj05
Copy link
Collaborator

@aalfonsi should we close this PR?

@aalfonsi
Copy link
Collaborator

aalfonsi commented Nov 4, 2021

yes lets close it.

@aalfonsi aalfonsi closed this Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devel issues in current devel priority_normal task This tag should be used for any new capability, improvement or enanchment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants