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
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Ansgar Burchardt
dune-elasticity
Commits
d3d666b1
Commit
d3d666b1
authored
6 years ago
by
Jonathan Youett
Browse files
Options
Downloads
Patches
Plain Diff
Store assemblers by value
parent
6418d2ff
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/elasticity/materials/mooneyrivlinmaterial.hh
+8
-8
8 additions, 8 deletions
dune/elasticity/materials/mooneyrivlinmaterial.hh
dune/elasticity/materials/neohookeanmaterial.hh
+10
-17
10 additions, 17 deletions
dune/elasticity/materials/neohookeanmaterial.hh
with
18 additions
and
25 deletions
dune/elasticity/materials/mooneyrivlinmaterial.hh
+
8
−
8
View file @
d3d666b1
...
...
@@ -190,14 +190,14 @@ public:
//! Return the local assembler of the first derivative of the strain energy
typename
Base
::
LocalLinearization
&
firstDerivative
(
std
::
shared_ptr
<
GridFunction
>
displace
)
{
localLineari
z
ation_
->
setConfiguration
(
displace
);
return
*
localLineari
z
ation_
;
localLineari
s
ation_
.
setConfiguration
(
displace
);
return
localLineari
s
ation_
;
}
//! Return the local assembler of the second derivative of the strain energy
typename
Base
::
LocalHessian
&
secondDerivative
(
std
::
shared_ptr
<
GridFunction
>
displace
)
{
localHessian_
->
setConfiguration
(
displace
);
return
*
localHessian_
;
localHessian_
.
setConfiguration
(
displace
);
return
localHessian_
;
}
private
:
...
...
@@ -245,15 +245,15 @@ private:
//! Construct the local assembler members
void
constructAssemblers
()
{
localLineari
z
ation_
=
std
::
make_shared
<
MonRivLineari
z
ation
>
(
a_
,
b_
,
c_
,
d_
,
e_
,
k_
);
localHessian_
=
std
::
make_shared
<
MonRivHessian
>
(
a_
,
b_
,
c_
,
d_
,
e_
,
k_
);
localLineari
s
ation_
=
MonRivLineari
s
ation
(
a_
,
b_
,
c_
,
d_
,
e_
,
k_
);
localHessian_
=
MonRivHessian
(
a_
,
b_
,
c_
,
d_
,
e_
,
k_
);
}
//! First derivative of the strain energy
std
::
shared_ptr
<
MonRivLineari
z
ation
>
localLineari
z
ation_
;
MonRivLineari
s
ation
localLineari
s
ation_
;
//! Second derivative of the strain energy
std
::
shared_ptr
<
MonRivHessian
>
localHessian_
;
MonRivHessian
localHessian_
;
//! Elasticity modulus
field_type
E_
;
...
...
This diff is collapsed.
Click to expand it.
dune/elasticity/materials/neohookeanmaterial.hh
+
10
−
17
View file @
d3d666b1
...
...
@@ -67,25 +67,19 @@ public:
NeoHookeanMaterial
()
=
default
;
template
<
class
BasisT
>
NeoHookeanMaterial
(
BasisT
&&
basis
,
ReturnType
E
,
ReturnType
nu
)
:
Base
(
std
::
forward
<
BasisT
>
(
basis
))
NeoHookeanMaterial
(
BasisT
&&
basis
,
field_type
E
,
field_type
nu
)
{
lambda_
=
E
*
nu
/
((
1
+
nu
)
*
(
1
-
2
*
nu
));
mu_
=
E
/
(
2
*
(
1
+
nu
));
localLinearization_
=
std
::
make_shared
<
NeoLinearization
>
(
lambda_
,
mu_
);
localHessian_
=
std
::
make_shared
<
NeoHessian
>
(
lambda_
,
mu_
);
setup
(
std
::
forward
<
BasisT
>
(
basis
),
E
,
nu
);
}
template
<
class
BasisT
>
void
setup
(
BasisT
&&
basis
,
field_type
E
,
field_type
nu
)
{
lambda_
=
E
*
nu
/
((
1
+
nu
)
*
(
1
-
2
*
nu
));
mu_
=
E
/
(
2
*
(
1
+
nu
));
localLinearization_
=
std
::
make_shared
<
NeoLineari
z
ation
>
(
lambda_
,
mu_
)
;
localHessian_
=
std
::
make_shared
<
NeoHessian
>
(
lambda_
,
mu_
)
;
localLinearization_
=
NeoLineari
s
ation
{
lambda_
,
mu_
}
;
localHessian_
=
NeoHessian
{
lambda_
,
mu_
}
;
this
->
setBasis
(
std
::
forward
<
BasisT
>
(
basis
));
}
...
...
@@ -212,23 +206,22 @@ public:
//! Return the local assembler of the first derivative of the strain energy
typename
Base
::
LocalLinearization
&
firstDerivative
(
std
::
shared_ptr
<
GridFunction
>
displace
)
{
localLinearization_
->
setConfiguration
(
displace
);
return
*
localLinearization_
;
localLinearization_
.
setConfiguration
(
displace
);
return
localLinearization_
;
}
//! Return the local assembler of the second derivative of the strain energy
typename
Base
::
LocalHessian
&
secondDerivative
(
std
::
shared_ptr
<
GridFunction
>
displace
)
{
localHessian_
->
setConfiguration
(
displace
);
return
*
localHessian_
;
localHessian_
.
setConfiguration
(
displace
);
return
localHessian_
;
}
private
:
//! First derivative of the strain energy
std
::
shared_ptr
<
NeoLinearization
>
localLinearization_
;
NeoLinearisation
localLinearization_
;
//! Second derivative of the strain energy
std
::
shared_ptr
<
NeoHessian
>
localHessian_
;
NeoHessian
localHessian_
;
//! First Lame constant
field_type
lambda_
;
...
...
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