Go to the documentation of this file.
44 cyclicPatch_(refCast<const cyclicFvPatch>(
p))
54 const bool valueRequired
58 cyclicPatch_(refCast<const cyclicFvPatch>(
p,
dict))
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()
73 this->
evaluate(Pstream::commsTypes::blocking);
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()
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()))
308 const label nbrPathID = this->cyclicPatch().neighbPatchID();
310 const label nbrGlobalPatchID =
The class contains the addressing required by the lduMatrix: upper, lower and losort.
const lduPrimitiveMeshAssembly & lduMeshAssembly()
Return optional lduAdressing.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for managing temporary objects.
const cyclicFvPatchField< Type > & neighbourPatchField() const
Return reference to neighbour patchField.
const FieldField< Field, Type > & boundaryCoeffs() const
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
#define forAll(list, i)
Loop across all elements in list.
Generic templated field type.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void manipulateMatrix(fvMatrix< Type > &m, const label iMatrix, const direction cmp)
Manipulate matrix.
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
Return psi.
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)
commsTypes
Types of communications.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Abstract base class for cyclic coupled interfaces.
tmp< Field< Type > > patchNeighbourField() const
Return neighbour coupled internal cell data.
const std::string patch
OpenFOAM patch number as a std::string.
Abstract base class for coupled patches.
A traits class, which is primarily used for primitives.
cyclicFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
virtual void write(Ostream &os) const
Write.
virtual const labelUList & patchAddr(const label patchNo) const =0
Return patch to internal addressing given patch number.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
This boundary condition enforces a cyclic condition between a pair of boundaries.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const FieldField< Field, Type > & internalCoeffs() const
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
Update result field based on interface functionality.
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)
String evaluation with specified (positive, non-zero) field width.