The state of lumped points corresponds to positions and rotations. More...
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 pointField & | points () const |
const vectorField & | angles () const |
const tensorField & | rotations () 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< inputFormatType > | formatNames |
static bool | visUnused = true |
static scalar | visLength = 0.1 |
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 ...
Definition at line 108 of file lumpedPointState.H.
|
strong |
Enumerator | |
---|---|
PLAIN | "plain" is a simple ASCII format |
DICTIONARY | "dictionary" is the OpenFOAM dictionary format |
Definition at line 115 of file lumpedPointState.H.
lumpedPointState | ( | ) |
Definition at line 108 of file lumpedPointState.C.
lumpedPointState | ( | const lumpedPointState & | rhs | ) |
Definition at line 118 of file lumpedPointState.C.
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.
|
explicit |
Definition at line 161 of file lumpedPointState.C.
|
explicit |
Definition at line 176 of file lumpedPointState.C.
|
explicit |
Definition at line 191 of file lumpedPointState.C.
References dict.
|
virtualdefault |
|
inline |
Definition at line 21 of file lumpedPointStateI.H.
|
inline |
Definition at line 27 of file lumpedPointStateI.H.
Referenced by lumpedPointMovement::empty().
|
inline |
Definition at line 33 of file lumpedPointStateI.H.
Referenced by lumpedPointMovement::writeStateVTP().
|
inline |
Definition at line 39 of file lumpedPointStateI.H.
Referenced by lumpedPointMovement::pointsDisplacement(), lumpedPointMovement::pointsPosition(), and lumpedPointMovement::writeForcesAndMomentsVTP().
|
inline |
Definition at line 45 of file lumpedPointStateI.H.
|
inline |
Definition at line 51 of file lumpedPointStateI.H.
Referenced by lumpedPointMovement::pointsDisplacement(), and lumpedPointMovement::pointsPosition().
void scalePoints | ( | const scalar | scaleFactor | ) |
Definition at line 229 of file lumpedPointState.C.
Referenced by lumpedPointMovement::scalePoints().
|
inline |
Definition at line 63 of file lumpedPointStateI.H.
|
inline |
Definition at line 69 of file lumpedPointStateI.H.
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().
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().
Definition at line 326 of file lumpedPointState.C.
References os().
void writeDict | ( | Ostream & | os | ) | const |
Definition at line 333 of file lumpedPointState.C.
References quaternion::eulerOrderNames, os(), and Ostream::writeEntry().
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().
void writePlain | ( | Ostream & | os | ) | const |
Definition at line 348 of file lumpedPointState.C.
References forAll, os(), and p.
bool readData | ( | const inputFormatType | fmt, |
const fileName & | file, | ||
const quaternion::eulerOrder | rotOrder = quaternion::eulerOrder::ZXZ , |
||
const bool | degrees = false |
||
) |
Definition at line 375 of file lumpedPointState.C.
References UPstream::commsStruct::above(), UPstream::commsStruct::below(), forAllReverse, UPstream::linearCommunication(), UPstream::master(), UPstream::msgType(), UPstream::myProcNo(), UPstream::nProcs(), UPstream::nProcsSimpleSum, UPstream::parRun(), Pstream::scatter(), UPstream::scheduled, UPstream::treeCommunication(), and UPstream::worldComm.
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().
void operator= | ( | const lumpedPointState & | rhs | ) |
Definition at line 209 of file lumpedPointState.C.
void operator+= | ( | const point & | origin | ) |
Definition at line 220 of file lumpedPointState.C.
References p.
|
static |
Definition at line 125 of file lumpedPointState.H.
Referenced by lumpedPointMovement::readDict().
|
static |
Definition at line 164 of file lumpedPointState.H.
|
static |
Definition at line 167 of file lumpedPointState.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.