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
12ce2c58
Commit
12ce2c58
authored
10 years ago
by
Elias Pipping
Browse files
Options
Downloads
Patches
Plain Diff
[Algorit] Kill damping
parent
f592a86a
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
src/sand-wedge-data/parset.cfg
+0
-2
0 additions, 2 deletions
src/sand-wedge-data/parset.cfg
src/sand-wedge.cc
+2
-27
2 additions, 27 deletions
src/sand-wedge.cc
with
2 additions
and
29 deletions
src/sand-wedge-data/parset.cfg
+
0
−
2
View file @
12ce2c58
...
...
@@ -60,8 +60,6 @@ verbosity = quiet
[v.fpi]
tolerance
=
1e-10
maximumIterations
=
10000
relaxation
=
0.5
requiredReduction
=
0.5
lambda
=
0.5
[solver.tnnmg.linear]
...
...
This diff is collapsed.
Click to expand it.
src/sand-wedge.cc
+
2
−
27
View file @
12ce2c58
...
...
@@ -340,8 +340,7 @@ int main(int argc, char *argv[]) {
dirichletNodes
);
auto
multigridStep
=
factory
.
getSolver
();
std
::
fstream
iterationWriter
(
"iterations"
,
std
::
fstream
::
out
),
relaxationWriter
(
"relaxation"
,
std
::
fstream
::
out
);
std
::
fstream
iterationWriter
(
"iterations"
,
std
::
fstream
::
out
);
auto
timeSteppingScheme
=
initTimeStepper
(
parset
.
get
<
Config
::
scheme
>
(
"timeSteps.scheme"
),
...
...
@@ -363,10 +362,7 @@ int main(int argc, char *argv[]) {
parset
.
get
<
size_t
>
(
"v.solver.maximumIterations"
);
auto
const
tau
=
parset
.
get
<
double
>
(
"problem.finalTime"
)
/
timeSteps
,
tolerance
=
parset
.
get
<
double
>
(
"v.solver.tolerance"
),
fixedPointTolerance
=
parset
.
get
<
double
>
(
"v.fpi.tolerance"
),
relaxation
=
parset
.
get
<
double
>
(
"v.fpi.relaxation"
),
requiredReduction
=
parset
.
get
<
double
>
(
"v.fpi.requiredReduction"
);
fixedPointTolerance
=
parset
.
get
<
double
>
(
"v.fpi.tolerance"
);
auto
const
printProgress
=
parset
.
get
<
bool
>
(
"io.printProgress"
);
auto
const
verbosity
=
parset
.
get
<
Solver
::
VerbosityMode
>
(
"v.solver.verbosity"
);
...
...
@@ -413,8 +409,6 @@ int main(int argc, char *argv[]) {
Vector
u
;
Vector
v_saved
;
ScalarVector
alpha_saved
;
double
lastStateCorrection
;
for
(
size_t
stateFPI
=
1
;
stateFPI
<=
maximumStateFPI
;
++
stateFPI
)
{
timeSteppingScheme
->
extractOldVelocity
(
v_m
);
v_m
*=
1.0
-
lambda
;
...
...
@@ -423,22 +417,6 @@ int main(int argc, char *argv[]) {
stateUpdater
->
solve
(
v_m
);
stateUpdater
->
extractAlpha
(
alpha
);
if
(
stateFPI
==
1
)
relaxationWriter
<<
"N "
;
else
{
double
const
stateCorrection
=
stateEnergyNorm
.
diff
(
alpha
,
alpha_saved
);
if
(
stateFPI
<=
2
// lastStateCorrection is only set for stateFPI > 2
or
stateCorrection
<
requiredReduction
*
lastStateCorrection
)
relaxationWriter
<<
"N "
;
else
{
alpha
*=
(
1.0
-
relaxation
);
Arithmetic
::
addProduct
(
alpha
,
relaxation
,
alpha_saved
);
relaxationWriter
<<
"Y "
;
}
lastStateCorrection
=
stateCorrection
;
}
solveVelocityProblem
(
velocityIterate
,
alpha
);
timeSteppingScheme
->
postProcess
(
velocityIterate
);
timeSteppingScheme
->
extractDisplacement
(
u
);
...
...
@@ -456,7 +434,6 @@ int main(int argc, char *argv[]) {
if
(
stateFPI
==
maximumStateFPI
)
DUNE_THROW
(
Dune
::
Exception
,
"FPI failed to converge"
);
alpha_saved
=
alpha
;
v_saved
=
v
;
}
if
(
printProgress
)
...
...
@@ -470,7 +447,6 @@ int main(int argc, char *argv[]) {
report
(
ur
,
vr
,
alpha
);
iterationWriter
<<
std
::
endl
;
relaxationWriter
<<
std
::
endl
;
{
BasisGridFunction
<
typename
MyAssembler
::
VertexBasis
,
Vector
>
...
...
@@ -489,7 +465,6 @@ int main(int argc, char *argv[]) {
}
}
iterationWriter
.
close
();
relaxationWriter
.
close
();
Python
::
stop
();
}
...
...
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