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
f2432865
Commit
f2432865
authored
9 years ago
by
Henry Weller
Browse files
Options
Downloads
Patches
Plain Diff
Scalar: Documented 'posPart' and 'negPart'
parent
83c7e976
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/OpenFOAM/primitives/Scalar/Scalar.H
+4
-0
4 additions, 0 deletions
src/OpenFOAM/primitives/Scalar/Scalar.H
with
4 additions
and
0 deletions
src/OpenFOAM/primitives/Scalar/Scalar.H
+
4
−
0
View file @
f2432865
...
@@ -139,12 +139,16 @@ inline Scalar neg(const Scalar s)
...
@@ -139,12 +139,16 @@ inline Scalar neg(const Scalar s)
}
}
//- Return the positive part of s
inline
Scalar
posPart
(
const
Scalar
s
)
inline
Scalar
posPart
(
const
Scalar
s
)
{
{
return
(
s
>
0
)
?
s
:
0
;
return
(
s
>
0
)
?
s
:
0
;
}
}
//- Return the negative part of s.
// Note: this function returns the actual negative part of s as a
// negative number and does not change the sign
inline
Scalar
negPart
(
const
Scalar
s
)
inline
Scalar
negPart
(
const
Scalar
s
)
{
{
return
(
s
<
0
)
?
s
:
0
;
return
(
s
<
0
)
?
s
:
0
;
...
...
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