Skip to content
Snippets Groups Projects
Commit 7cac9895 authored by Timo Koch's avatar Timo Koch
Browse files

[common][math][interpolate] Reduce requirements on input containers

parent 4b6d3ab6
No related branches found
No related tags found
1 merge request!3838Feature/common math reduced requirements
Pipeline #47470 passed
Pipeline: dumux

#47476

    Pipeline: dumux

    #47475

      Pipeline: dumux-lecture

      #47474

        +3
        ...@@ -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
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment