54 const bool valueRequired
60 if (!isA<cyclicFvPatch>(
p))
63 <<
" patch type '" <<
p.type()
64 <<
"' not constraint type '" <<
typeName <<
"'"
65 <<
"\n for patch " <<
p.
name()
90 if (!isA<cyclicFvPatch>(this->
patch()))
93 <<
"' not constraint type '" <<
typeName <<
"'"
94 <<
"\n for patch " << p.
name()
110 cyclicPatch_(ptf.cyclicPatch_)
122 cyclicPatch_(ptf.cyclicPatch_)
132 const Field<Type>& iField = this->primitiveField();
134 cyclicPatch().cyclicPatch().neighbPatch().faceCells();
146 forwardT()[0], iField[nbrFaceCells[facei]]
154 pnf[facei] = iField[nbrFaceCells[facei]];
169 this->primitiveField()
172 return refCast<const cyclicFvPatchField<Type>>
174 fld.boundaryField()[this->cyclicPatch().neighbPatchID()]
196 this->cyclicPatch().neighbPatchID()
202 transformCoupleField(pnf, cmpt);
227 this->cyclicPatch().neighbPatchID()
233 transformCoupleField(pnf);
238 this->addToInternalField(result, !
add,
faceCells, coeffs, pnf);
257 if (this->cyclicPatch().owner())
259 label index = this->patch().index();
261 const label globalPatchID =
282 label globalFaceI =
faceMap[faceI];
284 const scalar boundCorr = -boundCoeffsCmpt[faceI];
285 const scalar intCorr = -intCoeffsCmpt[faceI];
287 matrix.
upper()[globalFaceI] += boundCorr;
288 matrix.
diag()[u[globalFaceI]] -= boundCorr;
289 matrix.
diag()[l[globalFaceI]] -= intCorr;
293 matrix.
lower()[globalFaceI] += intCorr;
297 if (matrix.
psi(mat).mesh().fluxRequired(this->internalField().name()))
308 const label nbrPathID = this->cyclicPatch().neighbPatchID();
310 const label nbrGlobalPatchID =
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static const char *const typeName
Typename for Field.
Generic templated field type.
Generic GeometricField class.
const word & name() const noexcept
Return the object name.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
commsTypes
Types of communications.
Abstract base class for coupled patches.
virtual void evaluate(const Pstream::commsTypes commsType)
Evaluate the patch field.
This boundary condition enforces a cyclic condition between a pair of boundaries.
const cyclicFvPatchField< Type > & neighbourPatchField() const
Return reference to neighbour patchField.
virtual void updateInterfaceMatrix(solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
virtual void manipulateMatrix(fvMatrix< Type > &m, const label iMatrix, const direction cmp)
Manipulate matrix.
tmp< Field< Type > > patchNeighbourField() const
Return neighbour coupled internal cell data.
Abstract base class for cyclic coupled interfaces.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
virtual bool write()
Write the output fields.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
const FieldField< Field, Type > & internalCoeffs() const noexcept
const FieldField< Field, Type > & boundaryCoeffs() const noexcept
const lduPrimitiveMeshAssembly & lduMeshAssembly()
Return optional lduAdressing.
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.
const fvPatch & patch() const
Return patch.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const word & name() const
Return name.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
virtual const labelUList & patchAddr(const label patchNo) const =0
Return patch to internal addressing given patch number.
const lduAddressing & lduAddr() const
Return the LDU addressing.
const labelListListList & faceBoundMap() const
Return boundary face map.
const labelListList & patchLocalToGlobalMap() const
Return patchLocalToGlobalMap.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A class for managing temporary objects.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
To & refCast(From &r)
Reference type cast template function.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.