Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-elasticity
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
agnumpde
dune-elasticity
Commits
41b4d44a
Commit
41b4d44a
authored
17 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use the ConfigParser
[[Imported from SVN: r9850]]
parent
c19ab699
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
nonlinelast.cc
+22
-50
22 additions, 50 deletions
nonlinelast.cc
with
22 additions
and
50 deletions
nonlinelast.cc
+
22
−
50
View file @
41b4d44a
#include
<config.h>
#include
<dune/common/bitfield.hh>
#include
<dune/common/configparser.hh>
#include
<dune/grid/uggrid.hh>
#include
<dune/grid/io/file/amirameshwriter.hh>
...
...
@@ -28,64 +29,35 @@
// The grid dimension
const
int
dim
=
3
;
// Number of grid levels
const
int
numLevels
=
1
;
// Number of steps for the boundary data homotopy
const
int
numHomotopySteps
=
1
;
// Number of Newton steps
const
int
numNewtonSteps
=
1
;
// Number of multigrid iterations per time step
const
int
numIt
=
1000
;
// Number of presmoothing steps
const
int
nu1
=
3
;
// Number of postsmoothing steps
const
int
nu2
=
3
;
// Number of coarse grid corrections
const
int
mu
=
1
;
// Number of base solver iterations
const
int
baseIt
=
100
;
// Tolerance of the solver
const
double
tolerance
=
1e-5
;
// Tolerance of the base grid solver
const
double
baseTolerance
=
-
1
;
using
namespace
Dune
;
// ////////////////////////////////////
// Problem specifications
// ////////////////////////////////////
// std::string gridFile = "data_1b/unithexacube.am";
// std::string dnFile = "data_1b/unithexacube.x.dn";
// std::string dvFile = "data_1b/unithexacube.x.vectors";
// double obs(const FieldVector<double, dim>& x) {return -(x[0]-1.005);}
// double obsDistance = 0.01;
std
::
string
gridFile
=
"/home/haile/sander/data/elasticity/cubus27/Cubus27.grid"
;
std
::
string
dnFile
=
"/home/haile/sander/data/elasticity/cubus27/cubus27.dn"
;
std
::
string
dvFile
=
"/home/haile/sander/data/elasticity/cubus27/cubus27.dv"
;
// std::string gridFile = "data_1b/sphere.coarse.grid";
// std::string dnFile = "data_1b/sphere.coarse.dn";
// std::string dvFile = "data_1b/sphere.coarse.vectors";
// double obs(const FieldVector<double, dim>& x) {return -(x[0]-1);}
// double obsDistance = 0.2;
int
main
(
int
argc
,
char
*
argv
[])
try
{
// Some types that I need
typedef
BCRSMatrix
<
FieldMatrix
<
double
,
dim
,
dim
>
>
OperatorType
;
typedef
BlockVector
<
FieldVector
<
double
,
dim
>
>
VectorType
;
// parse data file
ConfigParser
parameterSet
;
parameterSet
.
parseFile
(
"nonlinelast.parset"
);
// read solver settings
const
int
numLevels
=
parameterSet
.
get
<
int
>
(
"numLevels"
);
const
int
numHomotopySteps
=
parameterSet
.
get
<
int
>
(
"numHomotopySteps"
);
const
int
numNewtonSteps
=
parameterSet
.
get
<
int
>
(
"numNewtonSteps"
);
const
int
numIt
=
parameterSet
.
get
(
"numIt"
,
int
(
0
));
const
int
nu1
=
parameterSet
.
get
(
"nu1"
,
int
(
0
));
const
int
nu2
=
parameterSet
.
get
(
"nu2"
,
int
(
0
));
const
int
mu
=
parameterSet
.
get
(
"mu"
,
int
(
0
));
const
int
baseIt
=
parameterSet
.
get
(
"baseIt"
,
int
(
0
));
const
double
tolerance
=
parameterSet
.
get
(
"tolerance"
,
double
(
0
));
const
double
baseTolerance
=
parameterSet
.
get
(
"baseTolerance"
,
double
(
0
));
// read problem settings
std
::
string
gridFile
=
parameterSet
.
get
<
std
::
string
>
(
"gridFile"
);
std
::
string
dnFile
=
parameterSet
.
get
<
std
::
string
>
(
"dnFile"
);
std
::
string
dvFile
=
parameterSet
.
get
<
std
::
string
>
(
"dvFile"
);
// /////////////////////////////
// Generate the grid
// /////////////////////////////
...
...
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