armi.bookkeeping.mainInterface module

This module performs some file manipulations, cleanups, state loads, etc.

It’s a bit of a catch-all interface, and it’s name is admittedly not very descriptive.

armi.bookkeeping.mainInterface.describeInterfaces(_cs)[source]

Function for exposing interface(s) to other code

class armi.bookkeeping.mainInterface.MainInterface(r, cs)[source]

Bases: armi.interfaces.Interface

Do some basic manipulations, calls, Instantiates the databse.

Notes

Interacts early so that the database is accessible as soon as possible in the run. The database interfaces interacts near the end of the interface stack, but the main interface interacts first.

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 = 'main'
interactBOL()[source]

Called at the Beginning-of-Life of a run, before any cycles start.

_activateDB()[source]

Instantiate the database state.

Notes

This happens here rather than on the database interface, as the database interacts near the end of the stack. Some interactBOL methods may be dependent on having data in the database, such as calls to history tracker during a restart run.

_moveFiles()[source]
interactBOC(cycle=None)[source]

typically the first interface to interact beginning of cycle.

interactEveryNode(cycle, node)[source]

Loads from db if necessary.

interactEOL()[source]

Called at End-of-Life, after all cycles are complete.

cleanARMIFiles()[source]

delete ARMI run files like MC**2 and REBUS inputs/outputs. Useful if running a clean job that doesn’t require restarts.

cleanLastCycleFiles()[source]

Delete ARMI files from previous cycle that aren’t necessary for the next cycle. Unless you’re doing reloads, of course.