Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
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
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
podlesny
dune-tectonic
Commits
2bb07e1f
Commit
2bb07e1f
authored
11 years ago
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
[Cleanup] Rename state_fpi_*
parent
e0100f06
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
src/one-body-sample.cc
+6
-7
6 additions, 7 deletions
src/one-body-sample.cc
with
6 additions
and
7 deletions
src/one-body-sample.cc
+
6
−
7
View file @
2bb07e1f
...
...
@@ -474,7 +474,7 @@ int main(int argc, char *argv[]) {
SingletonVectorType
alpha
(
finestSize
);
auto
const
timesteps
=
parset
.
get
<
size_t
>
(
"timeSteps.number"
),
state_fpi_max
=
parset
.
get
<
size_t
>
(
"v.fpi.maximumIterations"
),
maximumStateFPI
=
parset
.
get
<
size_t
>
(
"v.fpi.maximumIterations"
),
maximumIterations
=
parset
.
get
<
size_t
>
(
"v.solver.maximumIterations"
);
auto
const
tau
=
parset
.
get
<
double
>
(
"problem.finalTime"
)
/
timesteps
,
...
...
@@ -533,17 +533,16 @@ int main(int argc, char *argv[]) {
VectorType
u_saved
;
SingletonVectorType
alpha_saved
;
double
lastStateCorrection
;
for
(
size_t
state
_fpi
=
1
;
state
_fpi
<=
state_fpi_max
;
++
state
_fpi
)
{
for
(
size_t
state
FPI
=
1
;
state
FPI
<=
maximumStateFPI
;
++
state
FPI
)
{
stateUpdater
->
solve
(
v
);
stateUpdater
->
extractState
(
alpha
);
if
(
state
_fpi
==
1
)
if
(
state
FPI
==
1
)
relaxationWriter
<<
"N "
;
else
{
double
const
stateCorrection
=
stateEnergyNorm
.
diff
(
alpha
,
alpha_saved
);
if
(
state_fpi
<=
2
// lastStateCorrection is only set for state_fpi > 2
if
(
stateFPI
<=
2
// lastStateCorrection is only set for stateFPI > 2
or
stateCorrection
<
requiredReduction
*
lastStateCorrection
)
relaxationWriter
<<
"N "
;
else
{
...
...
@@ -563,12 +562,12 @@ int main(int argc, char *argv[]) {
if
(
printProgress
)
(
std
::
cout
<<
'.'
).
flush
();
if
(
state
_fpi
>
1
)
{
if
(
state
FPI
>
1
)
{
double
const
velocityCorrection
=
AMNorm
.
diff
(
u_saved
,
u
);
if
(
velocityCorrection
<
fixedPointTolerance
)
break
;
}
if
(
state
_fpi
==
state_fpi_max
)
if
(
state
FPI
==
maximumStateFPI
)
DUNE_THROW
(
Dune
::
Exception
,
"FPI failed to converge"
);
alpha_saved
=
alpha
;
...
...
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