Skip to content

Abaqus interactive executor

abaqus_interactive_executor

An interactive job executor.

Classes

InteractiveAbaqus

InteractiveAbaqus(command_template: str)

Bases: BaseInteractiveExecutor

An interactive job executor for Abaqus.

Source code in src\vimseo\job_executor\abaqus_interactive_executor.py
52
53
def __init__(self, command_template: str):
    super().__init__(command_template)
Attributes
DEFAULT_EXECUTABLE class-attribute instance-attribute
DEFAULT_EXECUTABLE = 'abq2022'

The default executable name.

Methods:
execute
execute(check_subprocess: bool = False)

Execute a job.

Parameters:

  • check_subprocess (bool, default: False ) –

    Whether to raise an error in case of subprocess failure.

Source code in src\vimseo\job_executor\base_executor.py
109
110
111
112
113
114
115
116
117
118
119
120
121
def execute(
    self,
    check_subprocess: bool = False,
):
    """Execute a job.

    Args:
        check_subprocess: Whether to raise an error in case of subprocess failure.
    """
    self._command_line = self._replace_in_command_line(self._command_template)
    cmd = shlex.split(self._command_line)
    LOGGER.info(f"Executing command: {self._command_line}")
    return self._execute_external_software(cmd, check_subprocess)
set_options
set_options(options: BaseUserJobSettings)

Set the user job options.

Source code in src\vimseo\job_executor\base_executor.py
123
124
125
126
127
128
def set_options(self, options: BaseUserJobSettings):
    """Set the user job options."""
    if not isinstance(options, self._USER_JOB_OPTIONS_MODEL):
        msg = f"options must be of type {self._USER_JOB_OPTIONS_MODEL}"
        raise TypeError(msg)
    self._user_job_options = options.model_dump()