armi.bookkeeping.snapshotInterface module
Controls points during a calculation where snapshots will be triggered, signaling more detailed treatments.
Snapshots are user-defined cycle/timenode points where something special is to be done. What in particular is done is dependent on the case settings and the collection of active plugins
At the very basic level, third-party code input files are dumped out and stored in special snapshot folders at these times. This can be useful when you are sharing third-party input files with another party (e.g. for review or collaboration).
You may want to run extra long-running physics simulations only at a few time points (e.g. BOL, EOL). This is useful for detailed transient analysis, or other follow-on analysis.
Snapshots can be requested through the settings: dumpSnapshot and/or defaultSnapshots.
- armi.bookkeeping.snapshotInterface.describeInterfaces(cs)[source]
Function for exposing interface(s) to other code.
- class armi.bookkeeping.snapshotInterface.SnapshotInterface(r, cs)[source]
Bases:
InterfaceSnapshot managerial interface.
This is a special
Interfacethat is designed to run along all the other Interfaces during a simulation, to save off important or helpful data. By default, this is designed to be used with the"defaultSnapshots"and""dumpSnapshot""settings. These settings were added so users can control if snapshot data will be recorded during their run. Broadly, this class is implemented to run the Operator methodo.snapshotRequest.Construct an interface.
The
randcsarguments are required, but may beNone, where appropriate for the specificInterfaceimplementation.- Parameters:
r (Reactor) – A reactor to attach to
cs (Settings) – Settings object to use
- Raises:
RuntimeError – Interfaces derived from Interface must define their name
- name: str | None = 'snapshot'
The name of the interface. This is undefined for the base class, and must be overridden by any concrete class that extends this one.
- interactEveryNode(cycle, node)[source]
Call the snapshot interface to copy files at each node, if requested.
- armi.bookkeeping.snapshotInterface.extractCycleNodeFromStamp(stamp)[source]
Returns cycle and node from a CCCNNN stamp.
See also
getCycleNodeStampthe opposite
- armi.bookkeeping.snapshotInterface.getCycleNodeStamp(cycle, node)[source]
Returns a CCCNNN stamp for this cycle and node.
Useful for comparing the current cycle/node with requested snapshots in the settings
See also
isRequestedDetailPointcompares a cycle,node to the dumpSnapshot list.
extractCycleNodeFromStampdoes the opposite