Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
dumux-repositories
dumux
Commits
7cac9895
Commit
7cac9895
authored
9 months ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[common][math][interpolate] Reduce requirements on input containers
parent
4b6d3ab6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3838
Feature/common math reduced requirements
Pipeline
#47470
passed
9 months ago
Stage: check-status
Stage: trigger dumux pipelines
Pipeline: dumux
#47476
Pipeline: dumux
#47475
Pipeline: dumux-lecture
#47474
+3
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/common/math.hh
+1
-1
1 addition, 1 deletion
dumux/common/math.hh
with
1 addition
and
1 deletion
dumux/common/math.hh
+
1
−
1
View file @
7cac9895
...
@@ -576,7 +576,7 @@ struct LinearTable
...
@@ -576,7 +576,7 @@ struct LinearTable
static
constexpr
Scalar
interpolate
(
Scalar
ip
,
const
RandomAccessContainer0
&
range
,
const
RandomAccessContainer1
&
values
)
static
constexpr
Scalar
interpolate
(
Scalar
ip
,
const
RandomAccessContainer0
&
range
,
const
RandomAccessContainer1
&
values
)
{
{
// check bounds
// check bounds
if
(
ip
>
range
.
back
())
return
values
.
back
()
;
if
(
ip
>
range
[
range
.
size
()
-
1
])
return
values
[
values
.
size
()
-
1
]
;
if
(
ip
<
range
[
0
])
return
values
[
0
];
if
(
ip
<
range
[
0
])
return
values
[
0
];
// if we are within bounds find the index of the lower bound
// if we are within bounds find the index of the lower bound
...
...
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