Skip to content

Recorder

Recorder

Recorder(recorder_type: str, cores: Optional[Union[int, List[int]]] = None)

Bases: ABC

Base class for OpenSees recorder commands.

Recorder instances do not self-register. A :class:RecorderManager owns tag assignment and lifecycle for a single model context.

Parameters:

Name Type Description Default
recorder_type str

Concrete recorder type label.

required
cores int | list[int] | None

Optional MPI process IDs on which the generated Tcl command is enabled. None emits it without a rank guard.

None

Subclasses implement _to_tcl_impl. That hook renders recorder-specific syntax; the public to_tcl method adds a rank guard where requested.

Methods:

Name Description
to_tcl

Render the recorder command, optionally guarded by solver $pid.

Methods:

to_tcl

to_tcl() -> str

Render the recorder command, optionally guarded by solver $pid.

Returns:

Name Type Description
command str

Concrete Tcl, wrapped in a process-ID condition when cores is supplied. The execution environment must define pid.

Rendering does not open output files or allocate MPI ranks. Concrete implementation errors, including unresolved selections, propagate.