Class applies a two-dimensional correction to mesh motion point field. More...
#include <meshTools/twoDPointCorrector.H>
Class applies a two-dimensional correction to mesh motion point field.
The correction guarantees that the mesh does not get twisted during motion and thus introduce a third dimension into a 2-D problem.
The operation is performed by looping through all edges approximately normal to the plane and enforcing their orthoginality onto the plane by adjusting points on their ends.
Definition at line 61 of file twoDPointCorrector.H.
Public Member Functions | |
twoDPointCorrector (const polyMesh &mesh) | |
Construct from components.
| |
~twoDPointCorrector () | |
bool | required () const |
Is 2D correction required, i.e. is the mesh a wedge or slab.
| |
const vector & | planeNormal () const |
Return plane normal.
| |
const labelList & | normalEdgeIndices () const |
Return indices of normal edges.
| |
direction | normalDir () const |
Return direction normal to plane.
| |
void | correctPoints (pointField &p) const |
Correct motion points.
| |
void | updateMesh () |
Update topology.
|
twoDPointCorrector | ( | const polyMesh & | mesh ) |
Construct from components.
Definition at line 190 of file twoDPointCorrector.C.
~twoDPointCorrector | ( | ) |
Definition at line 202 of file twoDPointCorrector.C.
bool required | ( | ) | const [inline]
|
Is 2D correction required, i.e. is the mesh a wedge or slab.
Definition at line 116 of file twoDPointCorrector.H.
const vector & planeNormal | ( | ) | const |
Return plane normal.
Definition at line 239 of file twoDPointCorrector.C.
Referenced by twoDPointCorrector::correctPoints(), directions::directions(), and twoDPointCorrector::normalDir().
const labelList & normalEdgeIndices | ( | ) | const |
Return indices of normal edges.
Definition at line 251 of file twoDPointCorrector.C.
Referenced by twoDPointCorrector::correctPoints().
direction normalDir | ( | ) | const |
Return direction normal to plane.
Definition at line 210 of file twoDPointCorrector.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, Foam::mag(), Foam::nl, twoDPointCorrector::planeNormal(), Vector< Cmpt >::X, Vector< Cmpt >::x(), Y, Vector< Cmpt >::y(), Vector< Cmpt >::Z, and Vector< Cmpt >::z().
void correctPoints | ( | pointField & | p ) | const |
Correct motion points.
Definition at line 262 of file twoDPointCorrector.C.
References A, primitiveMesh::edges(), UList< T >::end(), forAll, twoDPointCorrector::normalEdgeIndices(), and twoDPointCorrector::planeNormal().
void updateMesh | ( | ) |
Update topology.
Definition at line 293 of file twoDPointCorrector.C.