SphericalTensor/Identity: Added dual form
This commit is contained in:
parent
0a0e282090
commit
e3bbe40748
1 changed files with 20 additions and 3 deletions
|
|
@ -25,7 +25,8 @@ Class
|
||||||
Foam::Identity
|
Foam::Identity
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Templated Identity tensor derived from SphericalTensor.
|
Templated identity and dual space identity tensors
|
||||||
|
derived from SphericalTensor.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
@ -51,13 +52,29 @@ class Identity
|
||||||
|
|
||||||
public:
|
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
|
//- Construct initializing the SphericalTensor to 1
|
||||||
Identity()
|
dual()
|
||||||
:
|
:
|
||||||
SphericalTensor<Cmpt>(1)
|
SphericalTensor<Cmpt>(1)
|
||||||
{}
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
//- Return the identity in the dual space
|
||||||
|
inline dual operator*()
|
||||||
|
{
|
||||||
|
return dual();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue