SimulationFrontend#
- class pisces.extensions.simulation.core.frontends.SimulationFrontend(initial_conditions: InitialConditions, reset_configuration: bool = False, **kwargs)[source]#
Abstract base class defining the behavior of simulation frontends.
This class forms the core logic for all simulation frontends in Pisces, and includes a number of abstract methods and modifiable hooks to alter various aspects of the simulation code’s initial conditions generation.
The
SimulationFrontend
class takes aInitialConditions
object as input, which it will then convert into simulation code-specific files and configurations for running the simulation.To facilitate this, the frontend class manages a configuration file in which the user may specify the details of the conversion process. Each frontend has a default configuration file in
../frontend_configs
, which is copied into the initial conditions directory when the frontend is initialized. This allows the user to modify the configuration for each simulation run without affecting the default template.For more detailed information on how to implement a custom frontend, see Developer Guide: Simulation Frontends. For the user guide documentation, see Simulation Frontends in Pisces.
Methods
__init__
(initial_conditions[, ...])Construct a simulation frontend and attach it to an IC object.
generate_initial_conditions
(*args, **kwargs)Generate the necessary initial condition files from this frontend.
Attributes
The
ConfigManager
instance associated with this frontend.Absolute path to the configuration file for this frontend.
Absolute path to the default configuration file template for this frontend.
Filesystem directory where the initial conditions object is stored.
The IC object that this frontend is bound to.
Logger instance associated with this frontend.