41 const Foam::scalar Foam::cyclicACMIPolyPatch::tolerance_ = 1
e-10;
49 const polyPatch& nonOverlapPatch = this->nonOverlapPatch();
53 Pout<<
"cyclicACMIPolyPatch::resetAMI : recalculating weights" 54 <<
" for " <<
name() <<
" and " << nonOverlapPatch.
name()
62 Pout<<
"cyclicACMIPolyPatch::resetAMI : clearing cellCentres" 63 <<
" for " <<
name() <<
" and " << nonOverlapPatch.
name()
99 Sf[facei] *= srcMask_[facei];
100 noSf[facei] *= 1.0 - srcMask_[facei];
107 refCast<const cyclicACMIPolyPatch>(this->neighbPatch());
115 Sf[facei] *= tgtMask_[facei];
116 noSf[facei] *= 1.0 - tgtMask_[facei];
130 scalar&
sum = srcWeightsSum[i];
148 scalar&
sum = tgtWeightsSum[i];
207 const word& patchType,
224 nonOverlapPatchID_(-1),
240 const word& patchType
253 nonOverlapPatchName_(dict.
lookup(
"nonOverlapPatch")),
254 nonOverlapPatchID_(-1),
259 if (nonOverlapPatchName_ == name)
264 ) <<
"Non-overlapping patch name " << nonOverlapPatchName_
265 <<
" cannot be the same as this patch " << name
281 nonOverlapPatchName_(pp.nonOverlapPatchName_),
282 nonOverlapPatchID_(-1),
298 const label newStart,
299 const word& nbrPatchName,
300 const word& nonOverlapPatchName
304 nonOverlapPatchName_(nonOverlapPatchName),
305 nonOverlapPatchID_(-1),
310 if (nonOverlapPatchName_ ==
name())
313 <<
"Non-overlapping patch name " << nonOverlapPatchName_
314 <<
" cannot be the same as this patch " <<
name()
333 nonOverlapPatchName_(pp.nonOverlapPatchName_),
334 nonOverlapPatchID_(-1),
355 return refCast<const cyclicACMIPolyPatch>(pp);
361 if (nonOverlapPatchID_ == -1)
366 if (nonOverlapPatchID_ == -1)
369 <<
"Illegal non-overlapping patch name " << nonOverlapPatchName_
370 <<
nl <<
"Valid patch names are " 375 if (nonOverlapPatchID_ < index())
378 <<
"Boundary ordering error: " <<
type()
379 <<
" patch must be defined prior to its non-overlapping patch" 381 <<
type() <<
" patch: " <<
name() <<
", ID:" << index() <<
nl 382 <<
"Non-overlap patch: " << nonOverlapPatchName_
383 <<
", ID:" << nonOverlapPatchID_ <<
nl 391 if (size() == noPp.size())
398 scalar ratio =
mag(magSf[facei]/(noMagSf[facei] + rootVSmall));
400 if (ratio - 1 > tolerance_)
415 <<
"Inconsistent ACMI patches " <<
name() <<
" and " 416 << noPp.
name() <<
". Patches should have identical topology" 421 return nonOverlapPatchID_;
474 writeEntry(os,
"nonOverlapPatch", nonOverlapPatchName_);
virtual void resetAMI() const
Reset the AMI interpolator.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
#define forAll(list, i)
Loop across all elements in list.
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 word & name() const
Return name.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
virtual const cyclicACMIPolyPatch & neighbPatch() const
Return a reference to the neighbour patch.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const scalarListList & tgtWeights() const
Return const access to target patch weights.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
void size(const label)
Override size to be inconsistent with allocated storage.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool cp(const fileName &src, const fileName &dst, const bool followLink=true)
Copy, recursively if necessary, the source to the destination.
virtual const scalarField & tgtMask() const
Return the mask/weighting for the target patch.
Pre-declare related SubField type.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Macros for easy insertion into run-time selection tables.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
const polyPatch & nonOverlapPatch() const
Return a const reference to the non-overlapping patch.
A list of faces which address into the list of points.
void clearGeom()
Clear geometry.
virtual const scalarField & srcMask() const
Return the mask/weighting for the source patch.
A class for handling words, derived from string.
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
static const word null
An empty word.
const scalarField & tgtWeightsSum() const
Return const access to normalisation factor of target.
cyclicACMIPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform=UNKNOWN)
Construct from (base couped patch) components.
Cyclic patch for Arbitrary Mesh Interface (AMI)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const vectorField::subField faceAreas() const
Return face normals.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
const scalarListList & srcWeights() const
Return const access to source patch weights.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
defineTypeNameAndDebug(combustionModel, 0)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
const scalarField & srcWeightsSum() const
Return const access to normalisation factor of source.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
virtual void resetAMI() const
Reset the AMI interpolator.
virtual void calcGeometry(const primitivePatch &referPatch, const pointField &thisCtrs, const vectorField &thisAreas, const pointField &thisCc, const pointField &nbrCtrs, const vectorField &nbrAreas, const pointField &nbrCc)
Calculate the patch geometry.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
prefixOSstream Pout(cout, "Pout")
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
virtual ~cyclicACMIPolyPatch()
Destructor.
dimensioned< scalar > mag(const dimensioned< Type > &)
const doubleScalar e
Elementary charge.
Mesh consisting of general polyhedral cells.
const bMesh & mesh() const
A patch is a list of labels that address the faces in the global face list.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
virtual label nonOverlapPatchID() const
Non-overlapping patch ID.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.