Go to the documentation of this file.
84 labelList& ngpp = *nonGlobalPatchPointsPtr_;
97 labelList& ngpp = *nonGlobalPatchPointsPtr_;
104 label noFiltPoints = 0;
106 forAll(faMeshPatchPoints, pointI)
108 label curP = meshPoints[faMeshPatchPoints[pointI]];
112 forAll(sharedPoints, sharedI)
114 if (sharedPoints[sharedI] == curP)
123 ngpp[noFiltPoints] = pointI;
177 3*(
sizeof(label) + size()*
sizeof(
vector))
183 << edgeFaceCentres();
197 3*(
sizeof(label) + size()*
sizeof(
vector))
200 >> neighbEdgeCentres_
201 >> neighbEdgeLengths_
202 >> neighbEdgeFaceCentres_;
209 scalar nmagEl =
mag(neighbEdgeLengths_[edgei]);
210 scalar avEl = (magEl[edgei] + nmagEl)/2.0;
212 if (
mag(magEl[edgei] - nmagEl)/avEl > 1
e-6)
216 <<
" length does not match neighbour by "
217 << 100*
mag(magEl[edgei] - nmagEl)/avEl
218 <<
"% -- possible edge ordering problem"
228 neighbEdgeLengths_/
mag(neighbEdgeLengths_)
265 for (label patchPointI = 0; patchPointI <
nPoints(); ++patchPointI)
267 label edgeI = ptEdges[patchPointI][0];
269 patchEdge[patchPointI] = edgeI;
271 const edge&
e = patchEdges[edgeI];
273 indexInEdge[patchPointI] =
e.find(
pointLabels()[patchPointI]);
280 2*
sizeof(label) + 2*
nPoints()*
sizeof(label)
314 if (nbrPatchEdge.size() ==
nPoints())
319 labelList& neighbPoints = *neighbPointsPtr_;
324 forAll(nbrPatchEdge, nbrPointI)
327 const edge&
e = patchEdges[nbrPatchEdge[nbrPointI]];
329 const label index = 1 - nbrIndexInEdge[nbrPointI];
333 neighbPoints[patchPointI] = nbrPointI;
340 neighbPointsPtr_ =
nullptr;
348 if (!neighbPointsPtr_)
356 <<
"No extended addressing calculated for patch " <<
name()
358 <<
"This can happen if the number of points on both"
359 <<
" sides of the two coupled patches differ." <<
nl
360 <<
"This happens if the processorPatch was constructed from"
361 <<
" part of a cyclic patch."
365 return *neighbPointsPtr_;
378 /
mag(neighbEdgeLengths())
382 - neighbEdgeFaceCentres()
386 w = neighbEdgeCentresCn/
389 + neighbEdgeCentresCn
423 - neighbEdgeFaceCentres()
435 - neighbEdgeFaceCentres()
449 if (!nonGlobalPatchPointsPtr_)
451 makeNonGlobalPatchPoints();
454 return *nonGlobalPatchPointsPtr_;
463 return patchInternalField(internalData);
473 send(commsType, interfaceData);
483 return receive<label>(commsType, this->size());
493 send(commsType, patchInternalField(iF)());
503 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.
Template functions to aid in the implementation of demand driven data.
A List obtained as a section of another List.
static bool & parRun()
Test if this a parallel run, or allow modify access.
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)
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.