Go to the documentation of this file.
83 labelList& ngpp = *nonGlobalPatchPointsPtr_;
96 labelList& ngpp = *nonGlobalPatchPointsPtr_;
103 label noFiltPoints = 0;
105 forAll(faMeshPatchPoints, pointI)
107 label curP = meshPoints[faMeshPatchPoints[pointI]];
111 forAll(sharedPoints, sharedI)
113 if (sharedPoints[sharedI] == curP)
122 ngpp[noFiltPoints] = pointI;
182 << edgeFaceCentres();
199 >> neighbEdgeCentres_
200 >> neighbEdgeLengths_
201 >> neighbEdgeFaceCentres_;
208 scalar nmagEl =
mag(neighbEdgeLengths_[edgei]);
209 scalar avEl = (magEl[edgei] + nmagEl)/2.0;
211 if (
mag(magEl[edgei] - nmagEl)/avEl > 1
e-6)
215 <<
" length does not match neighbour by "
216 << 100*
mag(magEl[edgei] - nmagEl)/avEl
217 <<
"% -- possible edge ordering problem"
227 neighbEdgeLengths_/
mag(neighbEdgeLengths_)
264 for (
label patchPointI = 0; patchPointI <
nPoints(); ++patchPointI)
266 label edgeI = ptEdges[patchPointI][0];
268 patchEdge[patchPointI] = edgeI;
270 const edge&
e = patchEdges[edgeI];
272 indexInEdge[patchPointI] =
e.find(
pointLabels()[patchPointI]);
313 if (nbrPatchEdge.size() ==
nPoints())
318 labelList& neighbPoints = *neighbPointsPtr_;
323 forAll(nbrPatchEdge, nbrPointI)
326 const edge&
e = patchEdges[nbrPatchEdge[nbrPointI]];
328 const label index = 1 - nbrIndexInEdge[nbrPointI];
332 neighbPoints[patchPointI] = nbrPointI;
339 neighbPointsPtr_ =
nullptr;
347 if (!neighbPointsPtr_)
355 <<
"No extended addressing calculated for patch " <<
name()
357 <<
"This can happen if the number of points on both"
358 <<
" sides of the two coupled patches differ." <<
nl
359 <<
"This happens if the processorPatch was constructed from"
360 <<
" part of a cyclic patch."
364 return *neighbPointsPtr_;
377 /
mag(neighbEdgeLengths())
381 - neighbEdgeFaceCentres()
385 w = neighbEdgeCentresCn/
388 + neighbEdgeCentresCn
422 - neighbEdgeFaceCentres()
434 - neighbEdgeFaceCentres()
448 if (!nonGlobalPatchPointsPtr_)
450 makeNonGlobalPatchPoints();
453 return *nonGlobalPatchPointsPtr_;
462 return patchInternalField(internalData);
472 send(commsType, interfaceData);
482 return receive<label>(commsType, this->size());
492 send(commsType, patchInternalField(iF)());
502 return receive<label>(commsType, this->size());
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
virtual label comm() const
Return communicator used for communication.
List< label > labelList
A List of labels.
const bMesh & mesh() const
void movePoints(const pointField &)
Correct patches after moving points.
virtual void updateMesh()
Update of the patch topology.
void initGeometry()
Initialise the calculation of the patch geometry.
virtual void initTransfer(const Pstream::commsTypes commsType, const labelUList &interfaceData) const
Initialise interface data transfer.
A class for managing temporary objects.
virtual void movePoints(const pointField &)
Correct patch after moving points.
Output inter-processor communications stream.
A List obtained as a section of another List.
static bool & parRun()
Is this a parallel run?
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
virtual tmp< labelField > transfer(const Pstream::commsTypes commsType, const labelUList &interfaceData) const
Transfer and return neighbour field.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
virtual void initInternalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Initialise neighbour field transfer.
virtual tmp< vectorField > delta() const
Return cell-centre to face-centre vector.
virtual void initUpdateMesh()
Initialise the update of the patch topology.
#define forAll(list, i)
Loop across all elements in list.
void deleteDemandDrivenData(DataPtr &dataPtr)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const labelList & neighbPoints() const
Return neighbour point labels. This is for my local point the.
virtual void initUpdateMesh()
Initialise the update of the patch topology.
word name(const complex &c)
Return string representation of complex.
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
void makeNonGlobalPatchPoints() const
Find non-globa patch points.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual void updateMesh()
Update of the patch topology.
virtual void write(Ostream &) const
Write the patch data as a dictionary.
void makeDeltaCoeffs(scalarField &) const
Make patch face - neighbour cell distances.
const labelList & nonGlobalPatchPoints() const
Return the set of labels of the processor patch points which are.
static int & msgType()
Message tag of standard messages.
commsTypes
Types of communications.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual ~processorFaPatch()
Destructor.
virtual void write(Ostream &) const
Write.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
Return the values of the given internal data adjacent to.
void makeWeights(scalarField &) const
Make patch weighting factors.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Return neighbour field.
const dimensionedScalar e
Elementary charge.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Input inter-processor communications stream.
virtual tmp< vectorField > delta() const
Return delta (P to N) vectors across coupled patch.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void calcGeometry()
Calculate the patch geometry.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
void setSize(const label newSize)
Alias for resize(const label)
defineTypeNameAndDebug(combustionModel, 0)
void initMovePoints(const pointField &)
Initialise the patches for moving points.
labelList pointLabels(nPoints, -1)
virtual int tag() const
Return message tag to use for communication.