Module Guide
NeoMC is built as focused static-library targets. Applications normally link neomc_simulation; applications that resolve file-backed data also link neomc_physics_data_importers.
| Module | Public area | User responsibility |
|---|---|---|
| core runtime | neomc/core, neomc/state | ids, units, vectors, particle state and random identity |
| data | neomc/data | compact runtime tables |
| materials | neomc/materials | composition, density, temperature and physical binding state |
| geometry | neomc/geometry | regions, boundaries, material lookup and visualization |
| source | neomc/source | source distributions, decay inventory and source rates |
| observable | neomc/observable | requested estimators, filters, bins and history statistics |
| physics | neomc/physics | interaction models and final-state helpers |
| transport | neomc/transport | package data, policies and package registry |
| simulation | neomc/simulation | package descriptions, model compilation, execution and results |
| importers | neomc/importers | versioned data resolvers and lower-level file import |
CMake Targets
| Target | Use |
|---|---|
neomc_simulation | normal application integration |
neomc_core | aggregate target including the simulation runtime |
neomc_physics_data_importers | optional data importers; requires HDF5 and Zlib |
neomc_geometry | geometry-only consumers |
neomc_source | source and decay preparation without transport |
neomc_observable | observable definitions or low-level accumulation |
Other internal dependency targets are available in the source build but are not usually the right application boundary.
Typical application target:
cmake
add_subdirectory(path/to/neomc)
add_executable(shielding main.cc)
target_link_libraries(
shielding
PRIVATE
neomc_simulation
neomc_physics_data_importers
)Typical public includes:
cpp
#include "neomc/geometry/rectilinear_grid.hh"
#include "neomc/importers/coupled_em_data_resolver.hh"
#include "neomc/materials/material_definition.hh"
#include "neomc/observable/observable_definition.hh"
#include "neomc/simulation/transport_session.hh"
#include "neomc/source/source_definition.hh"
#include "neomc/transport/coupled_em/profile.hh"Recommended Boundary
Application code should:
- construct materials and geometry;
- resolve package data from named physical-data installations;
- define sources and observables;
- call
run_simulation_model; - consume scores, uncertainty and provenance.
Use compile_simulation_model only when the same compiled physical model will run more than once. Package-specific drivers and private tool headers bypass model compilation and are not user entry points.
cpp
SimulationTransportSessionResult result =
run_simulation_model(SimulationModel{
.geometry = hold_geometry(geometry),
.materials = materials,
.observables = observables,
.packages = std::move(packages),
.source = std::move(source),
.run = SimulationRunSettings{.histories = 10000},
});