mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Identity: special type derived from SphericalTensor to provide the concept of identity (I)
Allows efficient operators to be defined for the interaction between types and the equivalent identity.
This commit is contained in:
@ -36,6 +36,7 @@ SourceFiles
|
||||
#define sphericalTensor_H
|
||||
|
||||
#include "SphericalTensor.H"
|
||||
#include "Identity.H"
|
||||
#include "contiguous.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -48,7 +49,7 @@ namespace Foam
|
||||
typedef SphericalTensor<scalar> sphericalTensor;
|
||||
|
||||
// Identity tensor
|
||||
static const sphericalTensor I(1);
|
||||
static const Identity<scalar> I;
|
||||
|
||||
static const sphericalTensor oneThirdI(1.0/3.0);
|
||||
static const sphericalTensor twoThirdsI(2.0/3.0);
|
||||
|
||||
Reference in New Issue
Block a user