Go to the documentation of this file.
57 refCast<const cyclicACMIPolyPatch>(this->
neighbPatch());
77 const polyPatch& nonOverlapPatch = this->nonOverlapPatch();
87 Sf[faceI] = faceAreas0_[faceI];
88 noSf[faceI] = faceAreas0_[faceI];
98 min(scalar(1) - tolerance_,
max(tolerance_, AMI().srcWeightsSum()));
101 min(scalar(1) - tolerance_,
max(tolerance_, AMI().tgtWeightsSum()));
105 Sf[faceI] *= srcMask_[faceI];
106 noSf[faceI] *= 1.0 - srcMask_[faceI];
109 setNeighbourFaceAreas();
120 refCast<const cyclicACMIPolyPatch>(this->neighbPatch());
125 if (tgtMask_.size() ==
cp.size())
132 Sf[faceI] = tgtMask_[faceI]*faceAreas0[faceI];
133 noSf[faceI] = (1.0 - tgtMask_[faceI])*faceAreas0[faceI];
139 <<
"Target mask size differs to that of the neighbour patch\n"
140 <<
" May occur when decomposing." <<
endl;
228 const word& patchType,
235 nonOverlapPatchID_(-1),
240 AMIRequireMatch_ =
false;
253 const word& patchType
258 nonOverlapPatchName_(
dict.
lookup(
"nonOverlapPatch")),
259 nonOverlapPatchID_(-1),
264 AMIRequireMatch_ =
false;
266 if (nonOverlapPatchName_ ==
name)
271 ) <<
"Non-overlapping patch name " << nonOverlapPatchName_
272 <<
" cannot be the same as this patch " <<
name
290 nonOverlapPatchID_(-1),
295 AMIRequireMatch_ =
false;
308 const label newStart,
309 const word& nbrPatchName,
310 const word& nonOverlapPatchName
315 nonOverlapPatchName_(nonOverlapPatchName),
316 nonOverlapPatchID_(-1),
321 AMIRequireMatch_ =
false;
323 if (nonOverlapPatchName_ ==
name())
326 <<
"Non-overlapping patch name " << nonOverlapPatchName_
327 <<
" cannot be the same as this patch " <<
name()
348 nonOverlapPatchID_(-1),
353 AMIRequireMatch_ =
false;
368 return refCast<const cyclicACMIPolyPatch>(pp);
374 if (nonOverlapPatchID_ == -1)
379 if (nonOverlapPatchID_ == -1)
382 <<
"Illegal non-overlapping patch name " << nonOverlapPatchName_
383 <<
nl <<
"Valid patch names are "
388 if (nonOverlapPatchID_ < index())
391 <<
"Boundary ordering error: " <<
type()
392 <<
" patch must be defined prior to its non-overlapping patch"
394 <<
type() <<
" patch: " <<
name() <<
", ID:" << index() <<
nl
395 <<
"Non-overlap patch: " << nonOverlapPatchName_
396 <<
", ID:" << nonOverlapPatchID_ <<
nl
404 if (size() == noPp.size())
411 scalar ratio =
mag(magSf[faceI]/(noMagSf[faceI] + ROOTVSMALL));
413 if (ratio - 1 > tolerance_)
428 <<
"Inconsistent ACMI patches " <<
name() <<
" and "
429 << noPp.
name() <<
". Patches should have identical topology"
434 return nonOverlapPatchID_;
488 os.
writeKeyword(
"nonOverlapPatch") << nonOverlapPatchName_
interpolationMethod
Enumeration specifying interpolation method.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
virtual ~cyclicACMIPolyPatch()
Destructor.
vectorField faceAreas0_
Copy of the original patch face areas.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
const vectorField & faceAreas0() const
Return access to the original patch face areas.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const word nonOverlapPatchName_
Name of non-overlapping patch.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
bool cp(const fileName &src, const fileName &dst)
Copy, recursively if necessary, the source to the destination.
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.
dimensionSet transform(const dimensionSet &)
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Pre-declare related SubField type.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
static const scalar tolerance_
Pre-declare SubField and related Field type.
virtual void resetAMI(const AMIPatchToPatchInterpolation::interpolationMethod &AMIMethod=AMIPatchToPatchInterpolation::imFaceAreaWeight) const
Reset the AMI interpolator.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
A patch is a list of labels that address the faces in the global face list.
virtual const scalarField & srcMask() const
Return the mask/weighting for the source patch.
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
virtual void clearGeom()
Clear geometry.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
virtual label nonOverlapPatchID() const
Non-overlapping patch ID.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
virtual void setNeighbourFaceAreas() const
Set neighbour ACMI patch areas.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual void resetAMI(const AMIPatchToPatchInterpolation::interpolationMethod &AMIMethod=AMIPatchToPatchInterpolation::imFaceAreaWeight) const
Reset the AMI interpolator.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const cyclicACMIPolyPatch & neighbPatch() const
Return a reference to the neighbour patch.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
virtual void clearGeom()
Clear geometry.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const vectorField::subField faceAreas() const
Return face normals.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar e
Elementary charge.
virtual void initPatchFaceAreas() const
Initialise patch face areas.
static const word null
An empty word.
@ imPartialFaceAreaWeight
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
label findPatchID(const polyPatchList &, const word &) const
Get index of polypatch by name.
virtual const scalarField & tgtMask() const
Return the mask/weighting for the target patch.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const word & name() const
Return name.
#define WarningInFunction
Report a warning using Foam::Warning.
word name(const complex &)
Return a string representation of a complex.
A list of faces which address into the list of points.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Cyclic patch for Arbitrary Mesh Interface (AMI)