Skip to content
Snippets Groups Projects
Commit 65523745 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[ex3-b] use privarswitch newton solver

parent 2b71199c
No related branches found
No related tags found
1 merge request!4Feature/improve fluidsystem ex
...@@ -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/privarswitchnewtonsolver.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::PriVarSwitchNewtonSolver<Assembler,LinearSolver,typename GET_PROP_TYPE(TypeTag, PrimaryVariableSwitch)>;
NewtonSolver nonLinearSolver(assembler, linearSolver); NewtonSolver nonLinearSolver(assembler, linearSolver);
// time loop // time loop
......
...@@ -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/privarswitchnewtonsolver.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::PriVarSwitchNewtonSolver<Assembler,LinearSolver,typename GET_PROP_TYPE(TypeTag, PrimaryVariableSwitch)>;
NewtonSolver nonLinearSolver(assembler, linearSolver); NewtonSolver nonLinearSolver(assembler, linearSolver);
// time loop // time loop
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment