BaseModelWrapper
Bases: BlueMathModel
Base class for numerical models wrappers.
Attributes: |
|
---|
Methods:
Name | Description |
---|---|
_check_parameters_type |
Check if the parameters have the correct type. |
_exec_bash_commands |
Execute bash commands. |
create_cases_context_one_by_one |
Create an array of dictionaries with the combinations of values from the input dictionary, one by one. |
create_cases_context_all_combinations |
Create an array of dictionaries with each possible combination of values from the input dictionary. |
render_file_from_template |
Render a file from a template. |
write_array_in_file |
Write an array in a file. |
copy_files |
Copy file(s) from source to destination. |
build_cases |
Create the cases folders and render the input files. |
run_cases |
Run the cases. |
run_model |
Run the model for a specific case (abstract method). |
__init__(templates_dir, templates_name, model_parameters, output_dir, default_parameters=None)
Initialize the BaseModelWrapper.
Parameters: |
|
---|
build_cases(mode='all_combinations')
Create the cases folders and render the input files.
Parameters: |
|
---|
copy_files(src, dst)
Copy file(s) from source to destination.
Parameters: |
|
---|
create_cases_context_all_combinations()
Create an array of dictionaries with each possible combination of values from the input dictionary.
Returns: |
|
---|
create_cases_context_one_by_one()
Create an array of dictionaries with the combinations of values from the input dictionary, one by one.
Returns: |
|
---|
render_file_from_template(template_name, context, output_filename=None)
Render a file from a template.
Parameters: |
|
---|
run_cases()
Run the cases.
run_model(case_dir)
abstractmethod
Run the model.
Parameters: |
|
---|
write_array_in_file(array, filename)
Write an array in a file.
Parameters: |
|
---|