walberla::mesa_pd::data::BaseShape Class Reference

Detailed Description

Base class of all shape types.

This class contains the basic properties which are inherent for all shapes. It also stores the shapeType identifier which allows to cast to the actual shape.

#include <BaseShape.h>

+ Inheritance diagram for walberla::mesa_pd::data::BaseShape:

Public Types

using ShapeTypeT = int
 

Public Member Functions

 BaseShape ()=default
 
 BaseShape (const int shapeType)
 
virtual ~BaseShape ()=default
 
virtual void updateMassAndInertia (const real_t density)
 Updates mass and inertia according to the actual shape. More...
 
virtual real_t getVolume () const
 
const real_tgetMass () const
 
const real_tgetInvMass () const
 
const Mat3getInertiaBF () const
 
const Mat3getInvInertiaBF () const
 
const ShapeTypeTgetShapeType () const
 
virtual Vec3 support (const Vec3 &) const
 
virtual void pack (walberla::mpi::SendBuffer &buf)
 
virtual void unpack (walberla::mpi::RecvBuffer &buf)
 

Static Public Attributes

static const int INVALID_SHAPE = -1
 Unique invalid shape type identifier. More...
 

Protected Attributes

real_t mass_ = real_t(0)
 mass More...
 
real_t invMass_ = real_t(0)
 inverse mass More...
 
Mat3 inertiaBF_ = Mat3(real_t(0))
 inertia matrix in the body frame More...
 
Mat3 invInertiaBF_ = Mat3(real_t(0))
 inverse inertia matrix in the body frame More...
 
ShapeTypeT shapeType_ = INVALID_SHAPE
 

Member Typedef Documentation

◆ ShapeTypeT

Constructor & Destructor Documentation

◆ BaseShape() [1/2]

walberla::mesa_pd::data::BaseShape::BaseShape ( )
default

◆ BaseShape() [2/2]

walberla::mesa_pd::data::BaseShape::BaseShape ( const int  shapeType)
inlineexplicit

◆ ~BaseShape()

virtual walberla::mesa_pd::data::BaseShape::~BaseShape ( )
virtualdefault

Member Function Documentation

◆ getInertiaBF()

const Mat3& walberla::mesa_pd::data::BaseShape::getInertiaBF ( ) const
inline

◆ getInvInertiaBF()

const Mat3& walberla::mesa_pd::data::BaseShape::getInvInertiaBF ( ) const
inline

◆ getInvMass()

const real_t& walberla::mesa_pd::data::BaseShape::getInvMass ( ) const
inline

◆ getMass()

const real_t& walberla::mesa_pd::data::BaseShape::getMass ( ) const
inline

◆ getShapeType()

const ShapeTypeT& walberla::mesa_pd::data::BaseShape::getShapeType ( ) const
inline

◆ getVolume()

◆ pack()

◆ support()

virtual Vec3 walberla::mesa_pd::data::BaseShape::support ( const Vec3 ) const
inlinevirtual

◆ unpack()

◆ updateMassAndInertia()

void walberla::mesa_pd::data::BaseShape::updateMassAndInertia ( const real_t  density)
inlinevirtual

Member Data Documentation

◆ inertiaBF_

Mat3 walberla::mesa_pd::data::BaseShape::inertiaBF_ = Mat3(real_t(0))
protected

inertia matrix in the body frame

◆ invInertiaBF_

Mat3 walberla::mesa_pd::data::BaseShape::invInertiaBF_ = Mat3(real_t(0))
protected

inverse inertia matrix in the body frame

◆ invMass_

real_t walberla::mesa_pd::data::BaseShape::invMass_ = real_t(0)
protected

inverse mass

◆ mass_

real_t walberla::mesa_pd::data::BaseShape::mass_ = real_t(0)
protected

mass


The documentation for this class was generated from the following file: