Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Özgür Ozan Sen
ogs
Commits
e61f4d0b
Commit
e61f4d0b
authored
8 years ago
by
Norihiro Watanabe
Committed by
Dmitri Naumov
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Num/ODE] print norms of delta x in ConvergenceCriterionResidual
parent
b5bf1b6b
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
NumLib/ODESolver/ConvergenceCriterionResidual.cpp
+10
-0
10 additions, 0 deletions
NumLib/ODESolver/ConvergenceCriterionResidual.cpp
NumLib/ODESolver/ConvergenceCriterionResidual.h
+5
-3
5 additions, 3 deletions
NumLib/ODESolver/ConvergenceCriterionResidual.h
with
15 additions
and
3 deletions
NumLib/ODESolver/ConvergenceCriterionResidual.cpp
+
10
−
0
View file @
e61f4d0b
...
...
@@ -29,6 +29,16 @@ ConvergenceCriterionResidual::ConvergenceCriterionResidual(
"specified."
);
}
void
ConvergenceCriterionResidual
::
checkDeltaX
(
const
GlobalVector
&
minus_delta_x
,
GlobalVector
const
&
x
)
{
auto
error_dx
=
MathLib
::
LinAlg
::
norm
(
minus_delta_x
,
_norm_type
);
auto
norm_x
=
MathLib
::
LinAlg
::
norm
(
x
,
_norm_type
);
INFO
(
"Convergence criterion: |dx|=%.4e, |x|=%.4e, |dx|/|x|=%.4e"
,
error_dx
,
norm_x
,
error_dx
/
norm_x
);
}
void
ConvergenceCriterionResidual
::
checkResidual
(
const
GlobalVector
&
residual
)
{
auto
norm_res
=
MathLib
::
LinAlg
::
norm
(
residual
,
_norm_type
);
...
...
This diff is collapsed.
Click to expand it.
NumLib/ODESolver/ConvergenceCriterionResidual.h
+
5
−
3
View file @
e61f4d0b
...
...
@@ -30,11 +30,13 @@ public:
boost
::
optional
<
double
>&&
relative_tolerance
,
MathLib
::
VecNormType
norm_type
);
bool
hasDeltaXCheck
()
const
override
{
return
fals
e
;
}
bool
hasDeltaXCheck
()
const
override
{
return
tru
e
;
}
bool
hasResidualCheck
()
const
override
{
return
true
;
}
void
checkDeltaX
(
const
GlobalVector
&
/*minus_delta_x*/
,
GlobalVector
const
&
/*x*/
)
override
{}
/// The function will only do diagnostic output and no actual check of the
/// solution increment is made
void
checkDeltaX
(
const
GlobalVector
&
minus_delta_x
,
GlobalVector
const
&
x
)
override
;
void
checkResidual
(
const
GlobalVector
&
residual
)
override
;
void
preFirstIteration
()
override
{
_is_first_iteration
=
true
;
}
...
...
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