The state of lumped points corresponds to positions and rotations. More...
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 pointField & | points () const |
The points corresponding to mass centres. More... | |
const vectorField & | angles () const |
The orientation of the points (mass centres) More... | |
const tensorField & | rotations () 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< inputFormatType > | formatNames |
Names for the input format types. More... | |
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 ...
Definition at line 111 of file lumpedPointState.H.
|
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.
lumpedPointState | ( | ) |
Construct null.
Definition at line 105 of file lumpedPointState.C.
lumpedPointState | ( | const lumpedPointState & | rhs | ) |
Copy constructor.
Definition at line 115 of file lumpedPointState.C.
lumpedPointState | ( | const pointField & | pts | ) |
Construct from points with zero-rotation.
Definition at line 125 of file lumpedPointState.C.
lumpedPointState | ( | tmp< pointField > & | pts | ) |
Construct from points with zero-rotation.
Definition at line 135 of file lumpedPointState.C.
lumpedPointState | ( | const dictionary & | dict | ) |
|
virtual |
Destructor.
Definition at line 159 of file lumpedPointState.C.
References Foam::deleteDemandDrivenData().
|
inline |
Has positions and consistent number of rotations?
Definition at line 28 of file lumpedPointStateI.H.
|
inline |
If no points were specified.
Definition at line 34 of file lumpedPointStateI.H.
|
inline |
The number of points.
Definition at line 40 of file lumpedPointStateI.H.
|
inline |
The points corresponding to mass centres.
Definition at line 46 of file lumpedPointStateI.H.
Referenced by lumpedPointMovement::displacePoints().
|
inline |
The orientation of the points (mass centres)
Definition at line 52 of file lumpedPointStateI.H.
|
inline |
The local-to-global transformation for each point.
Definition at line 58 of file lumpedPointStateI.H.
Referenced by lumpedPointMovement::displacePoints().
void scalePoints | ( | const scalar | scaleFactor | ) |
Scale points by given factor.
Zero and negative values are ignored.
Definition at line 178 of file lumpedPointState.C.
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().
Read input as dictionary content.
Definition at line 256 of file lumpedPointState.C.
References dict.
Referenced by lumpedPointMovement::readState().
Output as dictionary content.
Definition at line 265 of file lumpedPointState.C.
void writeDict | ( | Ostream & | os | ) | const |
Output as dictionary content.
Definition at line 272 of file lumpedPointState.C.
References quaternion::eulerOrderNames, and Ostream::writeEntry().
Read input as plain content.
Definition at line 216 of file lumpedPointState.C.
References Foam::BitOps::count(), Foam::deleteDemandDrivenData(), forAll, and ISstream::getLine().
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().
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.
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().
void operator= | ( | const lumpedPointState & | rhs | ) |
Assignment operator.
Definition at line 167 of file lumpedPointState.C.
References Foam::deleteDemandDrivenData().
|
static |
Names for the input format types.
Definition at line 125 of file lumpedPointState.H.
Referenced by lumpedPointMovement::readDict().