Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
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
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
Sander, Oliver
dune-gfe
Commits
efddce47
Commit
efddce47
authored
17 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
print the n-to-last total convergence rate
[[Imported from SVN: r1613]]
parent
896bb21f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dirneucoupling.cc
+12
-5
12 additions, 5 deletions
dirneucoupling.cc
with
12 additions
and
5 deletions
dirneucoupling.cc
+
12
−
5
View file @
efddce47
...
...
@@ -224,6 +224,8 @@ int main (int argc, char *argv[]) try
baseTolerance
,
false
);
rodSolver
.
verbosity_
=
Solver
::
QUIET
;
// ////////////////////////////////
// Create a multigrid solver
// ////////////////////////////////
...
...
@@ -454,7 +456,6 @@ int main (int argc, char *argv[]) try
double
error
=
std
::
numeric_limits
<
double
>::
max
();
double
oldError
=
0
;
double
totalConvRate
=
1
;
VectorType
intermediateSol3d
(
x3d
.
size
());
RodSolutionType
intermediateSolRod
(
rodX
.
size
());
...
...
@@ -471,7 +472,11 @@ int main (int argc, char *argv[]) try
oldError
=
std
::
sqrt
(
oldError
);
// Store the history of total conv rates so we can filter out numerical
// dirt in the end.
std
::
vector
<
double
>
totalConvRate
(
maxDirichletNeumannSteps
);
totalConvRate
[
0
]
=
1
;
int
i
;
for
(
i
=
0
;
i
<
maxDirichletNeumannSteps
;
i
++
)
{
...
...
@@ -522,12 +527,12 @@ int main (int argc, char *argv[]) try
double
convRate
=
error
/
oldError
;
totalConvRate
*
=
convRate
;
totalConvRate
[
i
+
1
]
=
totalConvRate
[
i
]
*
convRate
;
// Output
std
::
cout
<<
"DD iteration: "
<<
i
<<
" error : "
<<
error
<<
", "
<<
"convrate "
<<
convRate
<<
" total conv rate "
<<
std
::
pow
(
totalConvRate
,
1
/
((
double
)
i
+
1
))
<<
std
::
endl
;
<<
" total conv rate "
<<
std
::
pow
(
totalConvRate
[
i
+
1
]
,
1
/
((
double
)
i
+
1
))
<<
std
::
endl
;
if
(
error
<
1e-12
)
break
;
...
...
@@ -536,8 +541,10 @@ int main (int argc, char *argv[]) try
}
int
backTrace
=
1
;
std
::
cout
<<
"damping: "
<<
damping
<<
" convRate: "
<<
std
::
pow
(
totalConvRate
,
1
/
((
double
)
i
+
1
))
<<
std
::
endl
;
<<
" convRate: "
<<
std
::
pow
(
totalConvRate
[
i
+
1
-
backTrace
],
1
/
((
double
)
i
+
1
-
backTrace
))
<<
std
::
endl
;
// //////////////////////////////
...
...
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