Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef DUNE_GFE_COSSERATSTRAIN_HH
#define DUNE_GFE_COSSERATSTRAIN_HH
#include <dune/common/fmatrix.hh>
namespace Dune {
namespace GFE {
/** \brief Strain tensor of a Cosserat material
*
* Mathematically, this object is a dimworld x dimworld matrix.
* However, the last dimworld-dim columns consists of the corresponding
* columns of the identity matrix. Knowing this allows more efficient
* implementations of several frequently occurring operations.
*
* \tparam T Type used for real numbers
* \tparam dimworld Dimension of the world space
* \tparam dim Dimension of the domain
*/
template <class T, int dimworld, int dim>
class CosseratStrain
{
public:
/** \brief Compute strain from the deformation gradient and the microrotation
*
* \param R The microrotation
*/
CosseratStrain(const FieldMatrix<T,dimworld+4,dim>& deformationGradient,
const FieldMatrix<T,dimworld,dimworld>& R)
{
/* Compute F, the deformation gradient.
In the continuum case (domain dimension == world dimension) this is
\f$ \hat{F} = \nabla m \f$
In the case of a shell it is
\f$ \hat{F} = (\nabla m | \overline{R}_3) \f$
*/
FieldMatrix<T,dimworld,dimworld> F;
for (int i=0; i<dimworld; i++)
for (int j=0; j<dim; j++)
F[i][j] = deformationGradient[i][j];
for (int i=0; i<dimworld; i++)
for (int j=dim; j<dimworld; j++)
F[i][j] = R[i][j];
// U = R^T F
for (int i=0; i<dimworld; i++)
for (int j=0; j<dimworld; j++) {
data_[i][j] = 0;
for (int k=0; k<dimworld; k++)
data_[i][j] += R[k][i] * F[k][j];
}
}
T determinant() const
{
return data_.determinant();
}
/** \brief Temporary: get the raw matrix data */
const FieldMatrix<T,dimworld,dimworld>& matrix() const
{
return data_;
}
private:
FieldMatrix<T,dimworld,dimworld> data_;
};
} // namespace GFE
} // namespace Dune
#endif // DUNE_GFE_COSSERATSTRAIN_HH