vectorTensorTransform: Inverse and tensor field transforms
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,6 +42,7 @@ SourceFiles
|
||||
#include "word.H"
|
||||
#include "contiguous.H"
|
||||
#include "pointField.H"
|
||||
#include "transformField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -148,6 +149,10 @@ public:
|
||||
template<class Type>
|
||||
tmp<Field<Type>> transform(const Field<Type>&) const;
|
||||
|
||||
//- Inverse transform the given field
|
||||
template<class Type>
|
||||
tmp<Field<Type>> invTransform(const Field<Type>&) const;
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,7 +33,24 @@ Foam::tmp<Foam::Field<Type>> Foam::vectorTensorTransform::transform
|
||||
{
|
||||
if (hasR_)
|
||||
{
|
||||
return R() & fld;
|
||||
return Foam::transform(R(), fld);
|
||||
}
|
||||
else
|
||||
{
|
||||
return fld;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::vectorTensorTransform::invTransform
|
||||
(
|
||||
const Field<Type>& fld
|
||||
) const
|
||||
{
|
||||
if (hasR_)
|
||||
{
|
||||
return Foam::transform(R().T(), fld);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user