60 if (!isA<cyclicACMIFvPatch>(
p))
63 <<
" patch type '" <<
p.type()
64 <<
"' not constraint type '" << typeName <<
"'"
65 <<
"\n for patch " <<
p.name()
71 if (!dict.
found(
"value") && this->coupled())
76 const GeometricField<Type, fvPatchField, volMesh>&
fld =
77 static_cast<const GeometricField<Type, fvPatchField, volMesh>&
>
84 <<
" patch " <<
p.name()
86 <<
" refers to non-overlap patch "
88 <<
" which is not constructed yet." <<
nl
89 <<
" Either supply an initial value or change the ordering"
102 const cyclicACMIFvPatchField<Type>& ptf,
104 const DimensionedField<Type, volMesh>& iF,
105 const fvPatchFieldMapper& mapper
108 cyclicACMILduInterfaceField(),
109 coupledFvPatchField<Type>(ptf,
p, iF, mapper),
110 cyclicACMIPatch_(
refCast<const cyclicACMIFvPatch>(
p))
112 if (!isA<cyclicACMIFvPatch>(this->
patch()))
115 <<
"' not constraint type '" << typeName <<
"'"
116 <<
"\n for patch " <<
p.name()
128 const cyclicACMIFvPatchField<Type>& ptf
131 cyclicACMILduInterfaceField(),
133 cyclicACMIPatch_(ptf.cyclicACMIPatch_)
146 cyclicACMIPatch_(ptf.cyclicACMIPatch_)
155 return cyclicACMIPatch_.coupled();
163 const Field<Type>& iField = this->primitiveField();
173 cyclicACMIPatch_.interpolate
186 tpnf.ref() =
transform(forwardT(), tpnf());
200 this->primitiveField()
203 return refCast<const cyclicACMIFvPatchField<Type>>
205 fld.boundaryField()[cyclicACMIPatch_.neighbPatchID()]
217 this->primitiveField()
221 return fld.boundaryField()[cyclicACMIPatch_.nonOverlapPatchID()];
247 lduAddr.
patchAddr(cyclicACMIPatch_.neighbPatchID());
252 transformCoupleField(pnf, cmpt);
254 pnf = cyclicACMIPatch_.interpolate(pnf);
258 this->addToInternalField(result, !
add,
faceCells, coeffs, pnf);
277 lduAddr.
patchAddr(cyclicACMIPatch_.neighbPatchID());
282 transformCoupleField(pnf);
284 pnf = cyclicACMIPatch_.interpolate(pnf);
288 this->addToInternalField(result, !
add,
faceCells, coeffs, pnf);
298 const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask();
316 if (this->cyclicACMIPatch().owner())
318 label index = this->
patch().index();
320 const label globalPatchID =
338 const labelUList& u = matrix.lduAddr().upperAddr();
339 const labelUList& l = matrix.lduAddr().lowerAddr();
348 label globalFaceI =
faceMap[j];
350 const scalar boundCorr = -bndCoeffs[subFaceI];
351 const scalar intCorr = -intCoeffs[subFaceI];
353 matrix.upper()[globalFaceI] += boundCorr;
354 matrix.diag()[u[globalFaceI]] -= intCorr;
355 matrix.diag()[l[globalFaceI]] -= boundCorr;
357 if (matrix.asymmetric())
359 matrix.lower()[globalFaceI] += intCorr;
367 if (matrix.
psi(mat).mesh().fluxRequired(this->internalField().name()))
371 globalPatchID, intCoeffs*pTraits<Type>::one
375 globalPatchID, bndCoeffs*pTraits<Type>::one
378 const label nbrPathID =
379 cyclicACMIPatch_.cyclicACMIPatch().neighbPatchID();
381 const label nbrGlobalPatchID =
387 nbrGlobalPatchID, intCoeffs*pTraits<Type>::one
391 nbrGlobalPatchID, bndCoeffs*pTraits<Type>::one
402 fvMatrix<Type>& matrix,
403 const Field<scalar>& coeffs,
407 const label index(this->
patch().index());
409 const label nSubFaces
411 matrix.lduMeshAssembly().cellBoundMap()[mat][index].size()
414 Field<scalar> mapCoeffs(nSubFaces,
Zero);
417 cyclicACMIPatch_.cyclicACMIPatch().AMI().srcWeights();
419 const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask();
426 for(label i=0; i<w.size(); i++)
428 if (mask[faceI] > tol)
430 const label localFaceId =
431 matrix.lduMeshAssembly().facePatchFaceMap()
432 [mat][index][subFaceI];
433 mapCoeffs[subFaceI] = w[i]*coeffs[localFaceId];
452 const scalarField& mask = cyclicACMIPatch_.cyclicACMIPatch().mask();
462 this->writeEntry(
"value",
os);