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
0a1b7cf2
Commit
0a1b7cf2
authored
11 years ago
by
akbib
Committed by
akbib
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use BoundaryFunctionalAssembler and NeumannBoundaryAssembler to make compile again.
[[Imported from SVN: r13123]]
parent
7d4d52da
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
viscoelast.cc
+28
-28
28 additions, 28 deletions
viscoelast.cc
with
28 additions
and
28 deletions
viscoelast.cc
+
28
−
28
View file @
0a1b7cf2
...
...
@@ -21,9 +21,10 @@
#include
<dune/fufem/boundarypatch.hh>
#include
<dune/fufem/readbitfield.hh>
#include
<dune/fufem/computestress.hh>
#include
<dune/fufem/neumannassembler.hh>
#include
<dune/fufem/functionspacebases/p1nodalbasis.hh>
#include
<dune/fufem/assemblers/operatorassembler.hh>
#include
<dune/fufem/assemblers/boundaryfunctionalassembler.hh>
#include
<dune/fufem/assemblers/localassemblers/neumannboundaryassembler.hh>
#include
<dune/fufem/assemblers/localassemblers/stvenantkirchhoffassembler.hh>
#include
<dune/fufem/assemblers/localassemblers/viscosityassembler.hh>
#include
<dune/fufem/functiontools/gridfunctionadaptor.hh>
...
...
@@ -142,17 +143,16 @@ int main (int argc, char *argv[]) try
dirichletBoundaryAll[0].setup(grid, 0, dirichletNodesAll[0]);
*/
std
::
vector
<
BitSetVector
<
dim
>
>
neumannNodes
(
maxLevel
+
1
);
std
::
vector
<
LevelBoundaryPatch
>
neumannBoundary
(
maxLevel
+
1
);
std
::
vector
<
VectorType
>
neumannValues
(
maxLevel
+
1
);
LevelBoundaryPatch
coarseNeumannBoundary
;
VectorType
coarseNeumannValues
;
//Read neumann boundary values
if
(
neumannBV
)
{
n
eumannBoundary
[
0
]
.
setup
(
grid
.
levelView
(
0
));
readBoundaryPatch
<
GridType
>
(
n
eumannBoundary
[
0
]
,
path
+
neumannFile
);
n
eumannValues
[
0
]
.
resize
(
grid
.
size
(
0
,
dim
));
AmiraMeshReader
<
GridType
>::
readFunction
(
n
eumannValues
[
0
]
,
path
+
neumannValuesFile
);
coarseN
eumannBoundary
.
setup
(
grid
.
levelView
(
0
));
readBoundaryPatch
<
GridType
>
(
coarseN
eumannBoundary
,
path
+
neumannFile
);
coarseN
eumannValues
.
resize
(
grid
.
size
(
0
,
dim
));
AmiraMeshReader
<
GridType
>::
readFunction
(
coarseN
eumannValues
,
path
+
neumannValuesFile
);
}
...
...
@@ -191,23 +191,20 @@ int main (int argc, char *argv[]) try
sampleOnBitField
(
grid
,
dirichletValues
,
dirichletNodes
);
//Determine Neumann dofs
if
(
neumannBV
){
BoundaryPatchProlongator
<
GridType
>::
prolong
(
neumannBoundary
);
BitSetVector
<
dim
>
neumannNodes
(
grid
.
size
(
dim
));
VectorType
neumannValues
(
neumannNodes
.
size
());
BoundaryPatch
<
GridType
::
LeafGridView
>
neumannBoundary
(
grid
.
leafGridView
());
if
(
neumannBV
)
{
BoundaryPatchProlongator
<
GridType
>::
prolong
(
coarseNeumannBoundary
,
neumannBoundary
);
for
(
int
i
=
0
;
i
<=
grid
.
maxLevel
();
i
++
)
{
neumannNodes
[
i
].
resize
(
grid
.
size
(
i
,
dim
));
for
(
int
j
=
0
;
j
<
grid
.
size
(
i
,
dim
);
j
++
)
for
(
int
k
=
0
;
k
<
dim
;
k
++
)
neumannNodes
[
i
][
j
][
k
]
=
neumannBoundary
[
i
].
containsVertex
(
j
);
}
for
(
size_t
j
=
0
;
j
<
neumannNodes
.
size
();
j
++
)
for
(
int
k
=
0
;
k
<
dim
;
k
++
)
neumannNodes
[
j
][
k
]
=
neumannBoundary
.
containsVertex
(
j
);
sampleOnBitField
(
grid
,
neumannValues
,
neumannNodes
);
sampleOnBitField
(
grid
,
coarseNeumannValues
,
neumannValues
,
neumannNodes
);
}
//PatchProlongator<GridType>::prolong(dirichletBoundaryAll);
//right-hand-side rhs = bodyforces + neumanboundary
VectorType
rhs
(
grid
.
size
(
dim
));
...
...
@@ -224,10 +221,7 @@ int main (int argc, char *argv[]) try
}
// Assemble neumann boundary values
if
(
neumannBV
)
assembleAndAddNeumannTerm
(
neumannBoundary
[
grid
.
maxLevel
()],
neumannValues
[
grid
.
maxLevel
()],
rhs
);
OperatorType
elasticPart
,
viscousPart
;
typedef
P1NodalBasis
<
GridType
::
LeafGridView
,
double
>
P1Basis
;
P1Basis
p1Basis
(
grid
.
leafView
());
...
...
@@ -237,8 +231,14 @@ int main (int argc, char *argv[]) try
ViscosityAssembler
<
GridType
,
P1Basis
::
LocalFiniteElement
,
P1Basis
::
LocalFiniteElement
>
visLocalAssembler
(
nu_shear
,
nu_bulk
);
globalAssembler
.
assemble
(
visLocalAssembler
,
viscousPart
);
if
(
neumannBV
)
{
BasisGridFunction
<
P1Basis
,
VectorType
>
neumannFunction
(
p1Basis
,
neumannValues
);
NeumannBoundaryAssembler
<
GridType
,
Dune
::
FieldVector
<
double
,
dim
>
>
neumannBoundaryAssembler
(
neumannFunction
);
BoundaryFunctionalAssembler
<
P1Basis
>
boundaryFunctionalAssembler
(
p1Basis
,
neumannBoundary
);
boundaryFunctionalAssembler
.
assemble
(
neumannBoundaryAssembler
,
rhs
,
true
);
}
/*
//test vectors with time ,total surfacestress and total strain data
BlockVector<FieldVector<double,1> > time(num_timesteps),surfacestress(num_timesteps), strain(num_timesteps);
...
...
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