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);
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);
232 patchInternalField(internalData,
faceCells, tpfld.ref());
243 return neighbFvPatch().patchInternalField(iF);
249 if (!owner() || !cyclicAMIPolyPatch_.createAMIFaces())
257 const_cast<vectorField&
>(Sf()) = cyclicAMIPolyPatch_.faceAreas();
258 const_cast<vectorField&
>(Cf()) = cyclicAMIPolyPatch_.faceCentres();
261 const cyclicAMIFvPatch& nbr = neighbPatch();
262 const_cast<vectorField&
>(nbr.Sf()) = nbr.cyclicAMIPatch().faceAreas();
263 const_cast<vectorField&
>(nbr.Cf()) = nbr.cyclicAMIPatch().faceCentres();
271 const fvMesh&
mesh = boundaryMesh().mesh();
275 if (cyclicAMIPolyPatch_.owner())
280 const face&
f = cyclicAMIPolyPatch_.localFaces()[facei];
285 const scalar geomArea =
f.mag(cyclicAMIPolyPatch_.localPoints());
287 const scalar scaledArea = magSf()[facei];
288 phip[facei] *= scaledArea/geomArea;
292 if (AMI().distributed())
294 AMI().srcMap().distribute(srcMeshPhi);
300 forAll(tgtToSrcAddr, tgtFacei)
303 const label srcFacei = tgtToSrcAddr[tgtFacei][0];
304 nbrPhip[tgtFacei] = -srcMeshPhi[srcFacei];
308 <<
"patch:" <<
patch().name()
309 <<
" sum(area):" <<
gSum(magSf())
310 <<
" min(mag(faceAreas):" <<
gMin(magSf())
311 <<
" sum(meshPhi):" <<
gSum(phip) <<
nl 312 <<
" sum(nbrMeshPhi):" <<
gSum(nbrPhip) <<
nl
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &internalData) const
Return neighbour field.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
commsTypes
Communications types.
virtual tmp< labelField > interfaceInternalField(const labelUList &internalData) const
Return the values of the given internal data adjacent to the interface as a field.
Type gMin(const FieldField< Field, Type > &f)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
tmp< vectorField > nf() const
Return face unit normals, like the fvMesh::unitSf() method Same as unitSf().
Cyclic patch for Arbitrary Mesh Interface (AMI)
constexpr char nl
The newline '\n' character (0x0a)
const fvMesh & mesh() const noexcept
Return the mesh reference.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool & parRun() noexcept
Test if this a parallel run.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of boundary fields.
Smooth ATC in cells next to a set of patches supplied by type.
const Time & time() const
Return the top-level database.
virtual void makeDeltaCoeffs(scalarField &) const
Correct patch deltaCoeffs.
List< labelList > labelListList
List of labelList.
bool processorCase() const noexcept
True if this is a processor case.
virtual void makeNonOrthoCorrVectors(vectorField &) const
Correct patch non-ortho correction vectors.
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
A UList of labels.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
#define forAll(list, i)
Loop across all elements in list.
Type gSum(const FieldField< Field, Type > &f)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual void makeWeights(scalarField &) const
Make patch weighting factors.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
#define DebugInfo
Report an information message using Foam::Info.
const fvBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
defineTypeNameAndDebug(combustionModel, 0)
virtual void makeNonOrthoDeltaCoeffs(scalarField &) const
Correct patch non-ortho deltaCoeffs.
virtual bool coupled() const
Return true if this patch is coupled. This is equivalent to the coupledPolyPatch::coupled() if parall...
virtual tmp< vectorField > delta() const =0
Return delta (P to N) vectors across coupled patch.
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
const std::string patch
OpenFOAM patch number as a std::string.
virtual void movePoints()
Correct patches after moving points.
virtual tmp< vectorField > delta() const
Return delta (P to N) vectors across coupled patch.
void makeWeights(scalarField &) const
Make patch weighting factors.
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)