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
andcs
arguments are required, but may beNone
, where appropriate for the specificInterface
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.
- 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
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 dumpSnapshot list.
extractCycleNodeFromStamp
does the opposite