51 if (!cyclicACMIPolyPatch_.
owner())
56 if (updated || !cyclicACMIPolyPatch_.
upToDate(areaTime_))
60 Pout<<
"cyclicACMIFvPatch::updateAreas() : updating fv areas for "
107 nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta()
116 scalar di =
mag(deltas[facei]);
117 scalar dni =
mag(nbrDeltas[facei]);
128 w[facei] = dni/(di + dni);
135 fvPatch::makeWeights(w);
257 const vector& ddi = patchD[facei];
258 const vector& dni = nbrPatchD[facei];
260 pdv[facei] = ddi - dni;
267 const vector& ddi = patchD[facei];
268 const vector& dni = nbrPatchD[facei];
270 pdv[facei] = ddi -
transform(forwardT()[0], dni);
288 return patchInternalField(internalData);
298 return patchInternalField(internalData,
faceCells);
308 return neighbFvPatch().patchInternalField(iF);
314 if (!cyclicACMIPolyPatch_.owner())
320 if (!cyclicACMIPolyPatch_.upToDate(areaTime_))
324 Pout<<
"cyclicACMIFvPatch::movePoints() : updating fv areas for "
325 <<
name() <<
" and " << this->nonOverlapPatch().name()
333 const fvPatch& nonOverlapPatch = this->nonOverlapPatch();
337 resetPatchAreas(*
this);
338 resetPatchAreas(nonOverlapPatch);
339 resetPatchAreas(nbrACMI);
340 resetPatchAreas(nbrNonOverlapPatch);
353 scalarField& phip = meshPhiBf[cyclicACMIPolyPatch_.index()];
361 if (newSrcAddr[facei].empty())
369 const face& fAMI = cyclicACMIPolyPatch_[facei];
374 const scalar geomArea = fAMI.
mag(
points);
375 phip[facei] *= magSf()[facei]/geomArea;
379 forAll(phiNonOverlapp, facei)
381 const scalar w = 1.0 - cyclicACMIPolyPatch_.srcMask()[facei];
382 phiNonOverlapp[facei] *= w;
388 meshPhiBf[nbrNonOverlapPatch.
patch().
index()];
392 if (newTgtAddr[facei].empty())
394 nbrPhip[facei] = 0.0;
398 const face& fAMI = nbrPatch[facei];
403 const scalar geomArea = fAMI.
mag(
points);
404 nbrPhip[facei] *= nbrACMI.
magSf()[facei]/geomArea;
408 forAll(nbrPhiNonOverlapp, facei)
410 const scalar w = 1.0 - cyclicACMIPolyPatch_.tgtMask()[facei];
411 nbrPhiNonOverlapp[facei] *= w;
415 cyclicACMIPolyPatch_.setUpToDate(areaTime_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
commsTypes
Types of communications.
static bool & parRun() noexcept
Test if this a parallel run.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
const bMesh & mesh() const
An abstract base class for patches that couple regions of the computational domain e....
virtual tmp< vectorField > delta() const =0
Return delta (P to N) vectors across coupled patch.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Return neighbour field.
void resetPatchAreas(const fvPatch &fvp) const
Helper function to reset the FV patch areas from the primitive patch.
void makeWeights(scalarField &) const
Make patch weighting factors.
virtual void movePoints()
Correct patches after moving points.
virtual bool coupled() const
Return true if this patch is coupled.
const cyclicACMIPolyPatch & cyclicACMIPatch() const
Return local reference cast into the cyclic patch.
virtual tmp< vectorField > delta() const
Return delta (P to N) vectors across coupled patch.
virtual const fvPatch & nonOverlapPatch() const
Return non-overlapping fvPatch.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
virtual const cyclicACMIFvPatch & neighbPatch() const
Return neighbour fvPatch.
virtual bool updateAreas() const
Update the AMI and patch areas. Return true if anything updated.
An abstract base class for cyclic ACMI coupled interfaces.
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI).
void setUpToDate(regIOobject &) const
Set object up to date with *this.
bool upToDate(const regIOobject &) const
Return true if given object is up to date with *this.
static scalar tolerance()
Overlap tolerance.
virtual bool updateAreas() const
Update the AMI and patch areas. Return true if anything.
virtual bool owner() const
Does this side own the patch?
Smooth ATC in cells next to a set of patches supplied by type.
A face is a list of labels corresponding to mesh vertices.
scalar mag(const UList< point > &p) const
Magnitude of face area.
Mesh data needed to do the Finite Volume discretisation.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const word & name() const
Return name.
const scalarField & magSf() const
Return face area magnitudes.
tmp< vectorField > nf() const
Return face normals.
const polyPatch & patch() const
Return the polyPatch.
const vectorField & Cf() const
Return face centres.
const vectorField & Sf() const
Return face area vectors.
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
virtual const pointField & points() const
Return raw points.
A patch is a list of labels that address the faces in the global face list.
const vectorField::subField faceAreas() const
Return face normals.
const vectorField::subField faceCentres() const
Return face centres.
label eventNo() const noexcept
Event number at last update.
A class for managing temporary objects.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
#define DebugPout
Report an information message using Foam::Pout.
To & refCast(From &r)
Reference type cast template function.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
#define forAll(list, i)
Loop across all elements in list.