The state of lumped points corresponds to positions and rotations. More...
#include <lumpedPointState.H>

Public Types | |
| enum class | inputFormatType { PLAIN , DICTIONARY } |
| Input format types. More... | |
Public Member Functions | |
| lumpedPointState () | |
| Default construct. | |
| lumpedPointState (const lumpedPointState &rhs) | |
| Copy construct. | |
| lumpedPointState (const pointField &pts, const vectorField &ang, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false) | |
| Copy construct from points and angles. | |
| lumpedPointState (const pointField &pts, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false) | |
| Copy construct from points with zero-rotation. | |
| lumpedPointState (tmp< pointField > &pts, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false) | |
| Construct from points with zero-rotation. | |
| lumpedPointState (const dictionary &dict, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false) | |
| Construct from dictionary. | |
| virtual | ~lumpedPointState ()=default |
| Destructor. | |
| bool | good () const |
| Has positions and consistent number of rotations? | |
| bool | empty () const |
| If no points were specified. | |
| label | size () const |
| The number of points. | |
| bool | valid () const |
| Same as good(). | |
| const pointField & | points () const |
| The points corresponding to mass centres. | |
| const vectorField & | angles () const |
| The orientation of the points (mass centres). | |
| const tensorField & | rotations () const |
| The local-to-global transformation for each point. | |
| void | scalePoints (const scalar scaleFactor) |
| Scale points by given factor. | |
| quaternion::eulerOrder | rotationOrder () const |
| The Euler-angle rotation order. | |
| bool | degrees () const |
| Rotation angles in degrees. | |
| void | relax (const scalar alpha, const lumpedPointState &prev) |
| Relax the state. | |
| bool | readData (Istream &is, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false) |
| Read input as dictionary content. | |
| bool | writeData (Ostream &os) const |
| Output as dictionary content. | |
| void | writeDict (Ostream &os) const |
| Output as dictionary content. | |
| bool | readPlain (Istream &is, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false) |
| Read input as plain content. | |
| void | writePlain (Ostream &os) const |
| Output as plain content. | |
| bool | readData (const inputFormatType fmt, const fileName &file, const quaternion::eulerOrder rotOrder=quaternion::eulerOrder::ZXZ, const bool degrees=false) |
| Read input from file (master process only) using specified format. | |
| void | writeVTP (const fileName &outputFile, const labelListList &lines=labelListList(), const labelList &pointIds=labelList::null()) const |
| Output points/rotations as VTK file for debugging/visualization. | |
| void | operator= (const lumpedPointState &rhs) |
| Assignment operator. | |
| void | operator+= (const point &origin) |
| Shift points by specified origin. | |
Static Public Attributes | |
| static const Enum< inputFormatType > | formatNames |
| Names for the input format types. | |
| static bool | visUnused = true |
| Enable/disable visualization of unused points. | |
| static scalar | visLength = 0.1 |
| The length for visualization triangles. | |
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 104 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 113 of file lumpedPointState.H.
| lumpedPointState | ( | ) |
Default construct.
Definition at line 108 of file lumpedPointState.C.
Referenced by lumpedPointState(), operator=(), and relax().

| lumpedPointState | ( | const lumpedPointState & | rhs | ) |
Copy construct.
Definition at line 118 of file lumpedPointState.C.
References lumpedPointState(), and Foam::rhs().

| lumpedPointState | ( | const pointField & | pts, |
| const vectorField & | ang, | ||
| const quaternion::eulerOrder | rotOrder = quaternion::eulerOrder::ZXZ, | ||
| const bool | degrees = false ) |
Copy construct from points and angles.
Definition at line 128 of file lumpedPointState.C.
References degrees(), and pts.

|
explicit |
Copy construct from points with zero-rotation.
Definition at line 160 of file lumpedPointState.C.
References degrees(), pts, size(), and Foam::Zero.

|
explicit |
Construct from points with zero-rotation.
Definition at line 175 of file lumpedPointState.C.
References degrees(), pts, size(), and Foam::Zero.

|
explicit |
Construct from dictionary.
Definition at line 190 of file lumpedPointState.C.
References degrees(), and dict.

|
virtualdefault |
Destructor.
|
inline |
Has positions and consistent number of rotations?
Definition at line 21 of file lumpedPointStateI.H.
Referenced by valid().

|
inline |
If no points were specified.
Definition at line 27 of file lumpedPointStateI.H.
|
inline |
The number of points.
Definition at line 33 of file lumpedPointStateI.H.
Referenced by lumpedPointState(), and lumpedPointState().

|
inline |
Same as good().
Definition at line 264 of file lumpedPointState.H.
References good().

|
inline |
The points corresponding to mass centres.
Definition at line 39 of file lumpedPointStateI.H.
|
inline |
The orientation of the points (mass centres).
Definition at line 45 of file lumpedPointStateI.H.
|
inline |
The local-to-global transformation for each point.
Definition at line 51 of file lumpedPointStateI.H.
Referenced by writeVTP().

| void scalePoints | ( | const scalar | scaleFactor | ) |
Scale points by given factor.
Zero and negative values are ignored.
Definition at line 229 of file lumpedPointState.C.
|
inline |
The Euler-angle rotation order.
Definition at line 63 of file lumpedPointStateI.H.
|
inline |
Rotation angles in degrees.
Definition at line 69 of file lumpedPointStateI.H.
Referenced by lumpedPointState(), lumpedPointState(), lumpedPointState(), lumpedPointState(), readData(), readData(), and readPlain().

| 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 238 of file lumpedPointState.C.
References alpha, Foam::degToRad(), lumpedPointState(), and Foam::radToDeg().

| bool readData | ( | Istream & | is, |
| const quaternion::eulerOrder | rotOrder = quaternion::eulerOrder::ZXZ, | ||
| const bool | degrees = false ) |
Read input as dictionary content.
Definition at line 312 of file lumpedPointState.C.
References degrees(), and dict.
Referenced by readData().


| bool writeData | ( | Ostream & | os | ) | const |
Output as dictionary content.
Definition at line 326 of file lumpedPointState.C.
References os(), and writeDict().

| void writeDict | ( | Ostream & | os | ) | const |
Output as dictionary content.
Definition at line 333 of file lumpedPointState.C.
References quaternion::eulerOrderNames, os(), and quaternion::ZXZ.
Referenced by writeData().


| bool readPlain | ( | Istream & | is, |
| const quaternion::eulerOrder | rotOrder = quaternion::eulerOrder::ZXZ, | ||
| const bool | degrees = false ) |
Read input as plain content.
Definition at line 267 of file lumpedPointState.C.
References degrees(), forAll, ISstream::getLine(), and quaternion::ZXZ.
Referenced by readData().


| void writePlain | ( | Ostream & | os | ) | const |
Output as plain content.
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 ) |
Read input from file (master process only) using specified format.
Definition at line 374 of file lumpedPointState.C.
References Pstream::broadcasts(), degrees(), UPstream::master(), UPstream::parRun(), PLAIN, readData(), readPlain(), and UPstream::worldComm.

| void writeVTP | ( | const fileName & | outputFile, |
| const labelListList & | lines = labelListList(), | ||
| const labelList & | pointIds = labelList::null() ) const |
Output points/rotations as VTK file for debugging/visualization.
The points are written as vertices, rotation as a triangle
Definition at line 28 of file lumpedPointStateWriter.C.
References Foam::vtk::CONNECTIVITY, Tensor< Cmpt >::cx(), Tensor< Cmpt >::cy(), forAll, format(), Foam::vtk::INLINE_ASCII, Foam::vtk::LINES, UPstream::master(), Foam::vtk::newFormatter(), nPoints, Foam::vtk::NUMBER_OF_LINES, Foam::vtk::NUMBER_OF_POINTS, Foam::vtk::NUMBER_OF_POLYS, Foam::vtk::NUMBER_OF_VERTS, Foam::vtk::OFFSETS, os(), Foam::vtk::PIECE, Foam::vtk::POINTS, Foam::vtk::POLY_DATA, Foam::vtk::POLYS, rotations(), FixedList< T, N >::size(), UList< T >::size(), Foam::vtk::sizeofData(), OFstream::stdStream(), Foam::vtk::VERTS, visLength, Foam::vtk::write(), Foam::vtk::writeIdentity(), and Foam::vtk::writeList().

| void operator= | ( | const lumpedPointState & | rhs | ) |
Assignment operator.
Definition at line 209 of file lumpedPointState.C.
References lumpedPointState(), and Foam::rhs().

| void operator+= | ( | const point & | origin | ) |
|
static |
Names for the input format types.
Definition at line 125 of file lumpedPointState.H.
|
static |
Enable/disable visualization of unused points.
Definition at line 176 of file lumpedPointState.H.
|
static |
The length for visualization triangles.
Definition at line 181 of file lumpedPointState.H.
Referenced by writeVTP().