Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
get() and unchecked_get() for OpaqueID, PDGNumber (get is like std:: smart pointers)
value() for Quantity, InitializedValue
obj for JsonPimpl, ReprImpl
Let's make OpaqueId look like std::optional: value for checked access, operator* for unchecked. Same for Quantity and Initialized_value. I think obj is fine for JSON because it's a json object.
Note that some C++ facade classes have base() indicating the single value that the class wraps, so maybe that's a better word too.
ID-based accessors
get() for KernelRegistry, MemRegistry etc.
id_to_label and get for views with MaterialParams etc.
action and num_actions for ActionRegistry
should probably be at() and size() like std containers? But some of these store multiple types (and maybe they shouldn't?)
TEST_IF_CELERITAS_USE_ROOT vs TEST_IF_CELERITAS_GEANT
typenames of the form Foo_t vs Foo_type vs FooT?
allow_redirect, allow_signals to enable_X
"propagator" advances one step per call (since this is the same as a 'step' in the overall transport), "field driver" performs one trial substep per call, "stepper" performs one integration per call
traits class names: is_opaque_id vs IsOpaqueId; is_opaque_id_v for value? see discussion
make all class names LikeThisForConsistency, e.g. numeric_limits
instead of FooScalars, use FooConstants since some of the "scalars" can actually be fixed-size vectors
Singular/plural names for variables/accessors
Add to the documentation (after assuming the team agrees):
This means a couple of changes:
SPMaterialParams
should bematerial()
notmaterials
even though those classes store vectorsFooState
object should bestate
even though it represents a vector of states.Collection
storage back ends (see https://github.com/celeritas-project/celeritas/pull/718#discussion_r1165426355 ).Weird cases to consider:
num_streams
,max_tracks
?Single-item data retrieval
get()
andunchecked_get()
for OpaqueID, PDGNumber (get
is likestd::
smart pointers)value()
for Quantity, InitializedValueobj
for JsonPimpl, ReprImplLet's make OpaqueId look like
std::optional
:value
for checked access,operator*
for unchecked. Same for Quantity and Initialized_value. I thinkobj
is fine for JSON because it's a json object.Note that some C++ facade classes have
base()
indicating the single value that the class wraps, so maybe that's a better word too.ID-based accessors
get()
for KernelRegistry, MemRegistry etc.id_to_label
andget
for views with MaterialParams etc.action
andnum_actions
forActionRegistry
should probably be
at()
andsize()
like std containers? But some of these store multiple types (and maybe they shouldn't?)Environment variables
CELER_MEMPOOL_RELEASE_THRESHOLD
->DEVICE_
CUDA_
->DEVICE_
where appropriateCELER_DISABLE_PARALLEL
->CELER_MPI
Class names
Other stuff
TEST_IF_CELERITAS_USE_ROOT
vsTEST_IF_CELERITAS_GEANT
Foo_t
vsFoo_type
vsFooT
?allow_redirect
,allow_signals
toenable_X
is_opaque_id
vsIsOpaqueId
;is_opaque_id_v
for value? see discussionLikeThisForConsistency
, e.g.numeric_limits
FooScalars
, useFooConstants
since some of the "scalars" can actually be fixed-size vectors