28 result.setZero(targetDim(),u.cols());
34 geometryMap m_ori = ev.
getMap(*m_patches);
35 geometryMap m_def = ev.
getMap(*m_defpatches);
40 gsMaterialMatrixIntegrate<T,MaterialOutput::VectorN> m_N0(m_materialMatrices,m_defpatches);
42 gsMaterialMatrixIntegrate<T,MaterialOutput::VectorM> m_N1(m_materialMatrices,m_defpatches);
45 gsMaterialMatrixIntegrate<T,MaterialOutput::CauchyVectorN> m_Nc0(m_materialMatrices,m_defpatches);
47 gsMaterialMatrixIntegrate<T,MaterialOutput::CauchyVectorM> m_Nc1(m_materialMatrices,m_defpatches);
50 gsMaterialMatrixEval<T,MaterialOutput::StressN> m_S0(m_materialMatrices,m_defpatches,z);
52 gsMaterialMatrixEval<T,MaterialOutput::StressM> m_S1(m_materialMatrices,m_defpatches,z);
55 gsMaterialMatrixEval<T,MaterialOutput::CauchyStressN> m_Sc0(m_materialMatrices,m_defpatches,z);
57 gsMaterialMatrixEval<T,MaterialOutput::CauchyStressM> m_Sc1(m_materialMatrices,m_defpatches,z);
60 gsMaterialMatrixEval<T,MaterialOutput::PStress> m_Sp(m_materialMatrices,m_defpatches,z);
62 gsMaterialMatrixEval<T,MaterialOutput::PStressDir> m_pstressdir(m_materialMatrices,m_defpatches,z);
65 gsMaterialMatrixEval<T,MaterialOutput::PCauchyStressN> m_Sp0(m_materialMatrices,m_defpatches,z);
67 gsMaterialMatrixEval<T,MaterialOutput::PCauchyStressM> m_Sp1(m_materialMatrices,m_defpatches,z);
70 gsMaterialMatrixEval<T,MaterialOutput::PStrainN> m_Ep0(m_materialMatrices,m_defpatches,z);
72 gsMaterialMatrixEval<T,MaterialOutput::PStrainM> m_Ep1(m_materialMatrices,m_defpatches,z);
75 gsMaterialMatrixEval<real_t,MaterialOutput::TensionField> m_TF(m_materialMatrices,m_defpatches,z);
78 gsMaterialMatrixEval<T,MaterialOutput::Stretch> m_lambda(m_materialMatrices,m_defpatches,z);
80 gsMaterialMatrixEval<T,MaterialOutput::StretchDir> m_lambdadir(m_materialMatrices,m_defpatches,z);
88 auto That = cartcon(m_ori);
89 auto Ttilde = cartcov(m_ori);
90 auto Ttilde_def = cartcov(m_def);
93 auto E_f = ( expr::deriv2(m_ori,sn(m_ori).normalized().tr()) - expr::deriv2(m_def,sn(m_def).normalized().tr()) ) *
reshape(m_m2,3,3) * That.tr();
95 auto N_m = N0.tr() * Ttilde.tr();
96 auto N_f = N1.tr() * Ttilde.tr();
98 auto Nc_m = Nc0.tr() * Ttilde_def.tr();
99 auto Nc_f = Nc1.tr() * Ttilde_def.tr();
101 auto S_m = S0.tr() * Ttilde.tr();
102 auto S_f = S1.tr() * Ttilde.tr();
104 auto Sc_m = Sc0.tr() * Ttilde_def.tr();
105 auto Sc_f = Sc1.tr() * Ttilde_def.tr();
109 switch (m_stress_type)
111 case stress_type::displacement :
112 for (
index_t k = 0; k != u.cols(); ++k)
113 result.col(k) = ev.
eval(m_def-m_ori,u.col(k),m_patchID);
117 for (
index_t k = 0; k != u.cols(); ++k)
118 result.col(k) = (ev.
eval(Sc_m,u.col(k),m_patchID)).transpose();
122 for (
index_t k = 0; k != u.cols(); ++k)
123 result.col(k) = (ev.
eval(Sc_f,u.col(k),m_patchID)).transpose();
127 for (
index_t k = 0; k != u.cols(); ++k)
128 result.col(k) = (ev.
eval(S_m,u.col(k),m_patchID)).transpose();
132 for (
index_t k = 0; k != u.cols(); ++k)
133 result.col(k) = (ev.
eval(S_f,u.col(k),m_patchID)).transpose();
137 for (
index_t k = 0; k != u.cols(); ++k)
138 result.col(k) = (ev.
eval(Nc_m,u.col(k),m_patchID)).transpose();
142 for (
index_t k = 0; k != u.cols(); ++k)
143 result.col(k) = (ev.
eval(Nc_f,u.col(k),m_patchID)).transpose();
147 for (
index_t k = 0; k != u.cols(); ++k)
148 result.col(k) = (ev.
eval(N_m,u.col(k),m_patchID)).transpose();
152 for (
index_t k = 0; k != u.cols(); ++k)
153 result.col(k) = (ev.
eval(N_f,u.col(k),m_patchID)).transpose();
157 case stress_type::von_mises :
158 for (
index_t k = 0; k != u.cols(); ++k)
164 result(0,k) = math::sqrt(S(0,0)*S(0,0)+S(1,0)*S(1,0)-S(0,0)*S(1,0)+3*S(2,0)*S(2,0));
166 result(1,k) = math::sqrt(S(0,0)*S(0,0)+S(1,0)*S(1,0)-S(0,0)*S(1,0)+3*S(2,0)*S(2,0));
171 for (
index_t k = 0; k != u.cols(); ++k)
174 result(0,k) = math::sqrt(S(0,0)*S(0,0)+S(1,0)*S(1,0)-S(0,0)*S(1,0)+3*S(2,0)*S(2,0));
179 for (
index_t k = 0; k != u.cols(); ++k)
182 result(0,k) = math::sqrt(S(0,0)*S(0,0)+S(1,0)*S(1,0)-S(0,0)*S(1,0)+3*S(2,0)*S(2,0));
187 case stress_type::membrane_strain :
188 for (
index_t k = 0; k != u.cols(); ++k)
189 result.col(k) = ev.
eval(E_m.tr(),u.col(k),m_patchID);
192 case stress_type::flexural_strain :
193 for (
index_t k = 0; k != u.cols(); ++k)
194 result.col(k) = ev.
eval(E_f.tr(),u.col(k),m_patchID);
196 case stress_type::principal_membrane_strain:
197 for (
index_t k = 0; k != u.cols(); ++k)
198 result.col(k) = ev.
eval(Ep0,u.col(k),m_patchID);
200 case stress_type::principal_flexural_strain :
201 for (
index_t k = 0; k != u.cols(); ++k)
202 result.col(k) = ev.
eval(Ep1,u.col(k),m_patchID);
205 case stress_type::principal_stretch :
206 for (
index_t k = 0; k != u.cols(); ++k)
207 result.col(k) = ev.
eval(lambda,u.col(k),m_patchID);
210 for (
index_t k = 0; k != u.cols(); ++k)
211 result.col(k) = ev.
eval(Sp,u.col(k));
214 for (
index_t k = 0; k != u.cols(); ++k)
215 result.col(k) = ev.
eval(Sp0,u.col(k),m_patchID);
218 for (
index_t k = 0; k != u.cols(); ++k)
219 result.col(k) = ev.
eval(Sp1,u.col(k),m_patchID);
222 for (
index_t k = 0; k != u.cols(); ++k)
224 tmp = ev.
eval(lambdadir,u.col(k),m_patchID);
225 result.col(k) = tmp.
reshape(3,3).col(0);
229 for (
index_t k = 0; k != u.cols(); ++k)
231 tmp = ev.
eval(lambdadir,u.col(k),m_patchID);
232 result.col(k) = tmp.
reshape(3,3).col(1);
236 for (
index_t k = 0; k != u.cols(); ++k)
238 tmp = ev.
eval(lambdadir,u.col(k),m_patchID);
239 result.col(k) = tmp.
reshape(3,3).col(2);
243 for (
index_t k = 0; k != u.cols(); ++k)
245 tmp = ev.
eval(pstressdir,u.col(k));
246 result.col(k) = tmp.
reshape(3,3).col(0);
250 for (
index_t k = 0; k != u.cols(); ++k)
252 tmp = ev.
eval(pstressdir,u.col(k));
253 result.col(k) = tmp.
reshape(3,3).col(1);
257 for (
index_t k = 0; k != u.cols(); ++k)
259 tmp = ev.
eval(pstressdir,u.col(k));
260 result.col(k) = tmp.
reshape(3,3).col(2);
264 for (
index_t k = 0; k != u.cols(); ++k)
266 result.col(k) = ev.
eval(TF,u.col(k),m_patchID);
270 gsWarn<<
"Stress type 'total' not implemented\n";
principal stress membrane
Definition: gsThinShellFunctions.h:61
principal stretches
Definition: gsThinShellFunctions.h:60
compute membrane Cauchy stresses
Definition: gsThinShellFunctions.h:47
compute only von Mises stress - flexural stresses
Definition: gsThinShellFunctions.h:46
compute membrane Cauchy stresses integrated over the thickness
Definition: gsThinShellFunctions.h:48
compute only von Mises stress
Definition: gsThinShellFunctions.h:44
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Each column of the input matrix (u) corresponds to one evaluation point. Each column of the output ma...
Definition: gsThinShellFunctions.hpp:23
principal stress directions
Definition: gsThinShellFunctions.h:69
#define index_t
Definition: gsConfig.h:32
compute membrane PK2 stresses integrated over the thickness
Definition: gsThinShellFunctions.h:50
gsAsMatrix< T, Dynamic, Dynamic > reshape(index_t n, index_t m)
Returns the matrix resized to n x m matrix (data is not copied) This function assumes that the matrix...
Definition: gsMatrix.h:221
variable getVariable(const gsFunctionSet< T > &func, index_t dim=1)
Registers func as a variable and returns a handle to it.
Definition: gsExprEvaluator.h:124
principal stress directions
Definition: gsThinShellFunctions.h:67
Generic expressions evaluator.
#define gsWarn
Definition: gsDebug.h:50
compute membrane PK2 stresses
Definition: gsThinShellFunctions.h:49
compute flexural Cauchy stresses
Definition: gsThinShellFunctions.h:51
principal stress membrane
Definition: gsThinShellFunctions.h:62
principal stress bending
Definition: gsThinShellFunctions.h:63
void eval(const expr::_expr< E > &expr, gsGridIterator< T, mode, d > &git, const index_t patchInd=0)
Generic evaluator of isogeometric expressions.
Definition: gsExprEvaluator.h:38
compute flexural PK2 stresses integrated over the thickness
Definition: gsThinShellFunctions.h:54
EIGEN_STRONG_INLINE reshape_expr< E > const reshape(E const &u, index_t n, index_t m)
Reshape an expression.
Definition: gsExpressions.h:1925
compute flexural Cauchy stresses integrated over the thickness
Definition: gsThinShellFunctions.h:53
principal stretch directions
Definition: gsThinShellFunctions.h:66
EIGEN_STRONG_INLINE flat_expr< E > const flat(E const &u)
Make a matrix 2x2 expression "flat".
Definition: gsExpressions.h:2031
Class defining a multivariate (real or vector) function given by a string mathematical expression...
Definition: gsFunctionExpr.h:51
principal stretch directions
Definition: gsThinShellFunctions.h:64
compute flexural PK2 stresses
Definition: gsThinShellFunctions.h:52
principal stress directions
Definition: gsThinShellFunctions.h:68
principal stretch directions
Definition: gsThinShellFunctions.h:65
geometryMap getMap(const gsMultiPatch< T > &mp)
Registers mp as an isogeometric geometry map and return a handle to it.
Definition: gsExprEvaluator.h:116
Definition: gsExpressions.h:114
compute only von Mises stress - membrane stresses
Definition: gsThinShellFunctions.h:45
EIGEN_STRONG_INLINE jac_expr< E > jac(const symbol_expr< E > &u)
The Jacobian matrix of a FE variable.
Definition: gsExpressions.h:4528