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
38fef81c
Commit
38fef81c
authored
12 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
Add some documentation to the dbgs method
Patch by Matthias Wohlmuth FS 1170 [[Imported from SVN: r1688]]
parent
af6c6218
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/gsetc.hh
+15
-14
15 additions, 14 deletions
dune/istl/gsetc.hh
with
15 additions
and
14 deletions
dune/istl/gsetc.hh
+
15
−
14
View file @
38fef81c
...
...
@@ -407,16 +407,17 @@ namespace Dune {
rowiterator
endi
=
A
.
end
();
for
(
rowiterator
i
=
A
.
begin
();
i
!=
endi
;
++
i
)
{
rhs
=
b
[
i
.
index
()];
rhs
=
b
[
i
.
index
()];
// rhs = b_i
coliterator
endj
=
(
*
i
).
end
();
coliterator
j
=
(
*
i
).
begin
();
for
(;
j
.
index
()
<
i
.
index
();
++
j
)
(
*
j
).
mmv
(
x
[
j
.
index
()],
rhs
);
coliterator
diag
=
j
++
;
for
(;
j
!=
endj
;
++
j
)
(
*
j
).
mmv
(
x
[
j
.
index
()],
rhs
);
algmeta_itsteps
<
I
-
1
>::
dbgs
(
*
diag
,
x
[
i
.
index
()],
rhs
,
w
);
for
(;
j
.
index
()
<
i
.
index
();
++
j
)
// iterate over a_ij with j < i
(
*
j
).
mmv
(
x
[
j
.
index
()],
rhs
);
// rhs -= sum_{j<i} a_ij * xnew_j
coliterator
diag
=
j
++
;
// *diag = a_ii and increment coliterator j from a_ii to a_i+1,i to skip diagonal
for
(;
j
!=
endj
;
++
j
)
// iterate over a_ij with j > i
(
*
j
).
mmv
(
x
[
j
.
index
()],
rhs
);
// rhs -= sum_{j>i} a_ij * xold_j
algmeta_itsteps
<
I
-
1
>::
dbgs
(
*
diag
,
x
[
i
.
index
()],
rhs
,
w
);
// if I==1: xnew_i = rhs/a_ii
}
// next two lines: xnew_i = w / a_ii * (b_i - sum_{j<i} a_ij * xnew_j - sum_{j>=i} a_ij * xold_j) + (1-w)*xold;
x
*=
w
;
x
.
axpy
(
K
(
1
)
-
w
,
xold
);
}
...
...
@@ -458,16 +459,16 @@ namespace Dune {
rowiterator
endi
=
A
.
end
();
for
(
rowiterator
i
=
A
.
begin
();
i
!=
endi
;
++
i
)
{
rhs
=
b
[
i
.
index
()];
coliterator
endj
=
(
*
i
).
end
();
rhs
=
b
[
i
.
index
()];
// rhs = b_i
coliterator
endj
=
(
*
i
).
end
();
// iterate over a_ij with j < i
coliterator
j
=
(
*
i
).
begin
();
for
(;
j
.
index
()
<
i
.
index
();
++
j
)
(
*
j
).
mmv
(
x
[
j
.
index
()],
rhs
);
coliterator
diag
=
j
;
(
*
j
).
mmv
(
x
[
j
.
index
()],
rhs
);
// rhs -= sum_{j<i} a_ij * xnew_j
coliterator
diag
=
j
;
// *diag = a_ii
for
(;
j
!=
endj
;
++
j
)
(
*
j
).
mmv
(
x
[
j
.
index
()],
rhs
);
algmeta_itsteps
<
I
-
1
>::
bsorf
(
*
diag
,
v
,
rhs
,
w
);
x
[
i
.
index
()].
axpy
(
w
,
v
);
(
*
j
).
mmv
(
x
[
j
.
index
()],
rhs
);
// rhs -= sum_{j<i} a_ij * xnew_j
algmeta_itsteps
<
I
-
1
>::
bsorf
(
*
diag
,
v
,
rhs
,
w
);
// if blocksize I==1: v = rhs/a_ii
x
[
i
.
index
()].
axpy
(
w
,
v
);
// x_i = w / a_ii * (b_i - sum_{j<i} a_ij * xnew_j - sum_{j>=i} a_ij * xold_j)
}
}
...
...
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