Skip to content

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.

ModulePublic areaUser responsibility
core runtimeneomc/core, neomc/stateids, units, vectors, particle state and random identity
dataneomc/datacompact runtime tables
materialsneomc/materialscomposition, density, temperature and physical binding state
geometryneomc/geometryregions, boundaries, material lookup and visualization
sourceneomc/sourcesource distributions, decay inventory and source rates
observableneomc/observablerequested estimators, filters, bins and history statistics
physicsneomc/physicsinteraction models and final-state helpers
transportneomc/transportpackage data, policies and package registry
simulationneomc/simulationpackage descriptions, model compilation, execution and results
importersneomc/importersversioned data resolvers and lower-level file import

CMake Targets

TargetUse
neomc_simulationnormal application integration
neomc_coreaggregate target including the simulation runtime
neomc_physics_data_importersoptional data importers; requires HDF5 and Zlib
neomc_geometrygeometry-only consumers
neomc_sourcesource and decay preparation without transport
neomc_observableobservable 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"

Application code should:

  1. construct materials and geometry;
  2. resolve package data from named physical-data installations;
  3. define sources and observables;
  4. call run_simulation_model;
  5. 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},
    });

NeoMC user documentation.