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
  • Issues
  • #401
Closed
Open
Issue created Nov 02, 2017 by Timo Koch@timokOwner

More than one constant component

Currently we just allow a single "constant component" (component whose parameters are fixed through the input file). A recent update allows one component per "ModelParameterGroup". However, we want to have as many different of those components as we want.

Proposal:

  • the component class gets an integer id
template <int id>
class ConstantComponent;
  • the id is used in the input file key such that we can write
[1.ConstantComponent]
Density = 1000

[2.ConstantComponent]
Density = 900
  • Making the id a group allows for simple defaults in the base group "ConstantComponent" and also allows to write
[ConstantComponent]
Density = 1000

if there is just one component no matter which id it has. In order for that to work we need to write in the component class

static const Scalar density = getParamFromGroup<Scalar>(std::to_string(id), "ConstantComponent.Density"); 
  • This also makes components independent of the ModelParameterGroup and thus any TypeTag, which makes sense since components shouldn't be different in a different compartment or model domain of the global model. They are unique within a Dumux simulation.
Edited Nov 02, 2017 by Timo Koch
Assignee
Assign to
Time tracking