pisces.extensions.simulation.core.initial_conditions.InitialConditions3DCartesian.__init__#
- InitialConditions3DCartesian.__init__(directory: str | Path)#
Load an existing set of initial conditions from a target directory.
This base initializer is responsible for:
Normalizing and storing the target directory path.
Verifying that the directory exists and is a valid directory on disk.
Locating and loading the
IC_CONFIG.yamlfile associated with the
initial condition set.
Initializing the internal
ConfigManagerfor accessing and
modifying configuration data.
Running the default configuration validation via
_validate_configuration.- Parameters:
directory (
strorpathlib.Path) – Filesystem path to an existing initial condition directory that contains a validIC_CONFIG.yamlfile.- Raises:
FileNotFoundError – If the provided directory does not exist or is not a directory.
FileNotFoundError – If no
IC_CONFIG.yamlfile is found in the specified directory.ValueError – If the configuration file exists but is structurally invalid.
Notes
Subclasses overriding
__init__should callsuper().__init__(directory)to ensure the configuration is loaded and validated before performing subclass-specific setup.The loaded configuration is stored in
config, aConfigManagerinstance, and the absolute directory path is available asdirectory.