103 if (applyLowWeightCorrection())
108 nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta(),
115 interpolate(nbrPatch.
nf() & nbrPatch.coupledFvPatch::delta());
123 scalar di =
mag(deltas[facei]);
124 scalar dni =
mag(nbrDeltas[facei]);
126 w[facei] = dni/(di + dni);
132 fvPatch::makeWeights(w);
166 if (applyLowWeightCorrection())
171 nbrPatch.coupledFvPatch::delta(),
177 tnbrPatchD =
interpolate(nbrPatch.coupledFvPatch::delta());
190 const vector& ddi = patchD[facei];
191 const vector& dni = nbrPatchD[facei];
193 pdv[facei] = ddi - dni;
200 const vector& ddi = patchD[facei];
201 const vector& dni = nbrPatchD[facei];
203 pdv[facei] = ddi -
transform(forwardT()[0], dni);
221 return patchInternalField(internalData);
231 return patchInternalField(internalData,
faceCells);
241 return neighbFvPatch().patchInternalField(iF);
247 if (!owner() || !cyclicAMIPolyPatch_.createAMIFaces())
255 const_cast<vectorField&
>(Sf()) = cyclicAMIPolyPatch_.faceAreas();
256 const_cast<vectorField&
>(Cf()) = cyclicAMIPolyPatch_.faceCentres();
273 if (cyclicAMIPolyPatch_.owner())
278 const face&
f = cyclicAMIPolyPatch_.localFaces()[facei];
283 const scalar geomArea =
f.mag(cyclicAMIPolyPatch_.localPoints());
285 const scalar scaledArea = magSf()[facei];
286 phip[facei] *= scaledArea/geomArea;
290 if (AMI().distributed())
292 AMI().srcMap().distribute(srcMeshPhi);
298 forAll(tgtToSrcAddr, tgtFacei)
301 const label srcFacei = tgtToSrcAddr[tgtFacei][0];
302 nbrPhip[tgtFacei] = -srcMeshPhi[srcFacei];
306 <<
"patch:" << patch().name()
307 <<
" sum(area):" <<
gSum(magSf())
308 <<
" min(mag(faceAreas):" <<
gMin(magSf())
309 <<
" sum(meshPhi):" <<
gSum(phip) <<
nl
310 <<
" sum(nbrMeshPhi):" <<
gSum(nbrPhip) <<
nl
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
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
virtual tmp< vectorField > delta() const =0
Return delta (P to N) vectors across coupled patch.
Cyclic patch for Arbitrary Mesh Interface (AMI)
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Return neighbour field.
void makeWeights(scalarField &) const
Make patch weighting factors.
virtual void makeNonOrthoDeltaCoeffs(scalarField &) const
Correct patch non-ortho deltaCoeffs.
const cyclicAMIPolyPatch & cyclicAMIPatch() const
Return local reference cast into the cyclic patch.
virtual void makeDeltaCoeffs(scalarField &) const
Correct patch deltaCoeffs.
virtual void movePoints()
Correct patches after moving points.
virtual bool coupled() const
virtual tmp< vectorField > delta() const
Return delta (P to N) vectors across coupled patch.
virtual void makeNonOrthoCorrVectors(vectorField &) const
Correct patch non-ortho correction vectors.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
Smooth ATC in cells next to a set of patches supplied by type.
A face is a list of labels corresponding to mesh vertices.
Mesh data needed to do the Finite Volume discretisation.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
label index() const
Return the index of this patch in the fvBoundaryMesh.
const scalarField & magSf() const
Return face area magnitudes.
tmp< vectorField > nf() const
Return face normals.
const vectorField & Cf() const
Return face centres.
const vectorField & Sf() const
Return face area vectors.
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.
A class for managing temporary objects.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
#define DebugInfo
Report an information message using Foam::Info.
Type gSum(const FieldField< Field, Type > &f)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
Type gMin(const FieldField< Field, Type > &f)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.