Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux-course
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux-course
Commits
5ad7827c
Commit
5ad7827c
authored
1 year ago
by
Martin Schneider
Browse files
Options
Downloads
Patches
Plain Diff
[ex][params] Cleanup
parent
501324c4
No related branches found
No related tags found
1 merge request
!185
Cleanup/ex runtime params
Pipeline
#30513
waiting for manual action
Stage: trigger pipelines
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exercises/exercise-runtimeparams/problem.hh
+1
-1
1 addition, 1 deletion
exercises/exercise-runtimeparams/problem.hh
exercises/solution/exercise-runtimeparams/problem.hh
+5
-5
5 additions, 5 deletions
exercises/solution/exercise-runtimeparams/problem.hh
with
6 additions
and
6 deletions
exercises/exercise-runtimeparams/problem.hh
+
1
−
1
View file @
5ad7827c
...
...
@@ -41,7 +41,7 @@ namespace Dumux {
*
* The domain is sized 60 m times 40 m.
*
* For the mass conservation equation
n
eumann boundary conditions are used on
* For the mass conservation equation
N
eumann boundary conditions are used on
* the top, on the bottom and on the right of the domain, while Dirichlet conditions
* apply on the left boundary.
*
...
...
This diff is collapsed.
Click to expand it.
exercises/solution/exercise-runtimeparams/problem.hh
+
5
−
5
View file @
5ad7827c
...
...
@@ -94,12 +94,12 @@ public:
//TODO: Task 2: Set a variable "TotalAreaSpecificInflow" to read in a value from the parameter tree via the input file
totalAreaSpecificInflow_
=
getParam
<
Scalar
>
(
"Problem.TotalAreaSpecificInflow"
);
//TODO: Task 3: Set a default value for the above parameter.
//
totalAreaSpecificInflow_ = getParam<Scalar>("Problem.TotalAreaSpecificInflow", -1e-4);
//
totalAreaSpecificInflow_ = getParam<Scalar>("Problem.TotalAreaSpecificInflow", -1e-4);
//TODO: Task 4: Provide output describing where the parameter value comes from using parameter bool functions.
//
if (hasParamInGroup("Problem","TotalAreaSpecificInflow"))
//
std::cout << "Parameter value is read from the input file." << std::endl;
//
else
//
std::cout << "Using the default parameter value." << std::endl;
//
if (hasParamInGroup("Problem","TotalAreaSpecificInflow"))
//
std::cout << "Parameter value is read from the input file." << std::endl;
//
else
//
std::cout << "Using the default parameter value." << std::endl;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment