Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
jonathan.drechsel_at_mailbox.tu-dresden.de
dune-elasticity
Commits
75b4e26a
Commit
75b4e26a
authored
May 04, 2020
by
Patrick Jaap
Browse files
LocalDensity: use `ctype` for `x` entries
parent
550fdc58
Changes
7
Hide whitespace changes
Inline
Side-by-side
dune/elasticity/materials/exphenckydensity.hh
View file @
75b4e26a
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
namespace
Dune
::
Elasticity
{
namespace
Dune
::
Elasticity
{
template
<
int
dim
,
class
field_type
=
double
>
template
<
int
dim
,
class
field_type
=
double
,
class
ctype
=
double
>
class
ExpHenckyDensity
final
class
ExpHenckyDensity
final
:
public
LocalDensity
<
dim
,
field_type
>
:
public
LocalDensity
<
dim
,
field_type
>
{
{
...
@@ -40,7 +40,7 @@ public:
...
@@ -40,7 +40,7 @@ public:
* \param x Position of the gradient
* \param x Position of the gradient
* \param gradient Deformation gradient
* \param gradient Deformation gradient
*/
*/
field_type
operator
()
(
const
FieldVector
<
field_
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
field_type
operator
()
(
const
FieldVector
<
c
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
{
{
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
// compute C = F^TF
// compute C = F^TF
...
...
dune/elasticity/materials/henckydensity.hh
View file @
75b4e26a
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
namespace
Dune
::
Elasticity
{
namespace
Dune
::
Elasticity
{
template
<
int
dim
,
class
field_type
=
double
>
template
<
int
dim
,
class
field_type
=
double
,
class
ctype
=
double
>
class
HenckyDensity
final
class
HenckyDensity
final
:
public
LocalDensity
<
dim
,
field_type
>
:
public
LocalDensity
<
dim
,
field_type
>
{
{
...
@@ -30,7 +30,7 @@ public:
...
@@ -30,7 +30,7 @@ public:
* \param x Position of the gradient
* \param x Position of the gradient
* \param gradient Deformation gradient
* \param gradient Deformation gradient
*/
*/
field_type
operator
()
(
const
FieldVector
<
field_
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
field_type
operator
()
(
const
FieldVector
<
c
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
{
{
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
// compute C = F^TF
// compute C = F^TF
...
...
dune/elasticity/materials/localdensity.hh
View file @
75b4e26a
...
@@ -5,8 +5,12 @@
...
@@ -5,8 +5,12 @@
namespace
Dune
::
Elasticity
{
namespace
Dune
::
Elasticity
{
/** \brief A base class for energy densities to be evaluated in an integral energy */
/** \brief A base class for energy densities to be evaluated in an integral energy
template
<
int
dim
,
class
field_type
=
double
>
*
* \tparam field_type type of the gradient entries
* \tparam ctype type of the coordinates, i.e., the x entries
*/
template
<
int
dim
,
class
field_type
=
double
,
class
ctype
=
double
>
class
LocalDensity
class
LocalDensity
{
{
...
@@ -17,7 +21,7 @@ public:
...
@@ -17,7 +21,7 @@ public:
* \param x Position of the gradient
* \param x Position of the gradient
* \param gradient Deformation gradient
* \param gradient Deformation gradient
*/
*/
virtual
field_type
operator
()
(
const
FieldVector
<
field_
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
=
0
;
virtual
field_type
operator
()
(
const
FieldVector
<
c
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
=
0
;
};
};
...
...
dune/elasticity/materials/localintegralenergy.hh
View file @
75b4e26a
...
@@ -27,7 +27,7 @@ public:
...
@@ -27,7 +27,7 @@ public:
/** \brief Constructor with a local energy density
/** \brief Constructor with a local energy density
*/
*/
LocalIntegralEnergy
(
const
std
::
shared_ptr
<
LocalDensity
<
dim
,
field_type
>>&
ld
)
LocalIntegralEnergy
(
const
std
::
shared_ptr
<
LocalDensity
<
dim
,
field_type
,
DT
>>&
ld
)
:
localDensity_
(
ld
)
:
localDensity_
(
ld
)
{}
{}
...
@@ -37,7 +37,7 @@ public:
...
@@ -37,7 +37,7 @@ public:
const
std
::
vector
<
Dune
::
FieldVector
<
field_type
,
gridDim
>
>&
localConfiguration
)
const
;
const
std
::
vector
<
Dune
::
FieldVector
<
field_type
,
gridDim
>
>&
localConfiguration
)
const
;
protected:
protected:
const
std
::
shared_ptr
<
LocalDensity
<
dim
,
field_type
>>
localDensity_
=
nullptr
;
const
std
::
shared_ptr
<
LocalDensity
<
dim
,
field_type
,
DT
>>
localDensity_
=
nullptr
;
};
};
...
...
dune/elasticity/materials/mooneyrivlindensity.hh
View file @
75b4e26a
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
namespace
Dune
::
Elasticity
{
namespace
Dune
::
Elasticity
{
template
<
int
dim
,
class
field_type
=
double
>
template
<
int
dim
,
class
field_type
=
double
,
class
ctype
=
double
>
class
MooneyRivlinDensity
final
class
MooneyRivlinDensity
final
:
public
LocalDensity
<
dim
,
field_type
>
:
public
LocalDensity
<
dim
,
field_type
>
{
{
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
* \param x Position of the gradient
* \param x Position of the gradient
* \param gradient Deformation gradient
* \param gradient Deformation gradient
*/
*/
field_type
operator
()
(
const
FieldVector
<
field_
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
field_type
operator
()
(
const
FieldVector
<
c
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
{
{
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
// compute C = F^TF
// compute C = F^TF
...
...
dune/elasticity/materials/neohookedensity.hh
View file @
75b4e26a
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
namespace
Dune
::
Elasticity
{
namespace
Dune
::
Elasticity
{
template
<
int
dim
,
class
field_type
=
double
>
template
<
int
dim
,
class
field_type
=
double
,
class
ctype
=
double
>
class
NeoHookeDensity
final
class
NeoHookeDensity
final
:
public
LocalDensity
<
dim
,
field_type
>
:
public
LocalDensity
<
dim
,
field_type
>
{
{
...
@@ -30,7 +30,7 @@ public:
...
@@ -30,7 +30,7 @@ public:
* \param x Position of the gradient
* \param x Position of the gradient
* \param gradient Deformation gradient
* \param gradient Deformation gradient
*/
*/
field_type
operator
()
(
const
FieldVector
<
field_
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
field_type
operator
()
(
const
FieldVector
<
c
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
{
{
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
// compute C = F^TF
// compute C = F^TF
...
...
dune/elasticity/materials/stvenantkirchhoffdensity.hh
View file @
75b4e26a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
namespace
Dune
::
Elasticity
{
namespace
Dune
::
Elasticity
{
template
<
int
dim
,
class
field_type
=
double
>
template
<
int
dim
,
class
field_type
=
double
,
class
ctype
=
double
>
class
StVenantKirchhoffDensity
final
class
StVenantKirchhoffDensity
final
:
public
LocalDensity
<
dim
,
field_type
>
:
public
LocalDensity
<
dim
,
field_type
>
{
{
...
@@ -28,7 +28,7 @@ public:
...
@@ -28,7 +28,7 @@ public:
* \param x Position of the gradient
* \param x Position of the gradient
* \param gradient Deformation gradient
* \param gradient Deformation gradient
*/
*/
field_type
operator
()
(
const
FieldVector
<
field_
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
field_type
operator
()
(
const
FieldVector
<
c
type
,
dim
>&
x
,
const
FieldMatrix
<
field_type
,
dim
,
dim
>&
gradient
)
const
{
{
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
// compute strain E = 1/2 *( F^T F - I)
// compute strain E = 1/2 *( F^T F - I)
...
...
Write
Preview
Supports
Markdown
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