Go to the documentation of this file.
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()
66 <<
" of field " << this->internalField().name()
67 <<
" in file " << this->internalField().objectPath()
81 const cyclicFvPatchField<Type>& ptf,
83 const DimensionedField<Type, volMesh>& iF,
84 const fvPatchFieldMapper& mapper
87 coupledFvPatchField<Type>(ptf,
p, iF, mapper),
88 cyclicPatch_(
refCast<const cyclicFvPatch>(
p))
90 if (!isA<cyclicFvPatch>(this->
patch()))
93 <<
"' not constraint type '" << typeName <<
"'"
94 <<
"\n for patch " <<
p.name()
95 <<
" of field " << this->internalField().name()
96 <<
" in file " << this->internalField().objectPath()
105 const cyclicFvPatchField<Type>& ptf
108 cyclicLduInterfaceField(),
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);
208 this->addToInternalField(result, !
add,
faceCells, coeffs, pnf);
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 =
274 const labelUList& u = matrix.lduAddr().upperAddr();
275 const labelUList& l = matrix.lduAddr().lowerAddr();
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;
291 if (matrix.asymmetric())
293 matrix.lower()[globalFaceI] += intCorr;
297 if (matrix.
psi(mat).mesh().fluxRequired(this->internalField().name()))
301 globalPatchID, intCoeffsCmpt*pTraits<Type>::one
305 globalPatchID, boundCoeffsCmpt*pTraits<Type>::one
308 const label nbrPathID = this->cyclicPatch().neighbPatchID();
310 const label nbrGlobalPatchID =
315 nbrGlobalPatchID, intCoeffsCmpt*pTraits<Type>::one
320 nbrGlobalPatchID, boundCoeffsCmpt*pTraits<Type>::one
The class contains the addressing required by the lduMatrix: upper, lower and losort.
const lduPrimitiveMeshAssembly & lduMeshAssembly()
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for managing temporary objects.
const labelListList & patchLocalToGlobalMap() const
const cyclicFvPatchField< Type > & neighbourPatchField() const
const FieldField< Field, Type > & boundaryCoeffs() const
dimensionSet transform(const dimensionSet &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void manipulateMatrix(fvMatrix< Type > &m, const label iMatrix, const direction cmp)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
OBJstream os(runTime.globalPath()/outputName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Abstract base class for cyclic coupled interfaces.
tmp< Field< Type > > patchNeighbourField() const
Abstract base class for coupled patches.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A traits class, which is primarily used for primitives.
cyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
const labelListListList & faceBoundMap() const
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
virtual void write(Ostream &os) const
virtual const labelUList & patchAddr(const label patchNo) const =0
This boundary condition enforces a cyclic condition between a pair of boundaries.
#define FatalIOErrorInFunction(ios)
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const FieldField< Field, Type > & internalCoeffs() const
Generic GeometricField class.
Smooth ATC in cells next to a set of patches supplied by type.
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
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)