Go to the documentation of this file.
92 labelList& ngpp = *nonGlobalPatchPointsPtr_;
99 label noFiltPoints = 0;
101 forAll(faMeshPatchPoints, pointI)
103 label curP = meshPoints[faMeshPatchPoints[pointI]];
107 forAll(sharedPoints, sharedI)
109 if (sharedPoints[sharedI] == curP)
118 ngpp[noFiltPoints] = pointI;
172 3*(
sizeof(label) + size()*
sizeof(
vector))
178 << edgeFaceCentres();
192 3*(
sizeof(label) + size()*
sizeof(
vector))
195 >> neighbEdgeCentres_
196 >> neighbEdgeLengths_
197 >> neighbEdgeFaceCentres_;
204 scalar nmagEl =
mag(neighbEdgeLengths_[edgei]);
205 scalar avEl = (magEl[edgei] + nmagEl)/2.0;
207 if (
mag(magEl[edgei] - nmagEl)/avEl > 1
e-6)
211 <<
" length does not match neighbour by "
212 << 100*
mag(magEl[edgei] - nmagEl)/avEl
213 <<
"% -- possible edge ordering problem"
223 neighbEdgeLengths_/
mag(neighbEdgeLengths_)
260 for (label patchPointI = 0; patchPointI <
nPoints(); ++patchPointI)
262 label edgeI = ptEdges[patchPointI][0];
264 patchEdge[patchPointI] = edgeI;
266 const edge&
e = patchEdges[edgeI];
268 indexInEdge[patchPointI] =
e.find(
pointLabels()[patchPointI]);
275 2*
sizeof(label) + 2*
nPoints()*
sizeof(label)
309 if (nbrPatchEdge.size() ==
nPoints())
314 labelList& neighbPoints = *neighbPointsPtr_;
319 forAll(nbrPatchEdge, nbrPointI)
322 const edge&
e = patchEdges[nbrPatchEdge[nbrPointI]];
324 const label index = 1 - nbrIndexInEdge[nbrPointI];
328 neighbPoints[patchPointI] = nbrPointI;
335 neighbPointsPtr_ =
nullptr;
343 if (!neighbPointsPtr_)
351 <<
"No extended addressing calculated for patch " <<
name()
353 <<
"This can happen if the number of points on both"
354 <<
" sides of the two coupled patches differ." <<
nl
355 <<
"This happens if the processorPatch was constructed from"
356 <<
" part of a cyclic patch."
360 return *neighbPointsPtr_;
373 /
mag(neighbEdgeLengths())
377 - neighbEdgeFaceCentres()
381 w = neighbEdgeCentresCn/
384 + neighbEdgeCentresCn
418 - neighbEdgeFaceCentres()
430 - neighbEdgeFaceCentres()
444 if (!nonGlobalPatchPointsPtr_)
446 makeNonGlobalPatchPoints();
449 return *nonGlobalPatchPointsPtr_;
458 return patchInternalField(internalData);
468 return patchInternalField(internalData, edgeFaces);
478 send(commsType, interfaceData);
488 return receive<label>(commsType, this->size());
498 send(commsType, patchInternalField(iF)());
508 return receive<label>(commsType, this->size());
519 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 write(Ostream &os) const
Write the patch data as a dictionary.
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.
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.
void setSize(const label n)
Alias for resize()
OBJstream os(runTime.globalPath()/outputName)
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.
void makeDeltaCoeffs(scalarField &) const
Make patch face - neighbour cell distances.
commsTypes
Types of communications.
const labelList & nonGlobalPatchPoints() const
Return the set of labels of the processor patch points which are.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual ~processorFaPatch()
Destructor.
static int & msgType() noexcept
Message tag of standard messages.
virtual void write(Ostream &) const
Write.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
static bool & parRun() noexcept
Test if this a parallel run.
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.
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
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.
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.