pisces.extensions.simulation.core.frontends.SimulationFrontend.__init__#
- SimulationFrontend.__init__(initial_conditions: InitialConditions, reset_configuration: bool = False, **kwargs)[source]#
Construct a simulation frontend and attach it to an IC object.
On initialization, the frontend will:
Validate the provided initial conditions object (via
_validate_input_ic()
).Ensure that a per-frontend configuration file exists in the initial conditions directory. If no file is present, the default configuration template is copied in. If a file already exists, it is either preserved or reset depending on
reset_configuration
.Load the configuration into a
ConfigManager
instance and apply any keyword overrides passed throughkwargs
.Call
__post_init__()
to allow subclasses to perform additional setup.
- Parameters:
initial_conditions (
InitialConditions
) – The Pisces initial conditions object to bind this frontend to. Provides access to the working directory, logging, and data structures that will be translated into native simulation input.reset_configuration (
bool
, optional) – IfTrue
, overwrite any existing configuration file in the initial conditions directory with the default template for this frontend. IfFalse
(default), an existing configuration file will be preserved.**kwargs – Arbitrary keyword arguments that will be merged into the loaded configuration after it is created. This allows programmatic updates without requiring manual edits to the YAML file.
- Raises:
FileNotFoundError – If the default configuration template for this frontend cannot be found.