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
24374806
Commit
24374806
authored
13 years ago
by
akbib
Committed by
akbib@FU-BERLIN.DE
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
store local linearization and hessian in shared_ptr and add a setup method
[[Imported from SVN: r11183]]
parent
8f3d8d99
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/elasticity/materials/geomexactstvenantkirchhoffmaterial.hh
+22
-4
22 additions, 4 deletions
...lasticity/materials/geomexactstvenantkirchhoffmaterial.hh
with
22 additions
and
4 deletions
dune/elasticity/materials/geomexactstvenantkirchhoffmaterial.hh
+
22
−
4
View file @
24374806
...
@@ -36,6 +36,10 @@ private:
...
@@ -36,6 +36,10 @@ private:
typedef
typename
GridType
::
template
Codim
<
0
>
::
LeafIterator
ElementIterator
;
typedef
typename
GridType
::
template
Codim
<
0
>
::
LeafIterator
ElementIterator
;
public:
public:
GeomExactStVenantMaterial
()
:
E_
(
1.0
),
nu_
(
0.3
)
{}
GeomExactStVenantMaterial
(
const
Basis
&
basis
,
ctype
E
,
ctype
nu
)
:
GeomExactStVenantMaterial
(
const
Basis
&
basis
,
ctype
E
,
ctype
nu
)
:
localLinearization_
(
E
,
nu
),
localLinearization_
(
E
,
nu
),
...
@@ -45,6 +49,20 @@ public:
...
@@ -45,6 +49,20 @@ public:
nu_
(
nu
)
nu_
(
nu
)
{}
{}
void
setup
(
ctype
E
,
ctype
nu
)
{
E_
=
E
;
nu_
=
nu
;
if
(
localLinearization_
)
localLinearization_
.
reset
();
if
(
localHessian_
)
localHessian_
.
reset
();
localLinearization_
=
Dune
::
shared_ptr
<
LocalLinearization
>
(
new
LocalLinearization
(
E
,
nu
));
localHessian_
=
Dune
::
shared_ptr
<
LocalHessian
>
(
new
LocalHessian
(
E
,
nu
));
}
//! Evaluate the strain energy
//! Evaluate the strain energy
template
<
class
CoeffType
>
template
<
class
CoeffType
>
ctype
energy
(
const
CoeffType
&
coeff
)
ctype
energy
(
const
CoeffType
&
coeff
)
...
@@ -100,20 +118,20 @@ public:
...
@@ -100,20 +118,20 @@ public:
}
}
//! Return the local assembler of the first derivative of the strain energy
//! Return the local assembler of the first derivative of the strain energy
LocalLinearization
&
firstDerivative
()
{
return
localLinearization_
;}
LocalLinearization
&
firstDerivative
()
{
return
*
localLinearization_
;}
//! Return the local assembler of the second derivative of the strain energy
//! Return the local assembler of the second derivative of the strain energy
LocalHessian
&
secondDerivative
()
{
return
localHessian_
;}
LocalHessian
&
secondDerivative
()
{
return
*
localHessian_
;}
//! Return the global basis
//! Return the global basis
const
Basis
&
basis
()
{
return
basis_
;}
const
Basis
&
basis
()
{
return
basis_
;}
private
:
private
:
//! First derivative of the strain energy
//! First derivative of the strain energy
LocalLinearization
localLinearization_
;
Dune
::
shared_ptr
<
LocalLinearization
>
localLinearization_
;
//! Second derivative of the strain energy
//! Second derivative of the strain energy
LocalHessian
localHessian_
;
Dune
::
shared_ptr
<
LocalHessian
>
localHessian_
;
//! Global basis used for the spatial discretization
//! Global basis used for the spatial discretization
const
Basis
&
basis_
;
const
Basis
&
basis_
;
...
...
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