Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
8fc2c1b2
Commit
8fc2c1b2
authored
Mar 03, 2020
by
Timo Koch
Browse files
[test][cleanup] Use LinearSolverTraits and AMGBiCGSTABBackend
parent
3145f4c8
Changes
41
Hide whitespace changes
Inline
Side-by-side
examples/2pinfiltration/main.cc
View file @
8fc2c1b2
...
...
@@ -45,6 +45,7 @@
//we include the linear solver to be used to solve the linear system
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
//we include the nonlinear Newton's method
#include
<dumux/nonlinear/newtonsolver.hh>
// Further, we include assembler, which assembles the linear systems for finite volume schemes (box-scheme, tpfa-approximation, mpfa-approximation).
...
...
@@ -201,7 +202,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
);
// we set the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// additionally we set the non-linear solver.
...
...
examples/shallowwaterfriction/main.cc
View file @
8fc2c1b2
...
...
@@ -46,6 +46,7 @@
#include
<dumux/io/grid/gridmanager.hh>
// We include the linear solver to be used to solve the linear system
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
// We include the nonlinear newtons method
#include
<dumux/nonlinear/newtonsolver.hh>
// Further we include assembler, which assembles the linear systems for finite volume schemes (box-scheme, tpfa-approximation, mpfa-approximation)
...
...
@@ -128,7 +129,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
);
// We set the linear solver.
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// Additionaly, we set the non-linear solver.
...
...
test/freeflow/shallowwater/dambreak/main.cc
View file @
8fc2c1b2
...
...
@@ -40,6 +40,7 @@
#include
<dumux/io/grid/gridmanager.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -122,7 +123,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/freeflow/shallowwater/roughchannel/main.cc
View file @
8fc2c1b2
...
...
@@ -38,6 +38,7 @@
#include
<dumux/io/grid/gridmanager.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -120,7 +121,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/geomechanics/elastic/main.cc
View file @
8fc2c1b2
...
...
@@ -40,6 +40,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -118,7 +119,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/geomechanics/poroelastic/main.cc
View file @
8fc2c1b2
...
...
@@ -41,6 +41,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -187,7 +188,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/1p/implicit/fracture2d3d/main.cc
View file @
8fc2c1b2
...
...
@@ -41,6 +41,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -147,7 +148,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/1p/implicit/isothermal/main.cc
View file @
8fc2c1b2
...
...
@@ -41,6 +41,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -158,7 +159,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/1p/implicit/network1d3d/main.cc
View file @
8fc2c1b2
...
...
@@ -41,6 +41,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -147,7 +148,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/1p/implicit/nonisothermal/main.cc
View file @
8fc2c1b2
...
...
@@ -42,6 +42,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -167,7 +168,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/1p/implicit/periodicbc/main.cc
View file @
8fc2c1b2
...
...
@@ -33,6 +33,7 @@
#include
<dune/grid/io/file/vtk.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/common/properties.hh>
#include
<dumux/common/parameters.hh>
...
...
@@ -127,7 +128,7 @@ int main(int argc, char** argv) try
// solve the linear system
Dune
::
Timer
solverTimer
;
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
gridGeometry
->
gridView
(),
gridGeometry
->
dofMapper
());
if
(
mpiHelper
.
rank
()
==
0
)
std
::
cout
<<
"Solving linear system using "
+
linearSolver
->
name
()
+
"..."
<<
std
::
flush
;
...
...
test/porousmediumflow/1p/implicit/pointsources/timedependent/main.cc
View file @
8fc2c1b2
...
...
@@ -41,6 +41,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -123,7 +124,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/1p/implicit/pointsources/timeindependent/main.cc
View file @
8fc2c1b2
...
...
@@ -41,6 +41,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -123,7 +124,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/2p/implicit/adaptive/main.cc
View file @
8fc2c1b2
...
...
@@ -38,6 +38,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -210,7 +211,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/2p/implicit/cornerpoint/main.cc
View file @
8fc2c1b2
...
...
@@ -47,6 +47,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -163,7 +164,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/2p/implicit/fracture/main.cc
View file @
8fc2c1b2
...
...
@@ -40,6 +40,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -136,7 +137,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/2p/implicit/incompressible/main.cc
View file @
8fc2c1b2
...
...
@@ -41,6 +41,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -176,7 +177,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/main.cc
View file @
8fc2c1b2
...
...
@@ -37,6 +37,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/porousmediumflow/nonequilibrium/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -151,7 +152,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/2p2c/implicit/injection/main.cc
View file @
8fc2c1b2
...
...
@@ -37,6 +37,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -136,7 +137,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
test/porousmediumflow/2p2c/implicit/mpnccomparison/main.cc
View file @
8fc2c1b2
...
...
@@ -37,6 +37,7 @@
#include
<dumux/common/dumuxmessage.hh>
#include
<dumux/linear/amgbackend.hh>
#include
<dumux/linear/linearsolvertraits.hh>
#include
<dumux/nonlinear/newtonsolver.hh>
#include
<dumux/assembly/fvassembler.hh>
...
...
@@ -147,7 +148,7 @@ int main(int argc, char** argv) try
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
gridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
AMGB
ackend
<
TypeTag
>
;
using
LinearSolver
=
AMGB
iCGSTABBackend
<
LinearSolverTraits
<
GridGeometry
>
>
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
(
leafGridView
,
gridGeometry
->
dofMapper
());
// the non-linear solver
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment