33 template<
class Po
intField>
37 const label len = global.
size();
40 auto& result = tresult.ref();
42 for (label i=0; i<len; ++i)
44 result[i] = this->
R(global[i]);
51 template<
class Po
intField>
55 const label len = localCart.
size();
58 auto& result = tresult.ref();
60 for (label i=0; i<len; ++i)
69 template<
class Po
intField>
73 const label len = global.
size();
76 auto& result = tresult.ref();
78 for (label i=0; i<len; ++i)
87 template<
class RetType,
class Type,
class BinaryOp>
96 const label len =
input.size();
99 auto& result = tresult.ref();
101 for (label i=0; i<len; ++i)
103 result[i] = bop(tt,
input[i]);
110 template<
class RetType,
class Po
intField,
class Type,
class BinaryOp>
119 const label len =
input.size();
121 if (len != global.
size())
124 <<
"positions has different size from input field" 128 auto tresult = tmp<Field<RetType>>
::New(len);
129 auto& result = tresult.ref();
131 for (label i=0; i<len; ++i)
133 result[i] = bop(this->
R(global[i]),
input[i]);
140 template<
class RetType,
class Po
intField,
class Type,
class BinaryOp>
149 const label len = global.
size();
152 auto& result = tresult.ref();
154 for (label i=0; i<len; ++i)
156 result[i] = bop(this->
R(global[i]),
input);
tmp< pointField > invTransformPointImpl(const PointField &global) const
Implementation for transformPosition() methods.
tmp< Field< RetType > > oneToManyImpl(const PointField &global, const Type &input, const BinaryOp &bop) const
Use position-dependent transform tensors for single input.
void size(const label n)
Older name for setAddressableSize.
tmp< Field< RetType > > oneToOneImpl(const PointField &global, const UList< Type > &input, const BinaryOp &bop) const
Use position-dependent transform tensors for multiple inputs.
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.
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< tensorField > rotationsImpl(const PointField &global) const
Implementation for R() methods.
virtual const tensor & R() const
Return const reference to the rotation tensor.
tmp< pointField > transformPointImpl(const PointField &localCart) const
Implementation for transformPoint() methods.
static Istream & input(Istream &is, IntRange< T > &range)
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
static tmp< Field< RetType > > manyTimesImpl(const tensor &tt, const UList< Type > &input, const BinaryOp &bop)
Apply single transform tensor for multiple inputs.
errorManip< error > abort(error &err)
#define R(A, B, C, D, E, F, K, M)
A class for managing temporary objects.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Tensor of scalars, i.e. Tensor<scalar>.