Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
e69aaae5
Commit
e69aaae5
authored
Mar 22, 2016
by
Henry Weller
Browse files
Identity: Added cast to scalar
parent
ea6eac35
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/primitives/SphericalTensor/Identity.H
View file @
e69aaae5
...
...
@@ -25,8 +25,8 @@ Class
Foam::Identity
Description
Templated identity and dual space identity tensors
derived from
SphericalTensor.
Templated identity and dual space identity tensors
derived from
SphericalTensor.
\*---------------------------------------------------------------------------*/
...
...
@@ -75,9 +75,19 @@ public:
{
return
dual
();
}
//- Return 1 for scalar
inline
operator
scalar
()
const
{
return
1
;
}
};
// Global Identity tensor
static
const
Identity
<
scalar
>
I
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
...
...
src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
View file @
e69aaae5
...
...
@@ -48,13 +48,9 @@ namespace Foam
typedef
SphericalTensor
<
scalar
>
sphericalTensor
;
// Identity tensor
static
const
Identity
<
scalar
>
I
;
static
const
sphericalTensor
oneThirdI
(
1.0
/
3.0
);
static
const
sphericalTensor
twoThirdsI
(
2.0
/
3.0
);
//- Specify data associated with sphericalTensor type are contiguous
template
<
>
inline
bool
contiguous
<
sphericalTensor
>
()
{
return
true
;}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment