External software component
external_software_component
¶
Classes¶
ExternalSoftwareComponent
¶
ExternalSoftwareComponent(
load_case: LoadCase | None = None,
material_grammar_file: Path | str = "",
material: Material | None = None,
check_subprocess: bool = False,
)
Bases: BaseComponent
A component to execute an external software.
Initialize self. See help(type(self)) for accurate signature.
Parameters:
-
load_case(LoadCase | None, default:None) –The description is missing.
-
material_grammar_file(Path | str, default:'') –The description is missing.
-
material(Material | None, default:None) –The description is missing.
-
check_subprocess(bool, default:False) –The description is missing.
Source code in src\vimseo\core\components\external_software_component.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
Attributes¶
USE_JOB_DIRECTORY
class-attribute
¶
USE_JOB_DIRECTORY: bool = False
Whether to create a job directory.
Methods:¶
add_attached_files
¶
add_attached_files(
files_to_attach: list[str, Path],
) -> None
Add files to be copied to job directory.
Parameters:
-
files_to_attach(list[str, Path]) –A list of files to be copied to the job directory.
Returns:
Source code in src\vimseo\core\components\external_software_component.py
174 175 176 177 178 179 180 181 182 183 | |
execute
¶
execute(
input_data: StrKeyMapping = READ_ONLY_EMPTY_DICT,
) -> DisciplineData
Execute the discipline, i.e. compute output data from input data.
If :attr:.virtual_execution is True,
this method returns the :attr:.default_output_data.
Otherwise,
it calls the :meth:._run method performing the true execution
and returns the corresponding output data.
This :meth:._run method must be implemented in subclasses.
Parameters:
-
input_data(StrKeyMapping, default:READ_ONLY_EMPTY_DICT) –The input data. Complete this dictionary with the :attr:
.default_input_data.
Returns:
-
DisciplineData–The input and output data.
Source code in src\vimseo\core\gemseo_discipline_wrapper.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
post_run
¶
post_run(input_data, output_data)
Post-run operations.
Source code in src\vimseo\core\components\external_software_component.py
84 85 | |
pre_run
¶
pre_run(input_data)
Pre-run operations.
Source code in src\vimseo\core\components\external_software_component.py
81 82 | |
set_job_executor
¶
set_job_executor(job_executor: JobExecutor)
Set the job executor.
Parameters:
-
job_executor(JobExecutor) –The job executor.
Source code in src\vimseo\core\components\external_software_component.py
124 125 126 127 128 129 130 | |
write_input_files
¶
write_input_files(input_data)
Write the input files for the external software.
Source code in src\vimseo\core\components\external_software_component.py
78 79 | |