Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lisa_julia.nebel_at_tu-dresden.de
dune-elasticity
Commits
fb75b6de
Commit
fb75b6de
authored
Jul 03, 2012
by
akbib
Committed by
akbib@FU-BERLIN.DE
Jul 03, 2012
Browse files
store a pointer to the global basis instead of a reference
[[Imported from SVN: r11185]]
parent
d9d1aa24
Changes
1
Hide whitespace changes
Inline
Side-by-side
dune/elasticity/materials/geomexactstvenantkirchhoffmaterial.hh
View file @
fb75b6de
...
...
@@ -49,7 +49,7 @@ public:
nu_
(
nu
)
{}
void
setup
(
ctype
E
,
ctype
nu
)
void
setup
(
ctype
E
,
ctype
nu
,
const
Basis
&
basis
)
{
E_
=
E
;
nu_
=
nu
;
...
...
@@ -60,7 +60,8 @@ public:
localLinearization_
=
Dune
::
shared_ptr
<
LocalLinearization
>
(
new
LocalLinearization
(
E
,
nu
));
localHessian_
=
Dune
::
shared_ptr
<
LocalHessian
>
(
new
LocalHessian
(
E
,
nu
));
basis_
=
&
basis
;
}
//! Evaluate the strain energy
...
...
@@ -68,7 +69,7 @@ public:
ctype
energy
(
const
CoeffType
&
coeff
)
{
// make grid function
BasisGridFunction
<
Basis
,
CoeffType
>
configuration
(
basis_
,
coeff
);
BasisGridFunction
<
Basis
,
CoeffType
>
configuration
(
*
basis_
,
coeff
);
ctype
energy
=
0
;
const
GridType
&
grid
=
configuration
.
grid
();
...
...
@@ -79,7 +80,7 @@ public:
for
(;
eIt
!=
eItEnd
;
++
eIt
)
{
// get quadrature rule
QuadratureRuleKey
quad1
(
basis_
.
getLocalFiniteElement
(
*
eIt
));
QuadratureRuleKey
quad1
(
basis_
->
getLocalFiniteElement
(
*
eIt
));
QuadratureRuleKey
quadKey
=
quad1
.
derivative
().
square
().
square
();
const
Dune
::
template
QuadratureRule
<
ctype
,
dim
>
&
quad
=
QuadratureRuleCache
<
ctype
,
dim
>::
rule
(
quadKey
);
...
...
@@ -124,7 +125,7 @@ public:
LocalHessian
&
secondDerivative
()
{
return
*
localHessian_
;}
//! Return the global basis
const
Basis
&
basis
()
{
return
basis_
;}
const
Basis
&
basis
()
{
return
*
basis_
;}
private:
//! First derivative of the strain energy
...
...
@@ -134,7 +135,7 @@ private:
Dune
::
shared_ptr
<
LocalHessian
>
localHessian_
;
//! Global basis used for the spatial discretization
const
Basis
&
basis_
;
const
Basis
*
basis_
;
//! Elasticity modulus
ctype
E_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment