Skip to content

RegionBase

RegionBase

RegionBase(user_name: str = None, damping: Damping = None)

Bases: ABC

Extension base for defining regions in a model.

Region objects do not self-register and do not assign their own tags. A RegionManager owns lifecycle operations, tag assignment, removal, and retagging for a local model context.

Methods:

Name Description
set_damping

Assign damping through the validated damping property.

to_tcl

Render the concrete region's solver definition without executing it.

get_type

Return the concrete family label used for type reporting/default names.

Attributes:

Name Type Description
tag Optional[int]

Current manager-assigned region tag, or None while unmanaged.

name str

User label stored on this region, not a generated solver node group.

damping Optional[Damping]

Associated damping object, or None when unassigned or collected.

Attributes

tag property writable

tag: Optional[int]

Current manager-assigned region tag, or None while unmanaged.

Tag zero is reserved for the model's global region. Do not manually assign tags to bypass registration or overwrite registry ownership.

name property

name: str

User label stored on this region, not a generated solver node group.

damping deletable property writable

damping: Optional[Damping]

Associated damping object, or None when unassigned or collected.

The region holds a weak reference. Keep damping registered with its model manager so that its definition remains alive and exportable.

Methods:

set_damping

set_damping(damping_instance: Damping) -> None

Assign damping through the validated damping property.

Parameters:

Name Type Description Default
damping_instance Damping

Definition to associate with this region.

required

Shared regions affect all their consumers; this method neither creates a private copy nor updates files already exported to the solver.

to_tcl abstractmethod

to_tcl() -> str

Render the concrete region's solver definition without executing it.

Returns:

Name Type Description
command str

Subclass-defined Tcl requiring appropriate export context and registry identity.

get_type abstractmethod staticmethod

get_type() -> str

Return the concrete family label used for type reporting/default names.

Returns:

Name Type Description
label str

Region kind supplied by the concrete subclass.