Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
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
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Core Modules
dune-istl
Commits
df3fbed8
Commit
df3fbed8
authored
20 years ago
by
Peter Bastian
Browse files
Options
Downloads
Patches
Plain Diff
change in parameters for preconditioners
[[Imported from SVN: r79]]
parent
1be2638c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
istl/tutorial/example.cc
+9
-9
9 additions, 9 deletions
istl/tutorial/example.cc
with
9 additions
and
9 deletions
istl/tutorial/example.cc
+
9
−
9
View file @
df3fbed8
...
...
@@ -452,7 +452,7 @@ void test_Interface ()
E
[
i
][
i
]
=
-
1
;
// make a block compressed row matrix with five point stencil
const
int
BW2
=
64
,
N
=
BW2
*
BW2
;
const
int
BW2
=
512
,
N
=
BW2
*
BW2
;
Matrix
A
(
N
,
N
,
5
*
N
,
Dune
::
BCRSMatrix
<
MB
>::
row_wise
);
for
(
Matrix
::
CreateIterator
i
=
A
.
createbegin
();
i
!=
A
.
createend
();
++
i
)
{
...
...
@@ -485,17 +485,17 @@ void test_Interface ()
Dune
::
MatrixAdapter
<
Matrix
,
Vector
,
Vector
>
op
(
A
);
// make linear operator from A
Dune
::
SeqJac
<
Matrix
,
Vector
,
Vector
>
jac
(
A
,
1
,
1
);
// Jacobi preconditioner
Dune
::
SeqGS
<
Matrix
,
Vector
,
Vector
>
gs
(
A
,
1
,
1
);
// GS preconditioner
Dune
::
SeqSOR
<
Matrix
,
Vector
,
Vector
>
sor
(
A
,
1
,
1.9520932
);
// SSOR preconditioner
Dune
::
SeqSSOR
<
Matrix
,
Vector
,
Vector
>
ssor
(
A
,
1
,
1.9064547
);
// SSOR preconditioner
Dune
::
SeqILU0
<
Matrix
,
Vector
,
Vector
>
ilu0
(
A
);
// preconditioner object
Dune
::
SeqILUn
<
Matrix
,
Vector
,
Vector
>
ilu
n
(
A
,
0
);
// preconditioner object
Dune
::
LoopSolver
<
Vector
>
loop
(
op
,
ilu0
,
1E-
32
,
8000
,
2
);
// an inverse operator
Dune
::
CGSolver
<
Vector
>
cg
(
op
,
ilu
0
,
1E-8
,
8000
,
2
);
// an inverse operator
Dune
::
BiCGSTABSolver
<
Vector
>
bcgs
(
op
,
ilu
n
,
1E-8
,
8000
,
2
);
// an inverse operator
Dune
::
SeqSOR
<
Matrix
,
Vector
,
Vector
>
sor
(
A
,
1
,
1.9520932
);
// SSOR preconditioner
Dune
::
SeqSSOR
<
Matrix
,
Vector
,
Vector
>
ssor
(
A
,
1
,
1.9064547
);
// SSOR preconditioner
Dune
::
SeqILU0
<
Matrix
,
Vector
,
Vector
>
ilu0
(
A
,
1.0
);
// preconditioner object
Dune
::
SeqILUn
<
Matrix
,
Vector
,
Vector
>
ilu
1
(
A
,
1
,
0.92
);
// preconditioner object
Dune
::
LoopSolver
<
Vector
>
loop
(
op
,
ilu0
,
1E-
8
,
8000
,
2
);
// an inverse operator
Dune
::
CGSolver
<
Vector
>
cg
(
op
,
ilu
1
,
1E-8
,
8000
,
2
);
// an inverse operator
Dune
::
BiCGSTABSolver
<
Vector
>
bcgs
(
op
,
ilu
1
,
1E-8
,
8000
,
2
);
// an inverse operator
// call the solver
Dune
::
InverseOperatorResult
r
;
loop
.
apply
(
x
,
b
,
r
);
cg
.
apply
(
x
,
b
,
r
);
}
...
...
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