capytaine.bodies.dofs module

class capytaine.bodies.dofs.AbstractDof[source]

Bases: ABC

abstractmethod evaluate_gradient_of_motion(mesh)[source]
abstractmethod evaluate_motion(mesh)[source]
class capytaine.bodies.dofs.DofOnSubmesh(dof: AbstractDof, faces)[source]

Bases: AbstractDof

evaluate_gradient_of_motion(mesh) array[source]
evaluate_motion(mesh)[source]
class capytaine.bodies.dofs.RotationDof(rotation_center, direction)[source]

Bases: AbstractDof

evaluate_gradient_of_motion(mesh) array[source]
evaluate_motion(mesh) array[source]
class capytaine.bodies.dofs.TranslationDof(direction)[source]

Bases: AbstractDof

evaluate_gradient_of_motion(mesh) array[source]
evaluate_motion(mesh) array[source]
capytaine.bodies.dofs.add_dofs_labels_to_matrix(dof_names, matrix)[source]

Helper function turning a bare matrix into a matrix labelled by the name of the dofs, to be used for instance for the computation of RAO.

capytaine.bodies.dofs.add_dofs_labels_to_vector(dof_names, vector)[source]

Helper function turning a bare vector into a vector labelled by the name of the dofs, to be used for instance for the computation of RAO.

capytaine.bodies.dofs.is_rigid_body_dof(dof)[source]
capytaine.bodies.dofs.normalize_name(name)[source]
capytaine.bodies.dofs.rigid_body_dofs(only=None, rotation_center=None)[source]

Pass this to FloatingBody initializer to give it rigid body dofs.

Parameters:
  • only (sequence of str, optional) – list of the name of the rigid body dofs to be included. By default: all six of them

  • rotation_center (np.array, optional) – the center for the definition of the rotations