cellular_raza_core::backend::chili

Macro run_simulation

run_simulation!() { /* proc-macro */ }
Expand description

Performs a complete numerical simulation.

run_simulation!(
    // Arguments
    domain: $domain:ident,
    agents: $agents:ident,
    settings: $settings:ident,
    aspects: [$($asp:ident),*],

    // Optional Arguments
    $(core_path: $path:path,)?
    $(parallelizer: $parallelizer:ident,)?
    $(determinism: $determinism:bool,)?
    $(aux_storage_name: $aux_storage_name:ident,)?
    $(zero_force_default: $zero_force_default:closure,)?
    $(zero_force_reactions_default: $zero_force_reactions_default:closure,)?
    $(communicator_name: $communicator_name:ident,)?
    $(mechanics_solver_order: $mechanics_solver_order:NonZeroUsize,)?
    $(reactions_intra_solver_order: $reactions_intra_solver_order:NonZeroUsize,)?
    $(reactions_contact_solver_order: $reactions_contact_solver_order:NonZeroUsize,)?
) -> Result<StorageAccess<_, _>, SimulationError>;

§Arguments

KeywordDescriptionDefault
domainAn object implementing the Domain trait.-
agentsIterable of cell-agents-
settingsSee Settings-
aspectsList of simulation aspects such as [Mechanics, Interaction, ...] See below.-
core_pathPath that points to the core module of cellular_razacellular_raza::core
parallelizerMethod to parallelize the simulation. Choose between OsThreads and Rayon.OsThreads
determinismEnforces sorting of values received from step 2false
aux_storage_nameName of helper struct to store cellular information._CrAuxStorage
zero_force_defaultA closure returning the zero value of the force.|c| {num::Zero::zero()}
zero_force_reactions_defaultA closure returning the zero value of the reactions type.|c| {num::Zero::zero()}
communicator_nameName of the struct responsible for communication between threads._CrCommunicator
mechanics_solver_orderOrder of the mechanics solver from 0 to 22
reactions_intra_solver_orderOrder of the intracellular reactions solver from 1 to 44
reactions_contact_solver_orderOrder of the contact reactions solver from 0 to 22

The domain,agents and settings arguments allow for shorthand notation.

§Simulation Aspects

AspectTrait(s)
MechanicsMechanics,SubDomainMechanics
InteractionInteraction
CycleCycle
ReactionsReactions
ReactionsExtraReactionsExtra, SubDomainReactions
ReactionsContactReactionsContact
DomainForceSubDomainForce, SubDomainMechanics

§Returns

Returns a StorageAccess to interoperate with calculted results.

§Comparison of Macro Keywords

This list shows which keyword can be provided in which macro.

Keywordrun_simulationrun_maintest_compatibilityprepare_typesbuild_aux_storagebuild_communicator
domain
agents
settings
aspects
core_path
parallelizer
determinism
aux_storage_name
zero_force_default
zero_force_reactions_default
communicator_name
mechanics_solver_order
reactions_intra_solver_order
reactions_contact_solver_order