pyHarm.CoordinateSystem

Classes

CoordinateSystem

Class that represents a coordinate system. It allows for generating local coordinate systems

GlobalCoordinateSystem

Subclass of CoordinateSystem that allows defining global coordinate systems.

Functions

generateCoordinateSystem(dirs)

Generates a CoordinateSystem object based on the provided directions.

Module Contents

pyHarm.CoordinateSystem.generateCoordinateSystem(dirs: list[list[float]])

Generates a CoordinateSystem object based on the provided directions.

Parameters:

dirs (list[list[float]]) – A list of lists containing the directions relative to the global coordinate system.

Returns:

A CoordinateSystem object.

Return type:

CoordinateSystem

class pyHarm.CoordinateSystem.CoordinateSystem(dirs: list[list[float]])

Class that represents a coordinate system. It allows for generating local coordinate systems to be attached to elements or substructures and transfering their residuals and Jacobians to the global coordinate system.

Parameters:

dirs (list[list[float]]) – A list of lists containing the directions relative to the global coordinate system.

dirs
n_dirs
n_component
checkOrthonormal()

Checks if the provided coordinate system is orthonormal.

Raises:

ValueError – If the coordinate system is not orthonormal.

getTM(nh: int | list[int], component: list[int]) numpy.ndarray

Generates a transform matrix of size (ncompo, ncompo, n_dirs).

Parameters:
  • nh (int) – Number of harmonics.

  • component (list[int]) – The components of the transform matrix.

Returns:

The generated transform matrix.

Return type:

np.ndarray

class pyHarm.CoordinateSystem.GlobalCoordinateSystem(ndirs: int)

Bases: CoordinateSystem

Subclass of CoordinateSystem that allows defining global coordinate systems. The initialization is modified for ease of instantiation.

Parameters:

ndirs (int) – The number of directions in the global coordinate system.

dirs
n_dirs
n_component