Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Sander, Oliver
dune-gfe
Commits
71c325be
Commit
71c325be
authored
13 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Support for translation Neumann values
[[Imported from SVN: r7888]]
parent
cec05bfa
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
dune/gfe/cosseratenergystiffness.hh
+51
-1
51 additions, 1 deletion
dune/gfe/cosseratenergystiffness.hh
with
51 additions
and
1 deletion
dune/gfe/cosseratenergystiffness.hh
+
51
−
1
View file @
71c325be
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
#include
<dune/common/parametertree.hh>
#include
<dune/common/parametertree.hh>
#include
<dune/grid/common/quadraturerules.hh>
#include
<dune/grid/common/quadraturerules.hh>
#include
<dune/fufem/functions/virtualgridfunction.hh>
#include
"localgeodesicfestiffness.hh"
#include
"localgeodesicfestiffness.hh"
#include
"localgeodesicfefunction.hh"
#include
"localgeodesicfefunction.hh"
#include
<dune/gfe/rigidbodymotion.hh>
#include
<dune/gfe/rigidbodymotion.hh>
...
@@ -101,7 +103,11 @@ public:
...
@@ -101,7 +103,11 @@ public:
/** \brief Constructor with a set of material parameters
/** \brief Constructor with a set of material parameters
* \param parameters The material parameters
* \param parameters The material parameters
*/
*/
CosseratEnergyLocalStiffness
(
const
Dune
::
ParameterTree
&
parameters
)
CosseratEnergyLocalStiffness
(
const
Dune
::
ParameterTree
&
parameters
,
const
BoundaryPatch
<
GridView
>*
neumannBoundary
,
const
Dune
::
VirtualFunction
<
Dune
::
FieldVector
<
double
,
gridDim
>
,
Dune
::
FieldVector
<
double
,
3
>
>*
neumannFunction
)
:
neumannBoundary_
(
neumannBoundary
),
neumannFunction_
(
neumannFunction
)
{
{
// The shell thickness
// The shell thickness
thickness_
=
parameters
.
template
get
<
double
>(
"thickness"
);
thickness_
=
parameters
.
template
get
<
double
>(
"thickness"
);
...
@@ -182,7 +188,11 @@ public:
...
@@ -182,7 +188,11 @@ public:
/** \brief Curvature exponent */
/** \brief Curvature exponent */
double
q_
;
double
q_
;
/** \brief The Neumann boundary */
const
BoundaryPatch
<
GridView
>*
neumannBoundary_
;
/** \brief The function implementing the Neumann data */
const
Dune
::
VirtualFunction
<
Dune
::
FieldVector
<
double
,
gridDim
>
,
Dune
::
FieldVector
<
double
,
3
>
>*
neumannFunction_
;
};
};
template
<
class
GridView
,
class
LocalFiniteElement
,
int
dim
>
template
<
class
GridView
,
class
LocalFiniteElement
,
int
dim
>
...
@@ -278,7 +288,47 @@ energy(const Entity& element,
...
@@ -278,7 +288,47 @@ energy(const Entity& element,
DUNE_THROW
(
Dune
::
NotImplemented
,
"CosseratEnergyStiffness for 1d grids"
);
DUNE_THROW
(
Dune
::
NotImplemented
,
"CosseratEnergyStiffness for 1d grids"
);
}
}
//////////////////////////////////////////////////////////////////////////////
// Assemble boundary contributions
//////////////////////////////////////////////////////////////////////////////
assert
(
neumannFunction_
);
for
(
typename
Entity
::
LeafIntersectionIterator
it
=
element
.
ileafbegin
();
it
!=
element
.
ileafend
();
++
it
)
{
if
(
not
neumannBoundary_
or
not
neumannBoundary_
->
contains
(
*
it
))
continue
;
const
Dune
::
QuadratureRule
<
double
,
gridDim
-
1
>&
quad
=
Dune
::
QuadratureRules
<
double
,
gridDim
-
1
>::
rule
(
it
->
type
(),
quadOrder
);
for
(
size_t
pt
=
0
;
pt
<
quad
.
size
();
pt
++
)
{
// Local position of the quadrature point
const
Dune
::
FieldVector
<
double
,
gridDim
>&
quadPos
=
it
->
geometryInInside
().
global
(
quad
[
pt
].
position
());
const
double
integrationElement
=
it
->
geometry
().
integrationElement
(
quad
[
pt
].
position
());
// The value of the local function
RigidBodyMotion
<
dim
>
value
=
localGeodesicFEFunction
.
evaluate
(
quadPos
);
// Value of the Neumann data at the current position
Dune
::
FieldVector
<
double
,
3
>
neumannValue
;
if
(
dynamic_cast
<
const
VirtualGridViewFunction
<
GridView
,
Dune
::
FieldVector
<
double
,
3
>
>*>
(
neumannFunction_
))
dynamic_cast
<
const
VirtualGridViewFunction
<
GridView
,
Dune
::
FieldVector
<
double
,
3
>
>*>
(
neumannFunction_
)
->
evaluateLocal
(
element
,
quadPos
,
neumannValue
);
else
neumannFunction_
->
evaluate
(
it
->
geometry
().
global
(
quad
[
pt
].
position
()),
neumannValue
);
// Constant Neumann force in z-direction
energy
+=
thickness_
*
(
neumannValue
*
value
.
r
)
*
quad
[
pt
].
weight
()
*
integrationElement
;
}
}
return
energy
;
return
energy
;
}
}
...
...
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