Assign
_FEAssignMixin
_assignMultiElement(dimension, assign_fn, assign_value, tagsMacro=None, tagsElement=None, assign_extra_args=())
staticmethod
Apply a single-element assignment function to a collection of elements.
This is the shared implementation used by all assignMulti* methods.
Exactly one of tagsMacro or tagsElement must be non-empty.
When tagsMacro is provided, the helper resolves each macro-element (geometric object) to its set of mesh elements for the given dimension and calls assign_fn for each one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dimension
|
Dim
|
Spatial dimension of the elements
( |
required |
assign_fn
|
Callable[..., None]
|
Callable with signature
|
required |
assign_value
|
Any
|
The value to pass as the second argument to assign_fn for every targeted element. |
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element (geometric entity) tags. Mutually exclusive with tagsElement. |
None
|
tagsElement
|
Optional[List[myInt64]]
|
List of individual mesh element tags. Mutually exclusive with tagsMacro. |
None
|
assign_extra_args
|
tuple[Any, ...]
|
Additional positional arguments forwarded to assign_fn after assign_value. Defaults to an empty tuple. |
()
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both lists are non-empty or both are empty. |
_check_material_assign(tagElement, idMaterial)
Validate arguments before assigning a material to an element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagElement
|
myInt64
|
Mesh element tag (must be |
required |
idMaterial
|
int
|
Material id to validate against the material library. |
required |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagElement is not |
_getFrameLocal2Default(tagFrame)
staticmethod
Compute the default local axis-2 direction for a frame element.
When the frame is parallel to the global Z axis, axis 2 is set to the
positive global Y direction. Otherwise axis 2 is computed as
Z_global × local3. This matches the Strand7 convention described
in :meth:__init__.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagFrame
|
myInt64
|
Mesh tag of the frame element. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Normalised |
Vector3d
|
class: |
_getPlateLocal1Default(tagPlate)
staticmethod
Compute the default local axis-1 direction for a plate element.
For a triangle (nodes N1, N2, N3) axis 1 goes from N1 toward the
midpoint of side N2–N3. For a quad (nodes N1, N2, N3, N4) it goes
from the midpoint of side N1–N4 to the midpoint of side N2–N3.
This matches the Strand7 convention described in :meth:__init__.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagPlate
|
myInt64
|
Mesh tag of the plate element. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Normalised |
Vector3d
|
class: |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagPlate is not in the mesh or the element has an unsupported number of nodes. |
addMaterialToLibrary(idMaterial, modulus, poisson, name, density=0.0, thermal_expansion=0.0, conductivity=0.0, specific_heat=0.0)
Register a material in the model material library.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idMaterial
|
int
|
Unique integer identifier for the material. |
required |
modulus
|
float
|
Young's modulus [MPa]. |
required |
poisson
|
float
|
Poisson's ratio [-]. |
required |
name
|
str
|
Human-readable material name. |
required |
density
|
float
|
Mass density [kg/m³]. Default is 0.0. |
0.0
|
thermal_expansion
|
float
|
Coefficient of thermal expansion [1/°C]. Default is 0.0. |
0.0
|
conductivity
|
float
|
Thermal conductivity [kJ/s/m/°C]. Default is 0.0. |
0.0
|
specific_heat
|
float
|
Specific heat capacity [kJ/kg/°C]. Default is 0.0. |
0.0
|
addSectionShape(idShape, name, tp, dim=None)
Register a cross-section shape in the model section library.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idShape
|
int
|
Unique integer identifier for the section shape. Must not already exist in the library. |
required |
name
|
str
|
Human-readable name for the section. |
required |
tp
|
ShapesEnum
|
Cross-section type from :class: |
required |
dim
|
Optional[List[float]]
|
Dimensions of the cross-section as a list of floats.
For |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If |
assignFrameLocal2(tagFrame, axis)
Assign a custom local axis-2 direction to a single frame element.
The supplied axis is orthogonalised against the frame's local axis 3 (the longitudinal direction) before being stored, so the resulting axis-2 is always perpendicular to the frame axis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagFrame
|
myInt64
|
Mesh tag of the frame element. |
required |
axis
|
Vector3d
|
Desired local axis-2 direction as a :class: |
required |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagFrame is not an accepted integer type, if
axis is not a :class: |
assignFrameMaterial(tagFrame, idMaterial)
Assign a material to a single frame element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagFrame
|
myInt64
|
Mesh tag of the frame element. |
required |
idMaterial
|
int
|
Material id as registered in the material library. |
required |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
See :meth: |
assignFrameSectionShape(tagFrame, idShape)
Assign a cross-section shape to a single frame element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagFrame
|
myInt64
|
Mesh tag of the frame element. |
required |
idShape
|
int
|
Section shape id as registered in the section library. |
required |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagFrame is not an accepted integer type, if
idShape is not an |
assignFrameWinklerSupport(tagFrame, winkler_supports)
Assign a Winkler-type distributed support to a single frame element.
Unlike :meth:addMultiFrameWinklerSpring, which converts the subgrade
modulus into equivalent nodal springs, this method stores the support
parameters directly on the frame element for later export (e.g. to the
solver template). The support is treated as evenly distributed along
the frame length.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagFrame
|
myInt64
|
Mesh tag of the frame element. |
required |
winkler_supports
|
Tuple[float, float, bool]
|
A 3-tuple
|
required |
assignMultiElement(*args, **kwargs)
staticmethod
Public alias for _assignMultiElement.
assignMultiFrameLocal2(axis, tagsMacro=None, tagsFrames=None)
Assign a custom local axis-2 direction to multiple frame elements.
Exactly one of tagsMacro or tagsFrames must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh frame elements that belong to those macro-elements (geometric objects).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis
|
Vector3d
|
Desired local axis-2 direction as a :class: |
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element tags whose mesh frames are targeted. |
None
|
tagsFrames
|
Optional[List[myInt64]]
|
List of individual mesh frame element tags to target directly. |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both or neither of tagsMacro/tagsFrames are provided,
or if any individual assignment fails (see :meth: |
assignMultiFrameMaterial(idMaterial, tagsMacro=None, tagsFrames=None)
Assign a material to multiple frame elements.
Exactly one of tagsMacro or tagsFrames must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh frame elements that belong to those macro-elements (geometric objects).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idMaterial
|
int
|
Material id as registered in the material library. |
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element tags whose mesh frames are targeted. |
None
|
tagsFrames
|
Optional[List[myInt64]]
|
List of individual mesh frame element tags to target directly. |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both or neither of tagsMacro/tagsFrames are provided,
or if any individual assignment fails (see :meth: |
assignMultiFrameSectionShape(idShape, tagsMacro=None, tagsFrames=None)
Assign a cross-section shape to multiple frame elements.
Exactly one of tagsMacro or tagsFrames must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh frame elements that belong to those macro-elements (geometric objects).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idShape
|
int
|
Section shape id as registered in the section library. |
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element tags whose mesh frames are targeted. |
None
|
tagsFrames
|
Optional[List[myInt64]]
|
List of individual mesh frame element tags to target directly. |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both or neither of tagsMacro/tagsFrames are provided,
or if any individual assignment fails (see :meth: |
assignMultiFrameWinklerSupport(winkler_supports, tagsMacro=None, tagsFrames=None)
Assign a Winkler-type distributed support to multiple frame elements.
Exactly one of tagsMacro or tagsFrames must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh frame elements that belong to those macro-elements (geometric objects).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
winkler_supports
|
Tuple[float, float, bool]
|
A 3-tuple
|
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element tags whose mesh frames are targeted. |
None
|
tagsFrames
|
Optional[List[myInt64]]
|
List of individual mesh frame element tags to target directly. |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both or neither of tagsMacro/tagsFrames are provided. |
assignMultiPlateFaceSupport(support, tagsMacro=None, tagsPlate=None)
Assign a face support to multiple plate elements.
Exactly one of tagsMacro or tagsPlate must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh plate elements that belong to those macro-elements (geometric objects).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
support
|
PlateFaceSupport
|
A :class: |
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element tags whose mesh plates are targeted. |
None
|
tagsPlate
|
Optional[List[myInt64]]
|
List of individual mesh plate element tags to target directly. |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both or neither of tagsMacro/tagsPlate are provided,
or if any individual assignment fails (see :meth: |
assignMultiPlateLocal1(axis, tagsMacro=None, tagsPlate=None)
Assign a custom local axis-1 direction to multiple plate elements.
Exactly one of tagsMacro or tagsPlate must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh plate elements that belong to those macro-elements (geometric objects).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis
|
Vector3d
|
Desired local axis-1 direction as a :class: |
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element tags whose mesh plates are targeted. |
None
|
tagsPlate
|
Optional[List[myInt64]]
|
List of individual mesh plate element tags to target directly. |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both or neither of tagsMacro/tagsPlate are provided,
or if any individual assignment fails (see :meth: |
assignMultiPlateMaterial(idMaterial, tagsMacro=None, tagsPlate=None)
Assign a material to multiple plate elements.
Exactly one of tagsMacro or tagsPlate must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh plate elements that belong to those macro-elements (geometric objects).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idMaterial
|
int
|
Material id as registered in the material library. |
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element tags whose mesh plates are targeted. |
None
|
tagsPlate
|
Optional[List[myInt64]]
|
List of individual mesh plate element tags to target directly. |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both or neither of tagsMacro/tagsPlate are provided,
or if any individual assignment fails (see :meth: |
assignMultiPlateThicknesses(thicknesses, tagsMacro=None, tagsPlate=None)
Assign bending and membrane thicknesses to multiple plate elements.
Exactly one of tagsMacro or tagsPlate must be non-empty. When tagsMacro is provided, the assignment is applied to all mesh plate elements that belong to those macro-elements (geometric objects).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
thicknesses
|
tuple[float, float]
|
A 2-tuple |
required |
tagsMacro
|
Optional[List[myInt64]]
|
List of macro-element tags whose mesh plates are targeted. |
None
|
tagsPlate
|
Optional[List[myInt64]]
|
List of individual mesh plate element tags to target directly. |
None
|
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If both or neither of tagsMacro/tagsPlate are provided,
or if any individual assignment fails (see :meth: |
assignPlateFaceSupport(tagPlate, support)
Assign a face (Winkler-type) support to a single plate element.
A face support models a distributed elastic foundation acting on the plate surface, defined by normal and lateral subgrade stiffnesses.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagPlate
|
myInt64
|
Mesh tag of the plate element. |
required |
support
|
PlateFaceSupport
|
A :class: |
required |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagPlate is not an accepted integer type or if
support is not a :class: |
assignPlateLocal1(tagPlate, axis)
Assign a custom local axis-1 direction to a single plate element.
The supplied axis is projected onto the plate surface (i.e. orthogonalised against local axis 3) before being stored, so the resulting axis-1 always lies in the plane of the plate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagPlate
|
myInt64
|
Mesh tag of the plate element. |
required |
axis
|
Vector3d
|
Desired local axis-1 direction as a :class: |
required |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagPlate is not an accepted integer type, if
axis is not a :class: |
assignPlateMaterial(tagPlate, idMaterial)
Assign a material to a single plate element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagPlate
|
myInt64
|
Mesh tag of the plate element. |
required |
idMaterial
|
int
|
Material id as registered in the material library. |
required |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
See :meth: |
assignPlateThicknesses(tagPlate, thicknesses)
Assign bending and membrane thicknesses to a single plate element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagPlate
|
myInt64
|
Mesh tag of the plate element. |
required |
thicknesses
|
tuple[float, float]
|
A 2-tuple |
required |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagPlate is not an accepted integer type, if thicknesses is not a 2-tuple, or if either value is not a float. |
frameMaterial()
Return the material assignment for frame elements.
Returns:
| Type | Description |
|---|---|
Dict[myInt64, int]
|
A dict mapping each frame mesh element tag to its material id. |
frameSectionShape()
Return the section-shape assignment for frame elements.
Returns:
| Type | Description |
|---|---|
Dict[myInt64, int]
|
A dict mapping each frame mesh element tag to its section shape id. |
framesSupports()
Return the Winkler support assignment for frame elements.
Returns:
| Type | Description |
|---|---|
Dict[myInt64, Tuple[float, float, bool]]
|
A dict mapping each frame mesh element tag to its Winkler support |
Dict[myInt64, Tuple[float, float, bool]]
|
tuple |
getFrameLocal1(tagFrame)
Return the local axis-1 unit vector of a frame element.
Computed as local2 × local3, completing the right-hand local
coordinate system of the frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagFrame
|
myInt64
|
Mesh tag of the frame element. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Normalised |
Vector3d
|
class: |
getFrameLocal2(tagFrame)
Return the local axis-2 unit vector of a frame element.
Returns the user-assigned axis-2 if one has been set via
:meth:assignFrameLocal2; otherwise falls back to the default
computed from the frame orientation (see :meth:__getFrameLocal2Default).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagFrame
|
myInt64
|
Mesh tag of the frame element. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Normalised |
Vector3d
|
class: |
getFrameLocal3(tagFrame)
staticmethod
Return the local axis-3 (longitudinal) unit vector of a frame element.
Local axis 3 runs from the start node to the end node of the frame, following the same convention as Strand7.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagFrame
|
myInt64
|
Mesh tag of the frame element. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Normalised |
Vector3d
|
class: |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagFrame is not present in the mesh. |
getPlateLocal1(tagPlate)
Return the local axis-1 unit vector of a plate element.
Returns the user-assigned axis-1 if one has been set via
:meth:assignPlateLocal1; otherwise falls back to the default
computed from node positions (see :meth:__getPlateLocal1Default).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagPlate
|
myInt64
|
Mesh tag of the plate element. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Normalised |
Vector3d
|
class: |
getPlateLocal2(tagPlate)
Return the local axis-2 unit vector of a plate element.
Computed as local3 × local1, completing the right-hand local
coordinate system of the plate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagPlate
|
myInt64
|
Mesh tag of the plate element. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Normalised |
Vector3d
|
class: |
getPlateLocal3(tagPlate)
staticmethod
Return the local axis-3 (normal) unit vector of a plate element.
Local axis 3 is the outward normal to the plate surface, computed as the cross product of the vectors (N1→N2) × (N2→N3), following the same convention as Strand7.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tagPlate
|
myInt64
|
Mesh tag of the plate element. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Normalised |
Vector3d
|
class: |
Raises:
| Type | Description |
|---|---|
EXAExceptions
|
If tagPlate is not present in the mesh. |
plateMaterial()
Return the material assignment for plate elements.
Returns:
| Type | Description |
|---|---|
Dict[myInt64, int]
|
A dict mapping each plate mesh element tag to its material id. |
plateThicknesses()
Return the thickness assignment for plate elements.
Returns:
| Type | Description |
|---|---|
Dict[myInt64, Tuple[float, float]]
|
A dict mapping each plate mesh element tag to a 2-tuple |
Dict[myInt64, Tuple[float, float]]
|
|
platesFaceSupports()
Return the face support assignment for plate elements.
Returns:
| Type | Description |
|---|---|
Dict[myInt64, PlateFaceSupport]
|
A dict mapping each plate mesh element tag to its PlateFaceSupport. |
sectionMaterials()
Return the material library.
Returns:
| Type | Description |
|---|---|
Dict[int, FEMaterial]
|
A dict mapping each material id to its :class: |
sectionShapes()
Return the section-shape library.
Returns:
| Type | Description |
|---|---|
Dict[int, SectionShape]
|
A dict mapping each section shape id to its :class: |