pisces.extensions.simulation.core.initial_conditions.InitialConditions.__init__#
- InitialConditions.__init__(directory: str | Path)[source]#
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.yaml
file associated with the
initial condition set.
Initializing the internal
ConfigManager
for accessing and
modifying configuration data.
Running the default configuration validation via
_validate_configuration
.- Parameters:
directory (
str
orpathlib.Path
) – Filesystem path to an existing initial condition directory that contains a validIC_CONFIG.yaml
file.- Raises:
FileNotFoundError – If the provided directory does not exist or is not a directory.
FileNotFoundError – If no
IC_CONFIG.yaml
file 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
, aConfigManager
instance, and the absolute directory path is available asdirectory
.