|
Celeritas 0.7.0-dev.228+develop.9905a715
|
Construct a general CSG universe, aka a "unit". More...
#include <UnitProto.hh>

Classes | |
| struct | BackgroundInput |
| Optional "background" inside of exterior, outside of all mat/daughter. More... | |
| struct | BoundaryInput |
| Boundary conditions for the unit. More... | |
| struct | DaughterInput |
| Another universe embedded within this one. More... | |
| struct | Input |
| Required input data to create a unit proto. More... | |
| struct | MaterialInput |
| A homogeneous physical material. More... | |
Public Types | |
Types | |
| using | Unit = detail::CsgUnit |
| using | Tol = Tolerance<> |
| using | VariantLabel = std::variant< Label, VolumeInstanceId > |
| using | MaterialInputId = OpaqueId< struct MaterialInput > |
| using | LocalParent = std::optional< MaterialInputId > |
Public Types inherited from celeritas::orangeinp::ProtoInterface | |
| using | SPConstObject = std::shared_ptr< ObjectInterface const > |
| using | SPConstProto = std::shared_ptr< ProtoInterface const > |
| using | VecProto = std::vector< ProtoInterface const * > |
| using | ProtoBuilder = detail::ProtoBuilder |
Public Member Functions | |
| UnitProto (Input &&inp) | |
| Construct with required input data. | |
| std::string_view | label () const final |
| Short unique name of this object. | |
| SPConstObject | interior () const final |
| Get the boundary of this universe as an object. | |
| VecProto | daughters () const final |
| Get a list of all daughter protos. | |
| void | build (ProtoBuilder &) const final |
| Construct a universe input from this object. | |
| void | output (JsonPimpl *) const final |
| Write the proto to a JSON object. | |
| Input const & | input () const |
| Get the input, primarily for unit testing. | |
| Unit | build (Tol const &tol, BBox const &bbox, bool is_global_universe) const |
| Construct a standalone unit for testing or external interface. | |
Additional Inherited Members | |
Protected Member Functions inherited from celeritas::orangeinp::ProtoInterface | |
| CELER_DEFAULT_COPY_MOVE (ProtoInterface) | |
Construct a general CSG universe, aka a "unit".
A "unit" is a region of space (with an outer boundary specified by the BoundaryInput::interior object) that is divided up into multiple smaller regions:
Additional metadata about the structure can be provided when converting Geant4 geometry. When building, labels are volume instance IDs: each material and daughter is a volume placement, and the background input uses an empty instance ID as a sentinel indicating a background volume is present. (Note the "background" is structurally a volume, not instance, since it is locally the top level of the geometry.) In addition to the labels, a special local_parent field denotes a structural relationship between one input object and another. These will be always set when building from Geant4 but never set when building from SCALE. The value is a null ID when the parent canonical volume is rendered as the background, or the index in the list of materials when the parent volume is inlined into this unit.
|
finalvirtual |
Construct a universe input from this object.
Construction is done from highest masking precedence to lowest (reverse zorder): exterior, then holes, then arrays, then media.
Implements celeritas::orangeinp::ProtoInterface.
| auto celeritas::orangeinp::UnitProto::build | ( | Tol const & | tol, |
| BBox const & | bbox, | ||
| bool | is_global_universe | ||
| ) | const |
Construct a standalone unit for testing or external interface.
The universe ID in the resulting "fill" is the index into the input daughters list, which is the same ordering as the array of this->daughters().
The "exterior boundary" argument determines whether the outer boundary needs to be deleted (assumed inside, implicit from the parent universe's boundary) or preserved.
|
finalvirtual |
Get a list of all daughter protos.
Implements celeritas::orangeinp::ProtoInterface.
|
finalvirtual |
Get the boundary of this universe as an object.
Implements celeritas::orangeinp::ProtoInterface.
|
finalvirtual |
Short unique name of this object.
Implements celeritas::orangeinp::ProtoInterface.
Write the proto to a JSON object.
Implements celeritas::orangeinp::ProtoInterface.