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: armi.interfaces.Interface

Snapshot managerial interface

Construct an interface.

The r and cs arguments are required, but may be None, where appropriate for the specific Interface implementation.

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: Optional[str] = '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.

interactBOL()[source]
interactEveryNode(cycle, node)[source]
activateDefaultSnapshots()[source]

Figure out and assign some default snapshots (BOL, MOL, EOL).

armi.bookkeeping.snapshotInterface.extractCycleNodeFromStamp(stamp)[source]

Returns cycle and node from a CCCNNN stamp

See also

getCycleNodeStamp

the 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

isRequestedDetailPoint

compares a cycle,node to the dumpSnapshots list.

extractCycleNodeFromStamp

does the opposite