Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
e69aaae5
Commit
e69aaae5
authored
9 years ago
by
Henry Weller
Browse files
Options
Downloads
Patches
Plain Diff
Identity: Added cast to scalar
parent
ea6eac35
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/OpenFOAM/primitives/SphericalTensor/Identity.H
+12
-2
12 additions, 2 deletions
src/OpenFOAM/primitives/SphericalTensor/Identity.H
src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
+0
-4
0 additions, 4 deletions
...mitives/SphericalTensor/sphericalTensor/sphericalTensor.H
with
12 additions
and
6 deletions
src/OpenFOAM/primitives/SphericalTensor/Identity.H
+
12
−
2
View file @
e69aaae5
...
@@ -25,8 +25,8 @@ Class
...
@@ -25,8 +25,8 @@ Class
Foam::Identity
Foam::Identity
Description
Description
Templated identity and dual space identity tensors
Templated identity and dual space identity tensors
derived from
derived from
SphericalTensor.
SphericalTensor.
\*---------------------------------------------------------------------------*/
\*---------------------------------------------------------------------------*/
...
@@ -75,9 +75,19 @@ public:
...
@@ -75,9 +75,19 @@ public:
{
{
return
dual
();
return
dual
();
}
}
//- Return 1 for scalar
inline
operator
scalar
()
const
{
return
1
;
}
};
};
// Global Identity tensor
static
const
Identity
<
scalar
>
I
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
}
// End namespace Foam
...
...
This diff is collapsed.
Click to expand it.
src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
+
0
−
4
View file @
e69aaae5
...
@@ -48,13 +48,9 @@ namespace Foam
...
@@ -48,13 +48,9 @@ namespace Foam
typedef
SphericalTensor
<
scalar
>
sphericalTensor
;
typedef
SphericalTensor
<
scalar
>
sphericalTensor
;
// Identity tensor
static
const
Identity
<
scalar
>
I
;
static
const
sphericalTensor
oneThirdI
(
1.0
/
3.0
);
static
const
sphericalTensor
oneThirdI
(
1.0
/
3.0
);
static
const
sphericalTensor
twoThirdsI
(
2.0
/
3.0
);
static
const
sphericalTensor
twoThirdsI
(
2.0
/
3.0
);
//- Specify data associated with sphericalTensor type are contiguous
//- Specify data associated with sphericalTensor type are contiguous
template
<
>
template
<
>
inline
bool
contiguous
<
sphericalTensor
>
()
{
return
true
;}
inline
bool
contiguous
<
sphericalTensor
>
()
{
return
true
;}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment