Skip to content
GitLab
Menu
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
1899a739
Commit
1899a739
authored
Mar 07, 2021
by
Timo Koch
Browse files
[example][1ptracer] Lower solver requirements (only use dune-istl)
(cherry picked from commit
884677ab
)
parent
310e3acb
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/1ptracer/CMakeLists.txt
View file @
1899a739
...
...
@@ -3,7 +3,6 @@ dune_symlink_to_source_files(FILES "params.input")
dumux_add_test
(
NAME example_1ptracer
LABELS porousmediumflow tracer example
SOURCES main.cc
CMAKE_GUARD HAVE_UMFPACK
COMMAND
${
CMAKE_SOURCE_DIR
}
/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files
${
CMAKE_SOURCE_DIR
}
/test/references/test_1ptracer_transport-reference.vtu
...
...
examples/1ptracer/doc/main.md
View file @
1899a739
...
...
@@ -161,7 +161,8 @@ The grid variables are used store variables (primary and secondary variables) on
```
We now instantiate the assembler class, assemble the linear system and solve it with the linear
solver UMFPack. Besides that, the time needed for assembly and solve is measured and printed.
solver ILUnBiCGSTABBackend (a bi-conjugate gradient solver preconditioned by an incomplete LU-factorization preconditioner).
Besides that, the time needed for assembly and solve is measured and printed.
```
cpp
using
OnePAssembler
=
FVAssembler
<
OnePTypeTag
,
DiffMethod
::
analytic
>
;
...
...
@@ -175,7 +176,7 @@ solver UMFPack. Besides that, the time needed for assembly and solve is measured
(
*
r
)
*=
-
1.0
;
// We want to solve `Ax = -r`.
using
LinearSolver
=
UMFPack
Backend
;
using
LinearSolver
=
ILUnBiCGSTAB
Backend
;
Dune
::
Timer
solverTimer
;
std
::
cout
<<
"Solving linear system ..."
<<
std
::
flush
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
();
linearSolver
->
solve
(
*
A
,
p
,
*
r
);
...
...
examples/1ptracer/main.cc
View file @
1899a739
...
...
@@ -127,7 +127,8 @@ int main(int argc, char** argv) try
onePGridVariables
->
init
(
p
);
// We now instantiate the assembler class, assemble the linear system and solve it with the linear
// solver UMFPack. Besides that, the time needed for assembly and solve is measured and printed.
// solver ILUnBiCGSTABBackend (a bi-conjugate gradient solver preconditioned by an incomplete LU-factorization preconditioner).
// Besides that, the time needed for assembly and solve is measured and printed.
using
OnePAssembler
=
FVAssembler
<
OnePTypeTag
,
DiffMethod
::
analytic
>
;
auto
assemblerOneP
=
std
::
make_shared
<
OnePAssembler
>
(
problemOneP
,
gridGeometry
,
onePGridVariables
);
assemblerOneP
->
setLinearSystem
(
A
,
r
);
// tell assembler to use our previously defined system
...
...
@@ -139,7 +140,7 @@ int main(int argc, char** argv) try
(
*
r
)
*=
-
1.0
;
// We want to solve `Ax = -r`.
using
LinearSolver
=
UMFPack
Backend
;
using
LinearSolver
=
ILUnBiCGSTAB
Backend
;
Dune
::
Timer
solverTimer
;
std
::
cout
<<
"Solving linear system ..."
<<
std
::
flush
;
auto
linearSolver
=
std
::
make_shared
<
LinearSolver
>
();
linearSolver
->
solve
(
*
A
,
p
,
*
r
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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