You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split off from #886 . I think this could be a good opportunity to explore a new design for building physics tables that can be extended to satisfy #907 and #253 .
First, I think to keep the Model (or OpticalVolumeProcess) interface simple, we should have a single virtual method that takes or returns a relatively complicated object for the cross section construction. In ORANGE, for constructing surfaces and numerous other data structures from a "Solid" factory object, the model of passing in a Builder class (which has wrappers for the various CollectionBuilder methods) has worked really well.
So perhaps our class would have:
virtualvoidbuild(XsBuilder&) const = 0;
and XsBuilder would have:
Accessors for getting the optical material data, properties, cutoffs, etc.
Internally a GenericGridBuilder for adding the cross section data
A method like insert_xs(OpticalMaterialId, SpanReal energy, SpanReal xs) with error checking to make sure that it's called once per material for all materials
Then during construction, the OpticalPhysics will:
Construct a temporary XsBuilder
Loop over all OpticalVolumeProcess to construct the XS data
Cross section tables
Split off from #886 . I think this could be a good opportunity to explore a new design for building physics tables that can be extended to satisfy #907 and #253 .
First, I think to keep the
Model
(orOpticalVolumeProcess
) interface simple, we should have a single virtual method that takes or returns a relatively complicated object for the cross section construction. In ORANGE, for constructing surfaces and numerous other data structures from a "Solid" factory object, the model of passing in aBuilder
class (which has wrappers for the various CollectionBuilder methods) has worked really well.So perhaps our class would have:
and
XsBuilder
would have:GenericGridBuilder
for adding the cross section datainsert_xs(OpticalMaterialId, SpanReal energy, SpanReal xs)
with error checking to make sure that it's called once per material for all materialsThen during construction, the OpticalPhysics will:
Models
The text was updated successfully, but these errors were encountered: