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
Dmitri Naumov
ogs
Commits
caffa4e1
Commit
caffa4e1
authored
3 years ago
by
Dominik Kern
Committed by
Dmitri Naumov
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Staggered: check all processes for convergence in coupling iterations
parent
3811e436
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
ProcessLib/TimeLoop.cpp
+8
-12
8 additions, 12 deletions
ProcessLib/TimeLoop.cpp
with
8 additions
and
12 deletions
ProcessLib/TimeLoop.cpp
+
8
−
12
View file @
caffa4e1
...
...
@@ -768,7 +768,6 @@ TimeLoop::solveCoupledEquationSystemsByStaggeredScheme(
{
// TODO(wenqing): use process name
coupling_iteration_converged
=
true
;
int
const
last_process_id
=
_per_process_data
.
size
()
-
1
;
_xdot_vector_ids
.
resize
(
_per_process_data
.
size
());
std
::
size_t
cnt
=
0
;
for
(
auto
&
process_data
:
_per_process_data
)
...
...
@@ -815,17 +814,14 @@ TimeLoop::solveCoupledEquationSystemsByStaggeredScheme(
if
(
global_coupling_iteration
>
0
)
{
MathLib
::
LinAlg
::
axpy
(
x_old
,
-
1.0
,
x
);
// save dx to x_old
if
(
process_id
==
last_process_id
)
{
INFO
(
"------- Checking convergence criterion for coupled "
"solution -------"
);
_global_coupling_conv_crit
[
process_id
]
->
checkDeltaX
(
x_old
,
x
);
coupling_iteration_converged
=
coupling_iteration_converged
&&
_global_coupling_conv_crit
[
process_id
]
->
isSatisfied
();
}
INFO
(
"------- Checking convergence criterion for coupled "
"solution of process #{:d} -------"
,
process_id
);
_global_coupling_conv_crit
[
process_id
]
->
checkDeltaX
(
x_old
,
x
);
coupling_iteration_converged
=
coupling_iteration_converged
&&
_global_coupling_conv_crit
[
process_id
]
->
isSatisfied
();
}
MathLib
::
LinAlg
::
copy
(
x
,
x_old
);
}
// end of for (auto& process_data : _per_process_data)
...
...
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