lumpedPointState Class Reference

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

Collaboration diagram for lumpedPointState:
[legend]

Public Types

enum  inputFormatType { PLAIN, DICTIONARY }
 Input format types. More...
 

Public Member Functions

 lumpedPointState ()
 Construct null. More...
 
 lumpedPointState (const lumpedPointState &rhs)
 Copy constructor. More...
 
 lumpedPointState (const pointField &pts)
 Construct from points with zero-rotation. More...
 
 lumpedPointState (tmp< pointField > &pts)
 Construct from points with zero-rotation. More...
 
 lumpedPointState (const dictionary &dict)
 Construct from dictionary. More...
 
virtual ~lumpedPointState ()
 Destructor. More...
 
bool valid () const
 Has positions and consistent number of rotations? More...
 
bool empty () const
 If no points were specified. More...
 
label size () const
 The number of points. More...
 
const pointFieldpoints () const
 The points corresponding to mass centres. More...
 
const vectorFieldangles () const
 The orientation of the points (mass centres) More...
 
const tensorFieldrotations () const
 The local-to-global transformation for each point. More...
 
void scalePoints (const scalar scaleFactor)
 Scale points by given factor. More...
 
void relax (const scalar alpha, const lumpedPointState &prev)
 Relax the state. More...
 
bool readData (Istream &is)
 Read input as dictionary content. More...
 
bool writeData (Ostream &os) const
 Output as dictionary content. More...
 
void writeDict (Ostream &os) const
 Output as dictionary content. More...
 
bool readPlain (Istream &is)
 Read input as plain content. More...
 
void writePlain (Ostream &os) const
 Output as plain content. More...
 
bool readData (const inputFormatType &fmt, const fileName &file)
 Read input from file (master process only) using specified format. More...
 
void writeVTP (const fileName &outputFile, const vector &axis) const
 Output as VTK file for debugging/visualization. More...
 
void operator= (const lumpedPointState &rhs)
 Assignment operator. More...
 

Static Public Attributes

static const Enum< inputFormatTypeformatNames
 Names for the input format types. More...
 

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
order 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 111 of file lumpedPointState.H.

Member Enumeration Documentation

◆ inputFormatType

enum inputFormatType
strong

Input format types.

Enumerator
PLAIN 

"plain" is a simple ASCII format

DICTIONARY 

"dictionary" is the OpenFOAM dictionary format

Definition at line 116 of file lumpedPointState.H.

Constructor & Destructor Documentation

◆ lumpedPointState() [1/5]

Construct null.

Definition at line 105 of file lumpedPointState.C.

◆ lumpedPointState() [2/5]

Copy constructor.

Definition at line 115 of file lumpedPointState.C.

◆ lumpedPointState() [3/5]

lumpedPointState ( const pointField pts)

Construct from points with zero-rotation.

Definition at line 125 of file lumpedPointState.C.

◆ lumpedPointState() [4/5]

Construct from points with zero-rotation.

Definition at line 135 of file lumpedPointState.C.

◆ lumpedPointState() [5/5]

lumpedPointState ( const dictionary dict)

Construct from dictionary.

Definition at line 145 of file lumpedPointState.C.

References dict.

◆ ~lumpedPointState()

~lumpedPointState ( )
virtual

Destructor.

Definition at line 159 of file lumpedPointState.C.

References Foam::deleteDemandDrivenData().

Here is the call graph for this function:

Member Function Documentation

◆ valid()

bool valid ( ) const
inline

Has positions and consistent number of rotations?

Definition at line 28 of file lumpedPointStateI.H.

◆ empty()

bool empty ( ) const
inline

If no points were specified.

Definition at line 34 of file lumpedPointStateI.H.

◆ size()

Foam::label size ( ) const
inline

The number of points.

Definition at line 40 of file lumpedPointStateI.H.

◆ points()

const Foam::pointField & points ( ) const
inline

The points corresponding to mass centres.

Definition at line 46 of file lumpedPointStateI.H.

Referenced by lumpedPointMovement::displacePoints().

Here is the caller graph for this function:

◆ angles()

const Foam::vectorField & angles ( ) const
inline

The orientation of the points (mass centres)

Definition at line 52 of file lumpedPointStateI.H.

◆ rotations()

const Foam::tensorField & rotations ( ) const
inline

The local-to-global transformation for each point.

Definition at line 58 of file lumpedPointStateI.H.

Referenced by lumpedPointMovement::displacePoints().

Here is the caller graph for this function:

◆ scalePoints()

void scalePoints ( const scalar  scaleFactor)

Scale points by given factor.

Zero and negative values are ignored.

Definition at line 178 of file lumpedPointState.C.

◆ relax()

void relax ( const scalar  alpha,
const lumpedPointState prev 
)

Relax the state.

alpha = 1 : no relaxation alpha < 1 : relaxation alpha = 0 : do nothing

Definition at line 188 of file lumpedPointState.C.

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

Here is the call graph for this function:

◆ readData() [1/2]

bool readData ( Istream is)

Read input as dictionary content.

Definition at line 256 of file lumpedPointState.C.

References dict.

Referenced by lumpedPointMovement::readState().

Here is the caller graph for this function:

◆ writeData()

bool writeData ( Ostream os) const

Output as dictionary content.

Definition at line 265 of file lumpedPointState.C.

◆ writeDict()

void writeDict ( Ostream os) const

Output as dictionary content.

Definition at line 272 of file lumpedPointState.C.

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

Here is the call graph for this function:

◆ readPlain()

bool readPlain ( Istream is)

Read input as plain content.

Definition at line 216 of file lumpedPointState.C.

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

Here is the call graph for this function:

◆ writePlain()

void writePlain ( Ostream os) const

Output as plain content.

Definition at line 287 of file lumpedPointState.C.

References forAll, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ readData() [2/2]

bool readData ( const inputFormatType fmt,
const fileName file 
)

Read input from file (master process only) using specified format.

Definition at line 314 of file lumpedPointState.C.

References UPstream::commsStruct::above(), UPstream::commsStruct::below(), Foam::deleteDemandDrivenData(), forAllReverse, UPstream::linearCommunication(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), UPstream::nProcs(), UPstream::nProcsSimpleSum, UPstream::parRun(), Pstream::scatter(), UPstream::scheduled, UPstream::treeCommunication(), and UPstream::worldComm.

Here is the call graph for this function:

◆ writeVTP()

void writeVTP ( const fileName outputFile,
const vector axis 
) const

Output as VTK file for debugging/visualization.

The points are joined as lines, the rotation is visualized by planes, write as VTK PolyData format.

Definition at line 50 of file lumpedPointStateWriter.C.

References forAll, format(), Foam::vtk::newFormatter(), nPoints, standardCorners, OFstream::stdStream(), coordinateSystem::transform(), 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)

Assignment operator.

Definition at line 167 of file lumpedPointState.C.

References Foam::deleteDemandDrivenData().

Here is the call graph for this function:

Member Data Documentation

◆ formatNames

Names for the input format types.

Definition at line 125 of file lumpedPointState.H.

Referenced by lumpedPointMovement::readDict().


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