mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
vectorTensorTransform: Primitive transformations
This commit is contained in:
@ -145,10 +145,18 @@ public:
|
|||||||
//- Inverse transform the given pointField
|
//- Inverse transform the given pointField
|
||||||
inline pointField invTransformPosition(const pointField& pts) const;
|
inline pointField invTransformPosition(const pointField& pts) const;
|
||||||
|
|
||||||
|
//- Transform the given type
|
||||||
|
template<class Type>
|
||||||
|
Type transform(const Type&) const;
|
||||||
|
|
||||||
//- Transform the given field
|
//- Transform the given field
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> transform(const Field<Type>&) const;
|
tmp<Field<Type>> transform(const Field<Type>&) const;
|
||||||
|
|
||||||
|
//- Inverse transform the given type
|
||||||
|
template<class Type>
|
||||||
|
Type invTransform(const Type&) const;
|
||||||
|
|
||||||
//- Inverse transform the given field
|
//- Inverse transform the given field
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type>> invTransform(const Field<Type>&) const;
|
tmp<Field<Type>> invTransform(const Field<Type>&) const;
|
||||||
|
|||||||
@ -25,6 +25,20 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Type Foam::vectorTensorTransform::transform(const Type& x) const
|
||||||
|
{
|
||||||
|
if (hasR_)
|
||||||
|
{
|
||||||
|
return Foam::transform(R(), x);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type>> Foam::vectorTensorTransform::transform
|
Foam::tmp<Foam::Field<Type>> Foam::vectorTensorTransform::transform
|
||||||
(
|
(
|
||||||
@ -42,6 +56,20 @@ Foam::tmp<Foam::Field<Type>> Foam::vectorTensorTransform::transform
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Type Foam::vectorTensorTransform::invTransform(const Type& x) const
|
||||||
|
{
|
||||||
|
if (hasR_)
|
||||||
|
{
|
||||||
|
return Foam::transform(R().T(), x);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type>> Foam::vectorTensorTransform::invTransform
|
Foam::tmp<Foam::Field<Type>> Foam::vectorTensorTransform::invTransform
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user