Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
agnumpde
dune-tnnmg
Commits
fdf83307
Commit
fdf83307
authored
Dec 16, 2014
by
Carsten Gräser
Browse files
Add norm criterion to test
parent
5bd3116f
Changes
1
Hide whitespace changes
Inline
Side-by-side
dune/tnnmg/test/gradientmethodtest.cc
View file @
fdf83307
...
...
@@ -184,10 +184,15 @@ void solveProblem(const MatrixType& mat, VectorType& x, const VectorType& rhs, c
[
&
](){
return
Dune
::
formatString
(
" % 12.5e"
,
stepRule
.
x_
);},
" step size "
);
solver
.
addCriterion
(
Dune
::
Solvers
::
maxIterCriterion
(
solver
,
maxIterations
)
|
gradientCriterion
);
std
::
vector
<
double
>
correctionNorms
;
solver
.
addCriterion
(
Dune
::
Solvers
::
correctionNormCriterion
(
gradientStep
,
norm
,
1e-4
,
correctionNorms
));
solver
.
addCriterion
(
Dune
::
Solvers
::
correctionNormCriterion
(
gradientStep
,
norm
,
1e-4
));
solver
.
solve
();
std
::
cout
<<
correctionNorms
.
size
()
<<
std
::
endl
;
}
...
...
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