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
65523745
Commit
65523745
authored
6 years ago
by
Dennis Gläser
Browse files
Options
Downloads
Patches
Plain Diff
[ex3-b] use privarswitch newton solver
parent
2b71199c
No related branches found
No related tags found
1 merge request
!4
Feature/improve fluidsystem ex
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exercises/exercise-fluidsystem/exercise3.cc
+3
-3
3 additions, 3 deletions
exercises/exercise-fluidsystem/exercise3.cc
exercises/solution/ex3/exercise3.cc
+3
-3
3 additions, 3 deletions
exercises/solution/ex3/exercise3.cc
with
6 additions
and
6 deletions
exercises/exercise-fluidsystem/exercise3.cc
+
3
−
3
View file @
65523745
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#include
<dumux/common/defaultusagemessage.hh>
#include
<dumux/common/defaultusagemessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/nonlinear/
privarswitch
newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
#include
<dumux/assembly/fvassembler.hh>
#include
<dumux/assembly/diffmethod.hh>
#include
<dumux/assembly/diffmethod.hh>
...
@@ -135,8 +135,8 @@ int main(int argc, char** argv) try
...
@@ -135,8 +135,8 @@ int main(int argc, char** argv) try
using
LinearSolver
=
AMGBackend
<
TypeTag
>
;
using
LinearSolver
=
AMGBackend
<
TypeTag
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
fvGridGeometry
->
dofMapper
());
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
fvGridGeometry
->
dofMapper
());
// the non-linear solver
// the non-linear solver
(primary variable switch needed for the 2p2c test in exercise b)
using
NewtonSolver
=
Dumux
::
NewtonSolver
<
Assembler
,
LinearSolver
>
;
using
NewtonSolver
=
Dumux
::
PriVarSwitch
NewtonSolver
<
Assembler
,
LinearSolver
,
typename
GET_PROP_TYPE
(
TypeTag
,
PrimaryVariableSwitch
)
>
;
NewtonSolver
nonLinearSolver
(
assembler
,
linearSolver
);
NewtonSolver
nonLinearSolver
(
assembler
,
linearSolver
);
// time loop
// time loop
...
...
This diff is collapsed.
Click to expand it.
exercises/solution/ex3/exercise3.cc
+
3
−
3
View file @
65523745
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#include
<dumux/common/defaultusagemessage.hh>
#include
<dumux/common/defaultusagemessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/nonlinear/
privarswitch
newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
#include
<dumux/assembly/fvassembler.hh>
#include
<dumux/assembly/diffmethod.hh>
#include
<dumux/assembly/diffmethod.hh>
...
@@ -135,8 +135,8 @@ int main(int argc, char** argv) try
...
@@ -135,8 +135,8 @@ int main(int argc, char** argv) try
using
LinearSolver
=
AMGBackend
<
TypeTag
>
;
using
LinearSolver
=
AMGBackend
<
TypeTag
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
fvGridGeometry
->
dofMapper
());
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
fvGridGeometry
->
dofMapper
());
// the non-linear solver
// the non-linear solver
(primary variable switch needed for the 2p2c test in exercise b)
using
NewtonSolver
=
Dumux
::
NewtonSolver
<
Assembler
,
LinearSolver
>
;
using
NewtonSolver
=
Dumux
::
PriVarSwitch
NewtonSolver
<
Assembler
,
LinearSolver
,
typename
GET_PROP_TYPE
(
TypeTag
,
PrimaryVariableSwitch
)
>
;
NewtonSolver
nonLinearSolver
(
assembler
,
linearSolver
);
NewtonSolver
nonLinearSolver
(
assembler
,
linearSolver
);
// time loop
// time loop
...
...
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