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 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 101
    • Merge requests 101
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & 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-repositories
  • dumuxdumux
  • Merge requests
  • !1222

[params] Make it possible to initialize parameters when not called from main

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Timo Koch requested to merge feature/extend-parameter-init-interface into master Sep 10, 2018
  • Overview 0
  • Commits 1
  • Changes 1

We cannot expect that we always have argv,argc to initialize the parameters. Also we might wanna run a simulation without input file. Unfortunately, the new interface makes it possible to easily overwrite parameters in every class / function. The name init still suggests that it should be only used to initialize parameters. Do we want such an option for the singleton? AFAIK Fenics also has a global parameter object that can be changed everywhere. This makes it possible to easily change parameters in the main file. However, the feature should never be used in any class as setting the parameter will have hidden side effects on the whole program. Maybe just having a function init instead of a function setParam documents our intent on how to use it well. By the way, overwriting the params in some class is also possible with the current init, it's just inefficient as you overwrite all parameters and have to read the input file again.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: feature/extend-parameter-init-interface