ogstools.core.native_simulation_controller module#
- class ogstools.core.native_simulation_controller.OGSNativeController[source]#
Bases:
SimulationControllerController for batch execution of OGS simulations.
Runs OGS as a separate process and waits for completion. Does not support stepwise execution or intermediate state inspection. Suitable for standard production runs. Objects should be used as read-only.
Initialize a native simulation controller.
- Parameters:
- __init__(model_ref, sim_output=None, overwrite=None)[source]#
Initialize a native simulation controller.
- terminate()[source]#
Terminate the simulation if it is running.
Attempts to gracefully terminate the OGS process and all child processes. If graceful termination fails, forcefully kills them.
- Return type:
- Returns:
True if the run was terminated successfully, False otherwise.
- run(target=None, id=None)[source]#
Wait for the simulation to complete and return a Simulation object.
Blocks until the OGS process finishes.
- status_str()[source]#
Get a human-readable status description.
- Return type:
- Returns:
String describing the current simulation state and runtime.
- property status: SimulationStatus#
Get the current simulation status.
Queries the process state to determine if the simulation is running, completed, or encountered an error.
- Returns:
Current SimulationStatus.