Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-solvers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
agnumpde
dune-solvers
Commits
ade802ff
Commit
ade802ff
authored
13 years ago
by
Uli Sack
Committed by
usack
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
make positivity tolerance variable, to be set in constructor
[[Imported from SVN: r6271]]
parent
800b6a1b
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
dune/solvers/norms/energynorm.hh
+11
-8
11 additions, 8 deletions
dune/solvers/norms/energynorm.hh
with
11 additions
and
8 deletions
dune/solvers/norms/energynorm.hh
+
11
−
8
View file @
ade802ff
...
...
@@ -28,14 +28,14 @@
/** \brief The type used for the result */
typedef
typename
DiscFuncType
::
field_type
field_type
;
EnergyNorm
()
:
iterationStep_
(
NULL
),
matrix_
(
NULL
)
{}
EnergyNorm
(
const
double
tol
=
1e-10
)
:
iterationStep_
(
NULL
),
matrix_
(
NULL
)
,
tol_
(
tol
)
{}
EnergyNorm
(
LinearIterationStep
<
OperatorType
,
DiscFuncType
>&
it
)
:
iterationStep_
(
&
it
),
matrix_
(
NULL
)
EnergyNorm
(
LinearIterationStep
<
OperatorType
,
DiscFuncType
>&
it
,
const
double
tol
=
1e-10
)
:
iterationStep_
(
&
it
),
matrix_
(
NULL
)
,
tol_
(
tol
)
{}
EnergyNorm
(
const
OperatorType
&
matrix
)
:
iterationStep_
(
NULL
),
matrix_
(
&
matrix
)
EnergyNorm
(
const
OperatorType
&
matrix
,
const
double
tol
=
1e-10
)
:
iterationStep_
(
NULL
),
matrix_
(
&
matrix
)
,
tol_
(
tol
)
{}
void
setMatrix
(
const
OperatorType
*
matrix
)
{
...
...
@@ -81,7 +81,7 @@
if
(
ret
<
0
)
{
if
(
ret
<
-
1e-13
)
if
(
ret
<
-
tol_
)
{
char
msg
[
1024
];
sprintf
(
msg
,
"Supplied linear operator is not positive (semi-)definite: (u,Au) = %e"
,
ret
);
...
...
@@ -96,7 +96,8 @@
/** \brief Compute the squared norm for a given vector and matrix
\todo This could be implemented without the temporary. */
static
field_type
normSquared
(
const
DiscFuncType
&
u
,
const
OperatorType
&
A
)
const
OperatorType
&
A
,
const
double
tol
=
1e-10
)
{
DiscFuncType
tmp
(
u
.
size
());
tmp
=
0
;
...
...
@@ -106,7 +107,7 @@
if
(
ret
<
0
)
{
if
(
ret
<
-
1e-13
)
if
(
ret
<
-
tol
)
{
char
msg
[
1024
];
sprintf
(
msg
,
"Supplied linear operator is not positive (semi-)definite: (u,Au) = %e"
,
ret
);
...
...
@@ -125,6 +126,8 @@
const
OperatorType
*
matrix_
;
const
double
tol_
;
};
#endif
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