37 cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
51 cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
53 if (!isA<cyclicAMIFvPatch>(p))
58 ) <<
" patch type '" << p.type()
59 <<
"' not constraint type '" << typeName <<
"'" 60 <<
"\n for patch " << p.name()
61 <<
" of field " << this->internalField().name()
62 <<
" in file " << this->internalField().objectPath()
66 if (!dict.found(
"value") && this->coupled())
68 this->evaluate(Pstream::commsTypes::blocking);
84 cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
86 if (!isA<cyclicAMIFvPatch>(this->patch()))
89 <<
"' not constraint type '" << typeName <<
"'" 90 <<
"\n for patch " << p.name()
91 <<
" of field " << this->internalField().name()
92 <<
" in file " << this->internalField().objectPath()
106 cyclicAMIPatch_(ptf.cyclicAMIPatch_)
119 cyclicAMIPatch_(ptf.cyclicAMIPatch_)
128 return cyclicAMIPatch_.coupled();
136 const Field<Type>& iField = this->primitiveField();
138 cyclicAMIPatch_.cyclicAMIPatch().neighbPatch().faceCells();
143 if (cyclicAMIPatch_.applyLowWeightCorrection())
145 tpnf = cyclicAMIPatch_.interpolate(pnf, this->patchInternalField()());
149 tpnf = cyclicAMIPatch_.interpolate(pnf);
168 this->primitiveField()
171 return refCast<const cyclicAMIFvPatchField<Type>>
189 cyclicAMIPatch_.cyclicAMIPatch().neighbPatch().faceCells();
194 transformCoupleField(pnf, cmpt);
196 if (cyclicAMIPatch_.applyLowWeightCorrection())
198 scalarField pif(psiInternal, cyclicAMIPatch_.faceCells());
199 pnf = cyclicAMIPatch_.interpolate(pnf, pif);
203 pnf = cyclicAMIPatch_.interpolate(pnf);
207 const labelUList& faceCells = cyclicAMIPatch_.faceCells();
211 result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI];
226 cyclicAMIPatch_.cyclicAMIPatch().neighbPatch().faceCells();
231 transformCoupleField(pnf);
233 if (cyclicAMIPatch_.applyLowWeightCorrection())
235 Field<Type> pif(psiInternal, cyclicAMIPatch_.faceCells());
236 pnf = cyclicAMIPatch_.interpolate(pnf, pif);
240 pnf = cyclicAMIPatch_.interpolate(pnf);
244 const labelUList& faceCells = cyclicAMIPatch_.faceCells();
248 result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI];
257 this->writeEntry(
"value", os);
virtual bool coupled() const
Return true if coupled. Note that the underlying patch.
#define forAll(list, i)
Loop across all elements in list.
virtual void updateInterfaceMatrix(scalarField &result, const scalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
commsTypes
Types of communications.
T & ref() const
Return non-const reference or generate a fatal error.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Generic GeometricField class.
Abstract base class for cyclic AMI coupled interfaces.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Pre-declare SubField and related Field type.
virtual void write(Ostream &os) const
Write.
Foam::fvPatchFieldMapper.
Abstract base class for coupled patches.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual tmp< Field< Type > > patchNeighbourField() const
Return neighbour coupled internal cell data.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const cyclicAMIFvPatchField< Type > & neighbourPatchField() const
Return reference to neighbour patchField.
cyclicAMIFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
This boundary condition enforces a cyclic condition between a pair of boundaries, whereby communicati...
dimensionSet transform(const dimensionSet &)