Neighbour processor patch. More...
#include <OpenFOAM/processorPolyPatch.H>
Neighbour processor patch.
Note: morph patch face ordering comes geometric or topological. Geometric: no cyclics allowed (assumes faces coincident) Topological: needs unmodified faces on both sides to correspond. Also needs at least one per connected patch area (so all patch faces can be visited from an unmodified face)
Definition at line 56 of file processorPolyPatch.H.
Public Member Functions | |
TypeName ("processor") | |
Runtime type information. | |
processorPolyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const int myProcNo, const int neighbProcNo) | |
Construct from components. | |
processorPolyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &) | |
Construct from dictionary. | |
processorPolyPatch (const processorPolyPatch &, const polyBoundaryMesh &) | |
Construct as copy, resetting the boundary mesh. | |
processorPolyPatch (const processorPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) | |
Construct as given the original patch and resetting the. | |
virtual autoPtr< polyPatch > | clone (const polyBoundaryMesh &bm) const |
Construct and return a clone, resetting the boundary mesh. | |
virtual autoPtr< polyPatch > | clone (const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) const |
Construct and return a clone, resetting the face list. | |
virtual | ~processorPolyPatch () |
int | myProcNo () const |
Return processor number. | |
int | neighbProcNo () const |
Return neigbour processor number. | |
bool | owner () const |
Does the processor own the patch ? | |
bool | neighbour () const |
Is the processor the patch neighbour ? | |
const vectorField & | neighbFaceCentres () const |
Return processor-neighbbour patch face centres. | |
const vectorField & | neighbFaceAreas () const |
Return processor-neighbbour patch face areas. | |
const vectorField & | neighbFaceCellCentres () const |
Return processor-neighbbour patch neighbour cell centres. | |
const labelList & | neighbPoints () const |
Return neighbour point labels. This is for my local point (-1 or) | |
const labelList & | neighbEdges () const |
Return neighbour edge labels. This is for my local edge (-1 or) the. | |
virtual void | initOrder (const primitivePatch &) const |
Initialize ordering for primitivePatch. Does not. | |
virtual bool | order (const primitivePatch &, labelList &faceMap, labelList &rotation) const |
Return new ordering for primitivePatch. | |
virtual void | write (Ostream &) const |
Write the polyPatch data as a dictionary. | |
![]() | |
TypeName ("coupled") | |
Runtime type information. | |
coupledPolyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm) | |
Construct from components. | |
coupledPolyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm) | |
Construct from dictionary. | |
coupledPolyPatch (const coupledPolyPatch &, const polyBoundaryMesh &) | |
Construct as copy, resetting the boundary mesh. | |
coupledPolyPatch (const coupledPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) | |
Construct given the original patch and resetting the. | |
virtual | ~coupledPolyPatch () |
virtual bool | coupled () const |
Return true because this patch is coupled. | |
bool | separated () const |
Are the coupled planes separated. | |
const vectorField & | separation () const |
Return the offset (distance) vector from one side of the couple. | |
bool | parallel () const |
Are the cyclic planes parallel. | |
const tensorField & | forwardT () const |
Return face transformation tensor. | |
const tensorField & | reverseT () const |
Return neighbour-cell transformation tensor. | |
![]() | |
TypeName ("patch") | |
Runtime type information. | |
declareRunTimeSelectionTable (autoPtr, polyPatch, word,(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm),(name, size, start, index, bm)) | |
declareRunTimeSelectionTable (autoPtr, polyPatch, dictionary,(const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm),(name, dict, index, bm)) | |
polyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm) | |
Construct from components. | |
polyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm) | |
Construct from dictionary. | |
polyPatch (const polyPatch &, const polyBoundaryMesh &) | |
Construct as copy, resetting the boundary mesh. | |
polyPatch (const polyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) | |
Construct given the original patch and resetting the. | |
polyPatch (const polyPatch &) | |
Construct as copy. | |
virtual | ~polyPatch () |
label | start () const |
Return start label of this patch in the polyMesh face list. | |
const polyBoundaryMesh & | boundaryMesh () const |
Return boundaryMesh reference. | |
template<class T > | |
const List< T >::subList | patchSlice (const List< T > &l) const |
Slice list to patch. | |
template<class T > | |
const Field< T >::subField | patchSlice (const Field< T > &l) const |
Slice Field to patch. | |
const vectorField::subField | faceCentres () const |
Return face centres. | |
const vectorField::subField | faceAreas () const |
Return face normals. | |
tmp< vectorField > | faceCellCentres () const |
Return face neighbour cell centres. | |
const unallocLabelList & | faceCells () const |
Return face-cell addressing. | |
const labelList & | meshEdges () const |
Return global edge index for local edges. | |
void | clearAddressing () |
Clear addressing. | |
label | whichFace (const label l) const |
Return label of face in patch from global face label. | |
void | operator= (const polyPatch &) |
Assignment. | |
![]() | |
patchIdentifier (const word &name, const label index, const word &physicalType=word::null) | |
Construct from components. | |
patchIdentifier (const word &name, const dictionary &, const label index) | |
Construct from dictionary. | |
patchIdentifier (const patchIdentifier &, const label index) | |
Construct from geometric patch, resetting the index. | |
virtual | ~patchIdentifier () |
const word & | name () const |
Return name. | |
word & | name () |
Return name for modification. | |
const word & | physicalType () const |
Return the optional physical type of the patch. | |
word & | physicalType () |
Return the optional physical type of the patch for modification. | |
label | index () const |
Return the index of this patch in the boundaryMesh. | |
label & | index () |
Return the index of this patch in the boundaryMesh for modification. | |
![]() | |
PrimitivePatch (const FaceList< Face > &faces, const Field< PointType > &points) | |
Construct from components. | |
PrimitivePatch (FaceList< Face > &faces, Field< PointType > &points, const bool reUse) | |
Construct from components, reuse storage. | |
PrimitivePatch (const PrimitivePatch< Face, FaceList, PointField, PointType > &) | |
Construct as copy. | |
virtual | ~PrimitivePatch () |
void | clearOut () |
void | clearGeom () |
void | clearTopology () |
void | clearPatchMeshAddr () |
const Field< PointType > & | points () const |
Return reference to global points. | |
label | nPoints () const |
Return number of points supporting patch faces. | |
label | nEdges () const |
Return number of edges in patch. | |
const edgeList & | edges () const |
Return list of edges, address into LOCAL point list. | |
label | nInternalEdges () const |
Number of internal edges. | |
bool | isInternalEdge (const label edgeI) const |
Is internal edge? | |
const labelList & | boundaryPoints () const |
Return list of boundary points,. | |
const labelListList & | faceFaces () const |
Return face-face addressing. | |
const labelListList & | edgeFaces () const |
Return edge-face addressing. | |
const labelListList & | faceEdges () const |
Return face-edge addressing. | |
const labelListList & | pointEdges () const |
Return point-edge addressing. | |
const labelListList & | pointFaces () const |
Return point-face addressing. | |
const List< Face > & | localFaces () const |
Return patch faces addressing into local point list. | |
const labelList & | meshPoints () const |
Return labelList of mesh points in patch. They are constructed. | |
const Map< label > & | meshPointMap () const |
Mesh point map. Given the global point index find its. | |
const Field< PointType > & | localPoints () const |
Return pointField of points in patch. | |
const labelList & | localPointOrder () const |
Return orders the local points for most efficient search. | |
label | whichPoint (const label gp) const |
Given a global point index, return the local point index. | |
label | whichEdge (const edge &) const |
Given an edge in local point labels, return its. | |
labelList | meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const |
Return labels of patch edges in the global edge list using. | |
labelList | meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const |
Return labels of patch edges in the global edge list using. | |
const Field< PointType > & | faceNormals () const |
Return face normals for patch. | |
const Field< PointType > & | pointNormals () const |
Return point normals for patch. | |
template<class ToPatch > | |
List< objectHit > | projectPoints (const ToPatch &targetPatch, const Field< PointType > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const |
Project vertices of patch onto another patch. | |
template<class ToPatch > | |
List< objectHit > | projectFaceCentres (const ToPatch &targetPatch, const Field< PointType > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const |
Project vertices of patch onto another patch. | |
const labelListList & | edgeLoops () const |
Return list of closed loops of boundary vertices. | |
surfaceTopo | surfaceType () const |
Calculate surface type formed by patch. | |
bool | checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const |
Check surface formed by patch for manifoldness (see above). | |
bool | checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const |
Checks primitivePatch for faces sharing point but not edge. | |
virtual void | movePoints (const Field< PointType > &) |
Correct patch after moving points. | |
void | operator= (const PrimitivePatch< Face, FaceList, PointField, PointType > &) |
Assignment. |
Protected Member Functions | |
void | initGeometry () |
Initialise the calculation of the patch geometry. | |
void | calcGeometry () |
Calculate the patch geometry. | |
void | initMovePoints (const pointField &) |
Initialise the patches for moving points. | |
void | movePoints (const pointField &) |
Correct patches after moving points. | |
virtual void | initUpdateMesh () |
Initialise the update of the patch topology. | |
virtual void | updateMesh () |
Update of the patch topology. | |
![]() | |
void | calcTransformTensors (const vectorField &Cf, const vectorField &Cr, const vectorField &nf, const vectorField &nr, const scalarField &smallDist, const scalar absTol=matchTol, const transformType=UNKNOWN) const |
Calculate the transformation tensors. | |
bool | inPatch (const labelList &oldToNew, const label oldFaceI) const |
Is face (in old face labels) in current patch? |
Additional Inherited Members | |
![]() | |
enum | transformType { UNKNOWN, ROTATIONAL, TRANSLATIONAL } |
![]() | |
static const NamedEnum < transformType, 3 > | transformTypeNames |
static scalar | matchTol = 1E-3 |
Relative tolerance (for geometric matching). | |
![]() | |
static int | disallowGenericPolyPatch |
Debug switch to disallow the use of genericPolyPatch. | |
![]() | |
static void | writeOBJ (Ostream &os, const point &pt) |
Write point in OBJ format. | |
static void | writeOBJ (Ostream &, const pointField &, const labelList &) |
Write selected points in OBJ format. | |
static void | writeOBJ (const fileName &, const UList< face > &, const pointField &) |
Write patch. | |
static void | writeOBJ (Ostream &os, const point &p0, const point &p1, label &vertI) |
Write edge in OBJ format. | |
static pointField | calcFaceCentres (const UList< face > &, const pointField &) |
Calculate face centres. | |
static pointField | getAnchorPoints (const UList< face > &, const pointField &) |
Get f[0] for all faces. | |
static label | whichPatch (const labelList &patchStarts, const label faceI) |
Given list of starts of patches and a face label determine. | |
static scalarField | calcFaceTol (const UList< face > &faces, const pointField &points, const pointField &faceCentres) |
Calculate typical tolerance per face. Is currently max distance. | |
static label | getRotation (const pointField &points, const face &f, const point &anchor, const scalar tol) |
Get the number of vertices face f needs to be rotated such that. |
processorPolyPatch | ( | const word & | name, |
const label | size, | ||
const label | start, | ||
const label | index, | ||
const polyBoundaryMesh & | bm, | ||
const int | myProcNo, | ||
const int | neighbProcNo | ||
) |
Construct from components.
Definition at line 49 of file processorPolyPatch.C.
Referenced by processorPolyPatch::clone().
processorPolyPatch | ( | const word & | name, |
const dictionary & | dict, | ||
const label | index, | ||
const polyBoundaryMesh & | bm | ||
) |
Construct from dictionary.
Definition at line 71 of file processorPolyPatch.C.
processorPolyPatch | ( | const processorPolyPatch & | pp, |
const polyBoundaryMesh & | bm | ||
) |
Construct as copy, resetting the boundary mesh.
Definition at line 90 of file processorPolyPatch.C.
processorPolyPatch | ( | const processorPolyPatch & | pp, |
const polyBoundaryMesh & | bm, | ||
const label | index, | ||
const label | newSize, | ||
const label | newStart | ||
) |
Construct as given the original patch and resetting the.
face list and boundary mesh information
Definition at line 107 of file processorPolyPatch.C.
|
virtual |
Definition at line 128 of file processorPolyPatch.C.
References Foam::deleteDemandDrivenData().
|
protectedvirtual |
Initialise the calculation of the patch geometry.
Implements coupledPolyPatch.
Definition at line 137 of file processorPolyPatch.C.
References PstreamBase::blocking, and Pstream::parRun().
Referenced by processorPolyPatch::initMovePoints().
|
protectedvirtual |
Calculate the patch geometry.
Implements coupledPolyPatch.
Definition at line 156 of file processorPolyPatch.C.
References PstreamBase::blocking, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, Foam::mag(), coupledPolyPatch::matchTol, Foam::name(), Pstream::parRun(), and points.
Referenced by processorPolyPatch::movePoints().
|
protectedvirtual |
Initialise the patches for moving points.
Implements coupledPolyPatch.
Definition at line 233 of file processorPolyPatch.C.
References processorPolyPatch::initGeometry(), and polyPatch::movePoints().
|
protectedvirtual |
Correct patches after moving points.
Implements coupledPolyPatch.
Definition at line 240 of file processorPolyPatch.C.
References processorPolyPatch::calcGeometry().
|
protectedvirtual |
Initialise the update of the patch topology.
Implements coupledPolyPatch.
Definition at line 246 of file processorPolyPatch.C.
References PstreamBase::blocking, Foam::deleteDemandDrivenData(), f(), Foam::findIndex(), polyPatch::initUpdateMesh(), nPoints, and Pstream::parRun().
|
protectedvirtual |
Update of the patch topology.
Implements coupledPolyPatch.
Definition at line 303 of file processorPolyPatch.C.
References PstreamBase::blocking, PrimitivePatch< Face, FaceList, PointField, PointType >::clearOut(), f(), forAll, nPoints, Pstream::parRun(), List< T >::size(), and polyPatch::updateMesh().
TypeName | ( | "processor" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone, resetting the boundary mesh.
Reimplemented from polyPatch.
Definition at line 161 of file processorPolyPatch.H.
References processorPolyPatch::processorPolyPatch().
|
inlinevirtual |
Construct and return a clone, resetting the face list.
and boundary mesh
Reimplemented from polyPatch.
Definition at line 169 of file processorPolyPatch.H.
References processorPolyPatch::processorPolyPatch().
|
inline |
Return processor number.
Definition at line 198 of file processorPolyPatch.H.
Referenced by processorFvPatch::myProcNo(), and processorPointPatch::myProcNo().
|
inline |
Return neigbour processor number.
Definition at line 204 of file processorPolyPatch.H.
Referenced by Cloud< ParticleType >::move(), processorFvPatch::neighbProcNo(), processorPointPatch::neighbProcNo(), faceSet::sync(), syncTools::syncBoundaryFaceList(), syncTools::syncEdgeList(), syncTools::syncEdgeMap(), syncTools::syncFaceList(), syncTools::syncPointList(), syncTools::syncPointMap(), and globalMeshData::updateMesh().
|
inline |
Does the processor own the patch ?
Definition at line 210 of file processorPolyPatch.H.
Referenced by syncTools::getMasterEdges(), syncTools::getMasterFaces(), syncTools::getMasterPoints(), and processorPolyPatch::neighbour().
|
inline |
Is the processor the patch neighbour ?
Definition at line 216 of file processorPolyPatch.H.
References processorPolyPatch::owner().
|
inline |
Return processor-neighbbour patch face centres.
Definition at line 222 of file processorPolyPatch.H.
Referenced by processorFvPatch::delta(), and processorFvPatch::makeWeights().
|
inline |
Return processor-neighbbour patch face areas.
Definition at line 228 of file processorPolyPatch.H.
Referenced by processorFvPatch::makeWeights().
|
inline |
Return processor-neighbbour patch neighbour cell centres.
Definition at line 234 of file processorPolyPatch.H.
Referenced by processorFvPatch::delta(), and processorFvPatch::makeWeights().
const Foam::labelList & neighbPoints | ( | ) | const |
Return neighbour point labels. This is for my local point (-1 or)
the corresponding local point on the other side. It is -1 if there are multiple corresponding points on this or the other side (can happen for cyclics being converted into proc patches)
Definition at line 404 of file processorPolyPatch.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::name().
Referenced by syncTools::syncEdgeMap(), syncTools::syncPointList(), and syncTools::syncPointMap().
const Foam::labelList & neighbEdges | ( | ) | const |
Return neighbour edge labels. This is for my local edge (-1 or) the.
corresponding local edge on the other side. See above for -1 cause.
Definition at line 416 of file processorPolyPatch.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::name().
Referenced by syncTools::syncEdgeList().
|
virtual |
Initialize ordering for primitivePatch. Does not.
refer to *this (except for name() and type() etc.)
Implements coupledPolyPatch.
Definition at line 428 of file processorPolyPatch.C.
References PstreamBase::blocking, Foam::endl(), forAll, mesh, Pstream::myProcNo(), OFstream::name(), Foam::name(), Pstream::parRun(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::Pout, and Foam::meshTools::writeOBJ().
|
virtual |
Return new ordering for primitivePatch.
Ordering is -faceMap: for every face index of the new face -rotation:for every new face the clockwise shift of the original face. Return false if nothing changes (faceMap is identity, rotation is 0), true otherwise.
Implements coupledPolyPatch.
Definition at line 484 of file processorPolyPatch.C.
References Foam::abort(), PstreamBase::blocking, Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::matchPoints(), mesh, Pstream::myProcNo(), OSstream::name(), OFstream::name(), fileName::name(), Foam::name(), Pstream::parRun(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::Pout, SeriousErrorIn, List< T >::setSize(), List< T >::size(), Foam::transformList(), and Foam::meshTools::writeOBJ().
|
virtual |
Write the polyPatch data as a dictionary.
Reimplemented from polyPatch.
Definition at line 756 of file processorPolyPatch.C.
References token::END_STATEMENT, Foam::nl, polyPatch::write(), and Ostream::writeKeyword().