Add length_multiplier to scale DAGMCUniverse - #4033
Conversation
…ding_box multiplier
…er; added length_multiplier_ member
…te MOAB vertices, read coords, multiply by length_multiplier, write coords; add to_hdf5
GuySten
left a comment
There was a problem hiding this comment.
I've added some small suggestions.
Have a check that length_multiplier > 0. Make default=1.0 instead of -1.0. Co-authored-by: GuySten <62616591+GuySten@users.noreply.github.com>
|
Added your changes @GuySten |
GuySten
left a comment
There was a problem hiding this comment.
Looks good to me except for two things.
-
I want to make sure that this PR does not affect performance of very large dagmc models.
@shimwell, can you check if using this PR with length_multiplier for a complicated dagmc model does not affect loading time too harshly. -
I think we should test this feature directly. For example by using stochastic volume calculation of a dagmc model of a ball with length_multiplier and checking it against the expected analytical result.
|
Sure I can do #(2) @GuySten, what would be the best way for me to share that here? Just show the input and results? |
|
@ssgudala-bwxt, I meant adding a unit test. |
|
Great idea @ssgudala-bwxt! I'll have a look at this in the next day or so. |
…dd a dagmc_sphere_r5.h5m to test
pshriwise
left a comment
There was a problem hiding this comment.
Just one small ask for an HDF5 roundtrip unit test as well but then I think this is good to go.
Thank you @ssgudala-bwxt!
|
I added two hdf5 unit tests. Let me know if one or both of them are what you had in mind @pshriwise |
pshriwise
left a comment
There was a problem hiding this comment.
Thanks @ssgudala-bwxt!
Description
Adds support for a
length_multiplierargument onopenmc.DAGMCUniverseso DAGMC geometry can be uniformly scaled at load time.This change wires the new parameter through the Python API, XML/HDF5 serialization, and the C++ DAGMC initialization path. When provided, OpenMC scales DAGMC vertex coordinates before building.
Python-side bounding-box helpers are also updated to reflect the scaled geometry.
Fixes # 3200
Checklist