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
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
Patrick Jaap
dune-istl
Commits
8b6d7a1b
Commit
8b6d7a1b
authored
3 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[minres] Compute preconditioned residual also for initial residual
parent
6dd9cc25
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+6
-0
6 additions, 0 deletions
CHANGELOG.md
dune/istl/solvers.hh
+11
-13
11 additions, 13 deletions
dune/istl/solvers.hh
with
17 additions
and
13 deletions
CHANGELOG.md
+
6
−
0
View file @
8b6d7a1b
# Master (will become release 2.9)
-
MINRES: The algorithm computes the preconditioned defect during the iterations. However, the initial
defect was computed as the defect of the original/non-preconditioned system. This is now changed so
that the initial defect is also computed as the preconditioned defect (this is also in line with GMRes).
In some numerical tests with a Stokes system this lead to earlier termination when using the same
termination criterion.
# Release 2.8
-
Extended the MatrixMarket IO functions for reading and writing vectors with
...
...
This diff is collapsed.
Click to expand it.
dune/istl/solvers.hh
+
11
−
13
View file @
8b6d7a1b
...
...
@@ -623,11 +623,16 @@ namespace Dune {
_prec
->
pre
(
x
,
b
);
// overwrite rhs with defect
_op
->
applyscaleadd
(
-
1
,
x
,
b
);
_op
->
applyscaleadd
(
-
1
.0
,
x
,
b
);
// b -= Ax
// compute residual norm
real_type
def
=
_sp
->
norm
(
b
);
if
(
iteration
.
step
(
0
,
def
)){
// some temporary vectors
X
z
(
b
),
dummy
(
b
);
z
=
0.0
;
// calculate preconditioned defect
_prec
->
apply
(
z
,
b
);
// r = W^-1 (b - Ax)
real_type
def
=
_sp
->
norm
(
z
);
if
(
iteration
.
step
(
0
,
def
)){
_prec
->
post
(
x
);
return
;
}
...
...
@@ -645,13 +650,6 @@ namespace Dune {
// the rhs vector of the min problem
std
::
array
<
field_type
,
2
>
xi
{{
1.0
,
0.0
}};
// some temporary vectors
X
z
(
b
),
dummy
(
b
);
// initialize and clear correction
z
=
0.0
;
_prec
->
apply
(
z
,
b
);
// beta is real and positive in exact arithmetic
// since it is the norm of the basis vectors (in unpreconditioned case)
beta
=
sqrt
(
_sp
->
dot
(
b
,
z
));
...
...
@@ -741,8 +739,8 @@ namespace Dune {
}
}
// end for
// postprocess preconditioner
_prec
->
post
(
x
);
// postprocess preconditioner
_prec
->
post
(
x
);
}
private
:
...
...
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