SphericalTensor/Identity: Added dual form

This commit is contained in:
Henry Weller 2016-03-18 21:52:00 +00:00
parent f8b486ae35
commit 1346cc9c9d

View File

@ -25,7 +25,8 @@ Class
Foam::Identity
Description
Templated Identity tensor derived from SphericalTensor.
Templated identity and dual space identity tensors
derived from SphericalTensor.
\*---------------------------------------------------------------------------*/
@ -51,13 +52,29 @@ class Identity
public:
// Constructors
//- Construct initializing the SphericalTensor to 1
Identity()
:
SphericalTensor<Cmpt>(1)
{}
//- The identity type in the dual space
class dual
:
public SphericalTensor<Cmpt>
{
//- Construct initializing the SphericalTensor to 1
dual()
:
SphericalTensor<Cmpt>(1)
{}
};
//- Return the identity in the dual space
inline dual operator*()
{
return dual();
}
};