Class applies a two-dimensional correction to mesh motion point field. More...
Public Member Functions | |
ClassName ("twoDPointCorrector") | |
twoDPointCorrector (const polyMesh &mesh) | |
Construct from components. More... | |
~twoDPointCorrector () | |
Destructor. More... | |
bool | required () const |
Is 2D correction required, i.e. is the mesh a wedge or slab. More... | |
const vector & | planeNormal () const |
Return plane normal. More... | |
const labelList & | normalEdgeIndices () const |
Return indices of normal edges. More... | |
direction | normalDir () const |
Return direction normal to plane. More... | |
void | correctPoints (pointField &p) const |
Correct motion points. More... | |
void | correctDisplacement (const pointField &p, vectorField &disp) const |
Correct motion displacements. More... | |
void | updateMesh (const mapPolyMesh &) |
Update topology. More... | |
bool | movePoints () |
Correct weighting factors for moving mesh. More... | |
Public Member Functions inherited from MeshObject< polyMesh, UpdateableMeshObject, twoDPointCorrector > | |
MeshObject (const polyMesh &mesh) | |
Construct on Mesh type. More... | |
virtual | ~MeshObject ()=default |
Destructor. More... | |
const polyMesh & | mesh () const |
virtual bool | writeData (Ostream &os) const |
Additional Inherited Members | |
Static Public Member Functions inherited from MeshObject< polyMesh, UpdateableMeshObject, twoDPointCorrector > | |
static const twoDPointCorrector & | New (const polyMesh &mesh, Args &&... args) |
Get existing or create a new MeshObject. More... | |
static bool | Delete (const polyMesh &mesh) |
Static destructor. More... | |
Protected Attributes inherited from MeshObject< polyMesh, UpdateableMeshObject, twoDPointCorrector > | |
const polyMesh & | mesh_ |
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 orthogonality onto the plane by adjusting points on their ends.
Definition at line 63 of file twoDPointCorrector.H.
twoDPointCorrector | ( | const polyMesh & | mesh | ) |
Construct from components.
Definition at line 200 of file twoDPointCorrector.C.
~twoDPointCorrector | ( | ) |
Destructor.
Definition at line 215 of file twoDPointCorrector.C.
ClassName | ( | "twoDPointCorrector" | ) |
|
inline |
Is 2D correction required, i.e. is the mesh a wedge or slab.
Definition at line 132 of file twoDPointCorrector.H.
Referenced by motionSmootherAlgo::modifyMotionPoints().
const Foam::vector & planeNormal | ( | ) | const |
Return plane normal.
Definition at line 249 of file twoDPointCorrector.C.
Referenced by directions::directions(), and motionSmootherAlgo::modifyMotionPoints().
const Foam::labelList & normalEdgeIndices | ( | ) | const |
Return indices of normal edges.
Definition at line 260 of file twoDPointCorrector.C.
Referenced by motionSmootherAlgo::modifyMotionPoints().
Foam::direction normalDir | ( | ) | const |
Return direction normal to plane.
Definition at line 223 of file twoDPointCorrector.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), Foam::nl, Vector< scalar >::X, Vector< Cmpt >::x(), Vector< scalar >::Y, Vector< Cmpt >::y(), Vector< scalar >::Z, and Vector< Cmpt >::z().
void correctPoints | ( | pointField & | p | ) | const |
Correct motion points.
Definition at line 271 of file twoDPointCorrector.C.
References A, Foam::meshTools::constrainToMeshCentre(), and p.
Referenced by motionSmootherAlgo::modifyMotionPoints().
void correctDisplacement | ( | const pointField & | p, |
vectorField & | disp | ||
) | const |
Correct motion displacements.
Definition at line 311 of file twoDPointCorrector.C.
References A, Foam::meshTools::constrainToMeshCentre(), e, UList< T >::end(), and p.
void updateMesh | ( | const mapPolyMesh & | ) |
Update topology.
Definition at line 361 of file twoDPointCorrector.C.
bool movePoints | ( | ) |
Correct weighting factors for moving mesh.
Definition at line 367 of file twoDPointCorrector.C.