Go to the documentation of this file.
52 const Field<Type>&
fld,
53 const UList<Type>& defaultValues
56 if (pTraits<Type>::rank == 0)
58 return interpolateUntransformed(
fld, defaultValues);
65 return interpolateUntransformed(
fld, defaultValues);
69 const cyclicAMIPolyPatch& nbrPp = this->neighbPatch();
73 Pout<<
"cyclicAMIPolyPatch::interpolate :"
74 <<
" patch:" << this->
name()
75 <<
" size:" << this->size()
76 <<
" nbrPatch:" << nbrPp.name()
77 <<
" size:" << nbrPp.size()
81 if (
fld.size() != nbrPp.size())
84 <<
"Patch:" << this->
name()
85 <<
" size:" << this->size()
86 <<
" neighbour patch:" << nbrPp.name()
87 <<
" size:" << nbrPp.size()
88 <<
" fld size:" <<
fld.size()
93 auto tlocalFld(tmp<Field<Type>>::
New(
fld.size()));
94 Field<Type>& localFld = tlocalFld.ref();
98 tmp<tensorField> nbrT(cs().
R(nbrPp.faceCentres()));
107 <<
" size:" << this->size()
108 <<
" fc:" <<
gAverage(this->faceCentres())
109 <<
" getting remote data from:" << nbrPp.name()
110 <<
" size:" << nbrPp.size()
116 Pout<<
"At:" << nbrFc[i] <<
nl
117 <<
" cart:" <<
fld[i] <<
nl
118 <<
" cyli:" << localFld[i] <<
nl
124 const tmp<tensorField>
T(cs().
R(this->faceCentres()));
126 List<Type> localDeflt(defaultValues.size());
127 if (defaultValues.size() == size())
133 const SubField<Type> defaultSubFld(defaultValues);
134 const Field<Type>& defaultFld(defaultSubFld);
143 interpolateUntransformed(localFld, localDeflt)
153 const tmp<Field<Type>>& tFld,
154 const UList<Type>& defaultValues
161 template<
class Type,
class CombineOp>
165 const CombineOp& cop,
224 AMI().interpolateToSource
234 neighbPatch().AMI().interpolateToTarget
virtual bool owner() const
A class for managing temporary objects.
Type gAverage(const FieldField< Field, Type > &f)
bool valid() const noexcept
Ostream & endl(Ostream &os)
dimensionSet transform(const dimensionSet &ds)
void interpolateToTarget(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
tmp< Field< Type > > interpolateUntransformed(const Field< Type > &fld, const UList< Type > &defaultValues) const
SubField is a Field obtained as a section of another Field, without its own allocation....
#define R(A, B, C, D, E, F, K, M)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
void interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
coordSystem::cylindrical cylindricalCS
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))
tmp< Field< Type > > interpolate(const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >()) const
virtual const cyclicAMIPolyPatch & neighbPatch() const
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const AMIPatchToPatchInterpolation & AMI() const
#define FatalErrorInFunction
const vectorField::subField faceCentres() const
A traits class, which is primarily used for primitives.
dimensionSet invTransform(const dimensionSet &ds)
word name(const expressions::valueTypeCode typeCode)
SubField< Type > subField
const word & name() const noexcept
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Cyclic patch for Arbitrary Mesh Interface (AMI)