57 if (!isA<cyclicFaPatch>(this->
patch()))
60 <<
"\n patch type '" << p.type()
61 <<
"' not constraint type '" <<
typeName <<
"'" 62 <<
"\n for patch " <<
p.name()
74 const DimensionedField<Type, areaMesh>& iF,
75 const dictionary&
dict,
79 coupledFaPatchField<Type>(
p, iF,
dict, IOobjectOption::NO_READ),
82 if (!isA<cyclicFaPatch>(
p))
85 <<
"\n patch type '" <<
p.type()
86 <<
"' not constraint type '" <<
typeName <<
"'" 87 <<
"\n for patch " <<
p.name()
103 const cyclicFaPatchField<Type>& ptf
106 cyclicLduInterfaceField(),
108 cyclicPatch_(ptf.cyclicPatch_)
120 cyclicPatch_(ptf.cyclicPatch_)
130 const Field<Type>& iField = this->primitiveField();
134 auto& pnf = tpnf.ref();
136 const label sizeby2 = this->size()/2;
140 for (label facei=0; facei<sizeby2; ++facei)
144 forwardT()[0], iField[
faceCells[facei + sizeby2]]
155 for (label facei=0; facei<sizeby2; ++facei)
157 pnf[facei] = iField[faceCells[facei + sizeby2]];
158 pnf[facei + sizeby2] = iField[faceCells[facei]];
181 const label sizeby2 = this->size()/2;
184 for (label facei = 0; facei < sizeby2; ++facei)
186 pnf[facei] = psiInternal[
faceCells[facei + sizeby2]];
187 pnf[facei + sizeby2] = psiInternal[
faceCells[facei]];
191 transformCoupleField(pnf, cmpt);
194 this->addToInternalField(result, !
add,
faceCells, coeffs, pnf);
212 const label sizeby2 = this->size()/2;
215 for (label facei = 0; facei < sizeby2; ++facei)
217 pnf[facei] = psiInternal[
faceCells[facei + sizeby2]];
218 pnf[facei + sizeby2] = psiInternal[
faceCells[facei]];
222 transformCoupleField(pnf);
225 this->addToInternalField(result, !
add, faceCells, coeffs, pnf);
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.
const faPatch & patch() const noexcept
Return the patch.
errorManipArg< error, int > exit(error &err, const int errNo=1)
commsTypes
Communications types.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const DimensionedField< Type, areaMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
Smooth ATC in cells next to a set of patches supplied by type.
static const char *const typeName
Typename for Field.
Generic templated field type.
cyclicFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual void evaluate(const Pstream::commsTypes commsType)
Evaluate the patch field.
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Foam::cyclicFaPatchField.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
#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...
virtual tmp< Field< Type > > patchNeighbourField() const
Return neighbour coupled given internal cell data.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
A class for managing temporary objects.
"buffered" : (MPI_Bsend, MPI_Recv)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
A FieldMapper for finite-area patch fields.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
readOption
Enumeration defining read preferences.