romtools.workflows.models#
Protocol for interfacing with external applications
Classes
|
Minimal handle returned by a non-blocking model. |
|
Baseline model protocol. |
|
Protocol for a model that has a return_qoi implementation |
Protocol for a model that has a return_qoi and compute_error_estimate |
- class romtools.workflows.models.JobHandle(*args, **kwargs)[source]#
Bases:
ProtocolMinimal handle returned by a non-blocking model.
- class romtools.workflows.models.Model[source]#
Bases:
ProtocolBaseline model protocol.
Set
blocking = Falseon models that return a JobHandle. The executor defaults to blocking when the attribute is absent.- populate_run_directory(run_directory, parameter_sample)[source]#
This function is called from the base directory and is responsible for populating the run directory located at run_directory.
Examples would be setting up input files, linking mesh files.
- Parameters:
run_directory (str) – Absolute path to run_directory.
parameter_sample (dict) – Dictionary containing parameter names and sample values
- Return type:
None
- run_model(run_directory, parameter_sample)[source]#
Execute the model. Blocking models return an integer exit status. Non-blocking models return a JobHandle.
- Parameters:
run_directory (str) – Absolute path to run_directory.
parameter_sample (dict) – Dictionary containing parameter names and sample values
- Return type:
int | JobHandle
- class romtools.workflows.models.QoiModel[source]#
Bases:
Model,ProtocolProtocol for a model that has a return_qoi implementation