Skip to content

Architecture

This package was developed with the goal of avoid repeating boilerplate code and establish a common interface for LUME compatible codes.

The following interfaces are available:

  • lume.base.Base

  • lume.base.CommandWrapper

The Base class is to be inherited by wrappers which are pure Python and do not invoke an external command. If you would like to provide a LUME compatible interface for a code which wraps an external program, please use the CommandWrapper described below.

Base

The LUME Base class provides many useful methods which can be examined on the API section of this documentation. The following are abstract methods which must be implemented by you when inheriting from Base:

  • configure: Configure and set up for run.
  • run: Execute the code.

Command Wrapper

The LUME CommandWrapper extends the Base class and provides the following abstract methods, in addition to the ones provided by the Base class, which must be implemented by you:

  • archive: Dump inputs and outputs into HDF5 file.
  • load_archive: Loads input and output from archived h5 file.
  • plot: Plots output multiple keys.
  • write_input: Write the input parameters into the file.
  • input_parser: Invoke the specialized input parser and returns the input dictionary.
  • load_output: Reads and load into .output the outputs generated by the code.

Next Steps

The following sections will describe in detail the available interfaces as well as their properties.