Public Types | Public Member Functions | Static Public Attributes | List of all members
lumpedPointState Class Reference

The state of lumped points corresponds to positions and rotations. More...

Collaboration diagram for lumpedPointState:
Collaboration graph
[legend]

Public Types

enum  inputFormatType { PLAIN, DICTIONARY }
 

Public Member Functions

 lumpedPointState ()
 
 lumpedPointState (const lumpedPointState &rhs)
 
 lumpedPointState (const pointField &pts, const vectorField &ang, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false)
 
 lumpedPointState (const pointField &pts, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false)
 
 lumpedPointState (tmp< pointField > &pts, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false)
 
 lumpedPointState (const dictionary &dict, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false)
 
virtual ~lumpedPointState ()=default
 
bool valid () const
 
bool empty () const
 
label size () const
 
const pointFieldpoints () const
 
const vectorFieldangles () const
 
const tensorFieldrotations () const
 
void scalePoints (const scalar scaleFactor)
 
quaternion::eulerOrder rotationOrder () const
 
bool degrees () const
 
void relax (const scalar alpha, const lumpedPointState &prev)
 
bool readData (Istream &is, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false)
 
bool writeData (Ostream &os) const
 
void writeDict (Ostream &os) const
 
bool readPlain (Istream &is, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false)
 
void writePlain (Ostream &os) const
 
bool readData (const inputFormatType fmt, const fileName &file, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false)
 
void writeVTP (const fileName &outputFile, const labelListList &lines=labelListList(), const labelList &pointIds=labelList::null()) const
 
void operator= (const lumpedPointState &rhs)
 
void operator+= (const point &origin)
 

Static Public Attributes

static const Enum< inputFormatTypeformatNames
 
static bool visUnused = true
 
static scalar visLength = 0.1
 

Detailed Description

The state of lumped points corresponds to positions and rotations.

This class encapsulates the response from the external application and serves as the entry point for applying relaxation, sub-stepping etc.


Dictionary input format

Property Description Required Default
points List of points yes
angles List of Euler rotation angles yes
rotationOrder The Euler-angle rotation order no zxz
degrees Rotation angles in degrees no false


Plain input format. Blank and comment lines starting with a '#' character are ignored. The angles are always in radians.

    NumPoints
    x0 y0 z0 eulerz0 eulerx'0 eulerz''0
    x1 y1 z1 eulerz1 eulerx'1 eulerz''1
    ...
See also
Foam::coordinateRotations::euler, Foam::quaternion
Source files

Definition at line 108 of file lumpedPointState.H.

Member Enumeration Documentation

◆ inputFormatType

enum inputFormatType
strong
Enumerator
PLAIN 

"plain" is a simple ASCII format

DICTIONARY 

"dictionary" is the OpenFOAM dictionary format

Definition at line 115 of file lumpedPointState.H.

Constructor & Destructor Documentation

◆ lumpedPointState() [1/6]

Definition at line 108 of file lumpedPointState.C.

◆ lumpedPointState() [2/6]

Definition at line 118 of file lumpedPointState.C.

◆ lumpedPointState() [3/6]

lumpedPointState ( const pointField pts,
const vectorField ang,
const quaternion::eulerOrder  rotOrder = quaternion::eulerOrder::ZXZ,
const bool  degrees = false 
)

Definition at line 129 of file lumpedPointState.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, WarningInFunction, and Foam::Zero.

Here is the call graph for this function:

◆ lumpedPointState() [4/6]

lumpedPointState ( const pointField pts,
const quaternion::eulerOrder  rotOrder = quaternion::eulerOrder::ZXZ,
const bool  degrees = false 
)
explicit

Definition at line 161 of file lumpedPointState.C.

◆ lumpedPointState() [5/6]

lumpedPointState ( tmp< pointField > &  pts,
const quaternion::eulerOrder  rotOrder = quaternion::eulerOrder::ZXZ,
const bool  degrees = false 
)
explicit

Definition at line 176 of file lumpedPointState.C.

◆ lumpedPointState() [6/6]

lumpedPointState ( const dictionary dict,
const quaternion::eulerOrder  rotOrder = quaternion::eulerOrder::ZXZ,
const bool  degrees = false 
)
explicit

Definition at line 191 of file lumpedPointState.C.

References dict.

◆ ~lumpedPointState()

virtual ~lumpedPointState ( )
virtualdefault

Member Function Documentation

◆ valid()

bool valid ( ) const
inline

Definition at line 21 of file lumpedPointStateI.H.

◆ empty()

bool empty ( ) const
inline

Definition at line 27 of file lumpedPointStateI.H.

Referenced by lumpedPointMovement::empty().

Here is the caller graph for this function:

◆ size()

Foam::label size ( ) const
inline

Definition at line 33 of file lumpedPointStateI.H.

Referenced by lumpedPointMovement::writeStateVTP().

Here is the caller graph for this function:

◆ points()

const Foam::pointField & points ( ) const
inline

Definition at line 39 of file lumpedPointStateI.H.

Referenced by lumpedPointMovement::pointsDisplacement(), lumpedPointMovement::pointsPosition(), and lumpedPointMovement::writeForcesAndMomentsVTP().

Here is the caller graph for this function:

◆ angles()

const Foam::vectorField & angles ( ) const
inline

Definition at line 45 of file lumpedPointStateI.H.

◆ rotations()

const Foam::tensorField & rotations ( ) const
inline

Definition at line 51 of file lumpedPointStateI.H.

Referenced by lumpedPointMovement::pointsDisplacement(), and lumpedPointMovement::pointsPosition().

Here is the caller graph for this function:

◆ scalePoints()

void scalePoints ( const scalar  scaleFactor)

Definition at line 229 of file lumpedPointState.C.

Referenced by lumpedPointMovement::scalePoints().

Here is the caller graph for this function:

◆ rotationOrder()

Foam::quaternion::eulerOrder rotationOrder ( ) const
inline

Definition at line 63 of file lumpedPointStateI.H.

◆ degrees()

bool degrees ( ) const
inline

Definition at line 69 of file lumpedPointStateI.H.

◆ relax()

void relax ( const scalar  alpha,
const lumpedPointState prev 
)

Definition at line 239 of file lumpedPointState.C.

References Foam::constant::atomic::alpha, Foam::degToRad(), and Foam::radToDeg().

Here is the call graph for this function:

◆ readData() [1/2]

bool readData ( Istream is,
const quaternion::eulerOrder  rotOrder = quaternion::eulerOrder::ZXZ,
const bool  degrees = false 
)

Definition at line 313 of file lumpedPointState.C.

References dict.

Referenced by lumpedPointMovement::readState().

Here is the caller graph for this function:

◆ writeData()

bool writeData ( Ostream os) const

Definition at line 326 of file lumpedPointState.C.

References os().

Here is the call graph for this function:

◆ writeDict()

void writeDict ( Ostream os) const

Definition at line 333 of file lumpedPointState.C.

References quaternion::eulerOrderNames, os(), and Ostream::writeEntry().

Here is the call graph for this function:

◆ readPlain()

bool readPlain ( Istream is,
const quaternion::eulerOrder  rotOrder = quaternion::eulerOrder::ZXZ,
const bool  degrees = false 
)

Definition at line 268 of file lumpedPointState.C.

References Foam::BitOps::count(), forAll, and ISstream::getLine().

Here is the call graph for this function:

◆ writePlain()

void writePlain ( Ostream os) const

Definition at line 348 of file lumpedPointState.C.

References forAll, os(), and p.

Here is the call graph for this function:

◆ readData() [2/2]

bool readData ( const inputFormatType  fmt,
const fileName file,
const quaternion::eulerOrder  rotOrder = quaternion::eulerOrder::ZXZ,
const bool  degrees = false 
)

◆ writeVTP()

void writeVTP ( const fileName outputFile,
const labelListList lines = labelListList(),
const labelList pointIds = labelList::null() 
) const

Definition at line 29 of file lumpedPointStateWriter.C.

References Tensor::cx(), Tensor::cy(), forAll, format(), Foam::vtk::newFormatter(), nPoints, os(), OFstream::stdStream(), Foam::vtk::write(), Foam::vtk::writeIdentity(), and Foam::vtk::writeList().

Referenced by lumpedPointMovement::writeStateVTP().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const lumpedPointState rhs)

Definition at line 209 of file lumpedPointState.C.

◆ operator+=()

void operator+= ( const point origin)

Definition at line 220 of file lumpedPointState.C.

References p.

Member Data Documentation

◆ formatNames

Definition at line 125 of file lumpedPointState.H.

Referenced by lumpedPointMovement::readDict().

◆ visUnused

bool visUnused = true
static

Definition at line 164 of file lumpedPointState.H.

◆ visLength

Foam::scalar visLength = 0.1
static

Definition at line 167 of file lumpedPointState.H.


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