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
2ab958ad
Commit
2ab958ad
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Define finestSize
parent
312c1236
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
+11
-15
11 additions, 15 deletions
src/one-body-sample.cc
with
11 additions
and
15 deletions
src/one-body-sample.cc
+
11
−
15
View file @
2ab958ad
...
@@ -157,6 +157,7 @@ int main(int argc, char *argv[]) {
...
@@ -157,6 +157,7 @@ int main(int argc, char *argv[]) {
Dune
::
FieldVector
<
bool
,
dim
>
(
false
),
// non-periodic in each direction
Dune
::
FieldVector
<
bool
,
dim
>
(
false
),
// non-periodic in each direction
0
);
// zero overlap (whatever that is)
0
);
// zero overlap (whatever that is)
grid
->
globalRefine
(
refinements
);
grid
->
globalRefine
(
refinements
);
size_t
const
finestSize
=
grid
->
size
(
grid
->
maxLevel
(),
dim
);
typedef
GridType
::
LeafGridView
GridView
;
typedef
GridType
::
LeafGridView
GridView
;
GridView
const
leafView
=
grid
->
leafView
();
GridView
const
leafView
=
grid
->
leafView
();
...
@@ -196,29 +197,27 @@ int main(int argc, char *argv[]) {
...
@@ -196,29 +197,27 @@ int main(int argc, char *argv[]) {
GenericNonlinearGS
<
MyBlockProblemType
>
nonlinearGSStep
;
GenericNonlinearGS
<
MyBlockProblemType
>
nonlinearGSStep
;
nonlinearGSStep
.
ignoreNodes_
=
&
ignoreNodes
;
nonlinearGSStep
.
ignoreNodes_
=
&
ignoreNodes
;
VectorType
u1
(
grid
->
size
(
grid
->
maxLevel
(),
dim
)
);
VectorType
u1
(
finestSize
);
u1
=
0.0
;
// Has to be zero!
u1
=
0.0
;
// Has to be zero!
VectorType
u2
=
u1
;
VectorType
u2
=
u1
;
VectorType
u3
=
u1
;
VectorType
u3
=
u1
;
VectorType
u4
=
u1
;
VectorType
u4
=
u1
;
VectorType
u5
=
u1
;
VectorType
u5
=
u1
;
SingletonVectorType
s4_old
(
grid
->
size
(
grid
->
maxLevel
(),
dim
)
);
SingletonVectorType
s4_old
(
finestSize
);
SingletonVectorType
s5_old
(
grid
->
size
(
grid
->
maxLevel
(),
dim
)
);
SingletonVectorType
s5_old
(
finestSize
);
s4_old
=
parset
.
get
<
double
>
(
"boundary.friction.state.initial"
);
s4_old
=
parset
.
get
<
double
>
(
"boundary.friction.state.initial"
);
s5_old
=
s4_old
;
s5_old
=
s4_old
;
VectorType
u1_diff
(
grid
->
size
(
grid
->
maxLevel
(),
dim
)
);
VectorType
u1_diff
(
finestSize
);
u1_diff
=
0.0
;
// Has to be zero!
u1_diff
=
0.0
;
// Has to be zero!
VectorType
u2_diff
=
u1_diff
;
VectorType
u2_diff
=
u1_diff
;
VectorType
u3_diff
=
u1_diff
;
VectorType
u3_diff
=
u1_diff
;
VectorType
u4_diff
=
u1_diff
;
VectorType
u4_diff
=
u1_diff
;
VectorType
u5_diff
=
u1_diff
;
VectorType
u5_diff
=
u1_diff
;
auto
s4_new
=
Dune
::
make_shared
<
SingletonVectorType
>
(
auto
s4_new
=
Dune
::
make_shared
<
SingletonVectorType
>
(
finestSize
);
grid
->
size
(
grid
->
maxLevel
(),
dim
));
auto
s5_new
=
Dune
::
make_shared
<
SingletonVectorType
>
(
finestSize
);
auto
s5_new
=
Dune
::
make_shared
<
SingletonVectorType
>
(
grid
->
size
(
grid
->
maxLevel
(),
dim
));
*
s4_new
=
s4_old
;
*
s4_new
=
s4_old
;
*
s5_new
=
*
s4_new
;
*
s5_new
=
*
s4_new
;
...
@@ -305,12 +304,11 @@ int main(int argc, char *argv[]) {
...
@@ -305,12 +304,11 @@ int main(int argc, char *argv[]) {
if
(
parset
.
get
<
bool
>
(
"solver.nonlineargs.use"
))
{
if
(
parset
.
get
<
bool
>
(
"solver.nonlineargs.use"
))
{
auto
state
=
auto
state
=
Dune
::
make_shared
<
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
1
>>>
(
Dune
::
make_shared
<
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
1
>>>
(
grid
->
size
(
grid
->
maxLevel
(),
dim
)
);
finestSize
);
*
state
=
0.0
;
*
state
=
0.0
;
auto
myGlobalNonlinearity
=
auto
myGlobalNonlinearity
=
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
grid
->
size
(
grid
->
maxLevel
(),
dim
),
parset
,
nodalIntegrals
,
finestSize
,
parset
,
nodalIntegrals
,
state
,
h
);
state
,
h
);
MyConvexProblemType
const
myConvexProblem
(
stiffnessMatrix
,
MyConvexProblemType
const
myConvexProblem
(
stiffnessMatrix
,
*
myGlobalNonlinearity
,
b1
);
*
myGlobalNonlinearity
,
b1
);
MyBlockProblemType
myBlockProblem
(
parset
,
myConvexProblem
);
MyBlockProblemType
myBlockProblem
(
parset
,
myConvexProblem
);
...
@@ -331,8 +329,7 @@ int main(int argc, char *argv[]) {
...
@@ -331,8 +329,7 @@ int main(int argc, char *argv[]) {
++
state_fpi
)
{
++
state_fpi
)
{
auto
myGlobalNonlinearity
=
auto
myGlobalNonlinearity
=
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
grid
->
size
(
grid
->
maxLevel
(),
dim
),
parset
,
nodalIntegrals
,
finestSize
,
parset
,
nodalIntegrals
,
s4_new
,
h
);
s4_new
,
h
);
MyConvexProblemType
const
myConvexProblem
(
stiffnessMatrix
,
MyConvexProblemType
const
myConvexProblem
(
stiffnessMatrix
,
*
myGlobalNonlinearity
,
b4
);
*
myGlobalNonlinearity
,
b4
);
...
@@ -404,8 +401,7 @@ int main(int argc, char *argv[]) {
...
@@ -404,8 +401,7 @@ int main(int argc, char *argv[]) {
++
state_fpi
)
{
++
state_fpi
)
{
auto
myGlobalNonlinearity
=
auto
myGlobalNonlinearity
=
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
grid
->
size
(
grid
->
maxLevel
(),
dim
),
parset
,
nodalIntegrals
,
finestSize
,
parset
,
nodalIntegrals
,
s5_new
,
h
);
s5_new
,
h
);
MyConvexProblemType
const
myConvexProblem
(
stiffnessMatrix
,
MyConvexProblemType
const
myConvexProblem
(
stiffnessMatrix
,
*
myGlobalNonlinearity
,
b5
);
*
myGlobalNonlinearity
,
b5
);
...
...
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