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
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionSet invTransform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
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.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
tmp< Field< Type > > interpolate(const Field< Type > &fld, const UList< Type > &defaultValues=UList< Type >()) const
Interpolate field.
#define forAll(list, i)
Loop across all elements in list.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Generic templated field type.
void interpolateToTarget(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Interpolate from source to target with supplied op to combine existing value with remote value and we...
int debug
Static debugging option.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Interpolate from target to source with supplied op to combine existing value with remote value and we...
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 > > interpolateUntransformed(const Field< Type > &fld, const UList< Type > &defaultValues) const
Interpolate without periodic.
#define R(A, B, C, D, E, F, K, M)
Type gAverage(const FieldField< Field, Type > &f)
virtual const cyclicAMIPolyPatch & neighbPatch() const
Return a reference to the neighbour patch.
virtual bool owner() const
Does this side own the patch?
SubField< vector > subField
Declare type of subField.
A class for managing temporary objects.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
coordSystem::cylindrical cylindricalCS
Compatibility typedef 1806.