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
ccd387c2
Commit
ccd387c2
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
grid: stack->heap
parent
48cbf044
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
+12
-10
12 additions, 10 deletions
src/one-body-sample.cc
with
12 additions
and
10 deletions
src/one-body-sample.cc
+
12
−
10
View file @
ccd387c2
...
...
@@ -202,15 +202,15 @@ int main(int argc, char *argv[]) {
typedef
Dune
::
YaspGrid
<
dim
>
GridType
;
Dune
::
FieldVector
<
double
,
dim
>
const
end_points
(
1
);
// nth dimension (zero-indexed) goes from 0 to end_points[n]
GridType
grid
(
auto
grid
=
Dune
::
make_shared
<
GridType
>
(
end_points
,
Dune
::
FieldVector
<
int
,
dim
>
(
1
),
// number of elements in each direction
Dune
::
FieldVector
<
bool
,
dim
>
(
false
),
// non-periodic in each direction
0
);
// zero overlap (whatever that is)
grid
.
globalRefine
(
refinements
);
grid
->
globalRefine
(
refinements
);
typedef
GridType
::
LeafGridView
GridView
;
GridView
const
leafView
=
grid
.
leafView
();
GridView
const
leafView
=
grid
->
leafView
();
// }}}
// Set up bases
...
...
@@ -232,9 +232,11 @@ int main(int argc, char *argv[]) {
EnergyNorm
<
OperatorType
,
VectorType
>
energyNorm
(
stiffnessMatrix
);
// Set up the boundary
Dune
::
BitSetVector
<
dim
>
ignoreNodes
(
grid
.
size
(
grid
.
maxLevel
(),
dim
),
false
);
Dune
::
BitSetVector
<
1
>
neumannNodes
(
grid
.
size
(
grid
.
maxLevel
(),
dim
),
false
);
Dune
::
BitSetVector
<
1
>
frictionalNodes
(
grid
.
size
(
grid
.
maxLevel
(),
dim
),
Dune
::
BitSetVector
<
dim
>
ignoreNodes
(
grid
->
size
(
grid
->
maxLevel
(),
dim
),
false
);
Dune
::
BitSetVector
<
1
>
neumannNodes
(
grid
->
size
(
grid
->
maxLevel
(),
dim
),
false
);
Dune
::
BitSetVector
<
1
>
frictionalNodes
(
grid
->
size
(
grid
->
maxLevel
(),
dim
),
false
);
setup_boundary
(
leafView
,
end_points
,
ignoreNodes
,
neumannNodes
,
frictionalNodes
);
...
...
@@ -244,13 +246,13 @@ int main(int argc, char *argv[]) {
GenericNonlinearGS
<
MyBlockProblemType
>
nonlinearGSStep
;
nonlinearGSStep
.
ignoreNodes_
=
&
ignoreNodes
;
VectorType
u1
(
grid
.
size
(
grid
.
maxLevel
(),
dim
));
VectorType
u1
(
grid
->
size
(
grid
->
maxLevel
(),
dim
));
u1
=
0.0
;
// Has to be zero!
VectorType
u2
=
u1
;
VectorType
u3
=
u1
;
VectorType
u4
=
u1
;
VectorType
u1_diff
(
grid
.
size
(
grid
.
maxLevel
(),
dim
));
VectorType
u1_diff
(
grid
->
size
(
grid
->
maxLevel
(),
dim
));
u1_diff
=
0.0
;
// Has to be zero!
VectorType
u2_diff
=
u1_diff
;
VectorType
u3_diff
=
u1_diff
;
...
...
@@ -271,7 +273,7 @@ int main(int argc, char *argv[]) {
Dune
::
shared_ptr
<
Dune
::
GlobalNonlinearity
<
VectorType
,
OperatorType
>
const
>
myGlobalNonlinearity
;
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
grid
.
size
(
grid
.
maxLevel
(),
dim
),
parset
,
myGlobalNonlinearity
,
grid
->
size
(
grid
->
maxLevel
(),
dim
),
parset
,
myGlobalNonlinearity
,
nodalIntegrals
);
// {{{ Set up TNNMG solver
...
...
@@ -299,7 +301,7 @@ int main(int argc, char *argv[]) {
refinements
);
for
(
auto
&
x
:
transferOperators
)
x
=
new
CompressedMultigridTransfer
<
VectorType
>
;
TransferOperatorAssembler
<
GridType
>
(
grid
)
TransferOperatorAssembler
<
GridType
>
(
*
grid
)
.
assembleOperatorPointerHierarchy
(
transferOperators
);
linearIterationStep
.
setTransferOperators
(
transferOperators
);
...
...
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