26 case 0:
return J == 0 ? 0 : 0;
27 case 1:
return J == 0 ? 1 : 1;
28 case 2:
return J == 0 ? 0 : 1;
33 case 0:
return J == 0 ? 0 : 0;
34 case 1:
return J == 0 ? 1 : 1;
35 case 2:
return J == 0 ? 2 : 2;
36 case 3:
return J == 0 ? 0 : 1;
37 case 4:
return J == 0 ? 1 : 2;
38 case 5:
return J == 0 ? 0 : 2;
46 inline void symmetricIdentityTensor(gsMatrix<T> & C,
const gsMatrix<T> & R)
49 short_t dimTensor = dim*(dim+1)/2;
50 C.setZero(dimTensor,dimTensor);
52 for (
short_t i = 0; i < dimTensor; ++i)
53 for (
short_t j = 0; j < dimTensor; ++j)
54 C(i,j) = (R(voigt(dim,i,0),voigt(dim,j,0))*R(voigt(dim,i,1),voigt(dim,j,1)) +
55 R(voigt(dim,i,0),voigt(dim,j,1))*R(voigt(dim,i,1),voigt(dim,j,0)));
61 inline void matrixTraceTensor(gsMatrix<T> & C,
const gsMatrix<T> & R,
const gsMatrix<T> & S)
64 short_t dimTensor = dim*(dim+1)/2;
65 C.setZero(dimTensor,dimTensor);
67 for (
short_t i = 0; i < dimTensor; ++i)
68 for (
short_t j = 0; j < dimTensor; ++j)
69 C(i,j) = R(voigt(dim,i,0),voigt(dim,i,1))*S(voigt(dim,j,0),voigt(dim,j,1));
74 inline void voigtStress(gsVector<T> & Svec,
const gsMatrix<T> & S)
77 short_t dimTensor = dim*(dim+1)/2;
78 Svec.resize(dimTensor);
79 for (
short i = 0; i < dimTensor; ++i)
80 Svec(i) = S(voigt(dim,i,0),voigt(dim,i,1));
86 inline void setB( gsMatrix<T> & B,
const gsMatrix<T> & F,
const gsVector<T> & bGrad)
89 short_t dimTensor = dim*(dim+1)/2;
90 B.resize(dimTensor,dim);
92 for (
short_t j = 0; j < dim; ++j)
94 for (
short_t i = 0; i < dim; ++i)
95 B(i,j) = F(j,i) * bGrad(i);
97 B(2,j) = F(j,0) * bGrad(1) + F(j,1) * bGrad(0);
99 for (
short_t i = 0; i < dim; ++i)
102 B(i+dim,j) = F(j,i) * bGrad(k) + F(j,k) * bGrad(i);
#define short_t
Definition: gsConfig.h:35
#define GISMO_ERROR(message)
Definition: gsDebug.h:118