Skip to content

GitLab

  • Menu
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 84
    • Issues 84
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 80
    • Merge requests 80
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • dumux-repositories
  • dumuxdumux
  • Issues
  • #881

Closed
Open
Created May 06, 2020 by Dennis Gläser@DennisGlaeserOwner

some interfaces in FVLocalResidual receive problem as function argument

In the base local residual for finite-volume schemes we have some interfaces that receive a problem instance and some that use the private variable problem_ which is instantiated in the class constructor. For some functions, there exist two overloads - one receiving problem and one using the private variable.

I find this a bit confusing at the moment. The functions are not static, so you need the local residual object - which was instantiated with a specific problem instance, i.e. we have the constructor

//! the constructor
FVLocalResidual(const Problem* problem,
                const TimeLoop* timeLoop = nullptr)
: problem_(problem)
, timeLoop_(timeLoop)
{}

What I find even more surprising is that Problem comes out of the property system, so I can potentially only call the interfaces receiving a problem with another instance of the same problem type.

So, I am wondering if the functions receiving a problem instance were designed to allow for evaluations for any problem, independent of how the class was instantiated? But then I'd assume the function the function to be static, or, to be free functions that temporarily instantiate a local residual using the provided problem and then calling these functions on that local variable without passing problem.

Edited May 06, 2020 by Dennis Gläser
Assignee
Assign to
Time tracking