GeneralDisplacement

class compas_fea2.problem.GeneralDisplacement[source]

Bases: FEAData, Frameable

General imposed displacement.

Represents imposed displacements or restraints on degrees of freedom in a local coordinate frame. Supports translation and rotation components.

Parameters:
x, y, zbool, optional

Translational displacement restraints along local x, y, z axes.

xx, yy, zzbool, optional

Rotational displacement restraints about local x, y, z axes.

frameFrame or None, optional

Local coordinate frame for the displacement.

Notes

This class only handles boolean restraint flags and an optional local frame. There are no numeric magnitudes to unit-normalize here, so no units decorator is applied.

Methods

global_constraint_equations

Return linear constraint equations in global translational DOFs implied by local restraints.

Inherited Methods

ToString

Converts the instance to a string.

clear_frame

Clear the local frame, reverting to GLOBAL_FRAME.

copy

Make an independent copy of the data object.

direction_cosines

Return local axes expressed as global vectors (x, y, z).

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

is_axis_aligned

Return True if local frame coincides with GLOBAL frame within tolerance.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_global_point

Convert a local point to the global frame.

to_global_vector

Convert a local vector to the global frame.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

to_local_point

Convert a global point to the local frame.

to_local_vector

Convert a global vector to the local frame.

transform_to

Get the transformation from this object's local frame to another frame.

validate_data

Validate the data against the object's data schema.