Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • dumux dumux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 104
    • Issues 104
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 92
    • Merge requests 92
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • dumux-repositoriesdumux-repositories
  • dumuxdumux
  • Merge requests
  • !2600

Fix/tabulated2dfunction

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Dmitry Pavlov requested to merge dpavlov/dumux:fix/tabulated2dfunction into master May 10, 2021
  • Overview 8
  • Commits 5
  • Pipelines 0
  • Changes 1

There are two issues. First, we have m * n points, so (m-1) * (n - 1) intervals. The existing iToX and jToY functions are written in accordance. However, xToI and jToY do not match. They assume that there are m*n intervals. That needs to be fixed.

The second issue is the following code in get():

        int i = max(0, min(m_, static_cast<int>(alpha)));
        int j = max(0, min(n_, static_cast<int>(beta)));

With x == xMax, alpha will be as big as (m_- 1) even after the proposed fix to xToI. But we need an interval number here, not a point number, and there is no (m_- 1)-th interval (not to mention _m-th). So we need to cut i at (m_ - 2). Similarly with j.

Without the fix, the assertions in getSamplePoint

        assert(0 <= i && i < m_);
        assert(0 <= j && j < n_);

rightfully fail when x is close to xMax or y is close to yMax.

TODO:

  • Check which tests are affected
Edited May 10, 2021 by Timo Koch
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/tabulated2dfunction