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
bb81cc9f
Commit
bb81cc9f
authored
Dec 13, 2010
by
mattijs
Browse files
BUG: interpolationTable : allow for min != 0
parent
c4b13069
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
View file @
bb81cc9f
...
...
@@ -284,10 +284,8 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
case
interpolationTable
:
:
REPEAT
:
{
// adjust lookupValue to >= minLimit
while
(
lookupValue
<
minLimit
)
{
lookupValue
+=
maxLimit
;
}
scalar
span
=
maxLimit
-
minLimit
;
lookupValue
=
fmod
(
lookupValue
-
minLimit
,
span
)
+
minLimit
;
break
;
}
}
...
...
@@ -325,10 +323,8 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
case
interpolationTable
:
:
REPEAT
:
{
// adjust lookupValue <= maxLimit
while
(
lookupValue
>
maxLimit
)
{
lookupValue
-=
maxLimit
;
}
scalar
span
=
maxLimit
-
minLimit
;
lookupValue
=
fmod
(
lookupValue
-
minLimit
,
span
)
+
minLimit
;
break
;
}
}
...
...
@@ -540,11 +536,9 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
}
case
interpolationTable
:
:
REPEAT
:
{
// adjust lookupValue to >= minLimin
while
(
lookupValue
<
minLimit
)
{
lookupValue
+=
maxLimit
;
}
// adjust lookupValue to >= minLimit
scalar
span
=
maxLimit
-
minLimit
;
lookupValue
=
fmod
(
lookupValue
-
minLimit
,
span
)
+
minLimit
;
break
;
}
}
...
...
@@ -582,10 +576,8 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
case
interpolationTable
:
:
REPEAT
:
{
// adjust lookupValue <= maxLimit
while
(
lookupValue
>
maxLimit
)
{
lookupValue
-=
maxLimit
;
}
scalar
span
=
maxLimit
-
minLimit
;
lookupValue
=
fmod
(
lookupValue
-
minLimit
,
span
)
+
minLimit
;
break
;
}
}
...
...
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