@@ -217,6 +217,7 @@ template <bool _comp>
217217typename std::enable_if<!_comp, void >::type
218218gsMaterialMatrixNonlinear<dim,T,matId,comp,mat,imp>::_pstretch_into_impl(const index_t patch, const gsMatrix<T>& u, gsMatrix<T>& result) const
219219{
220+ gsDebugVar (" AAAAA)" );
220221 Base::pstretch_into (patch,u,result);
221222}
222223
@@ -563,6 +564,56 @@ gsMatrix<T> gsMaterialMatrixNonlinear<dim,T,matId,comp,mat,imp>::eval3D_CauchyVe
563564 return this ->eval3D_CauchyStress (patch,u,z,out);
564565}
565566
567+ template <short_t dim, class T , index_t matId, bool comp, enum Material mat, enum Implementation imp >
568+ gsMatrix<T> gsMaterialMatrixNonlinear<dim,T,matId,comp,mat,imp>::eval3D_pstretch(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const
569+ {
570+ return eval3D_pstretch_impl<comp>(patch,u,z);
571+ }
572+
573+ template <short_t dim, class T , index_t matId, bool comp, enum Material mat, enum Implementation imp >
574+ template <bool _comp>
575+ typename std::enable_if< _comp, gsMatrix<T>>::type
576+ gsMaterialMatrixNonlinear<dim,T,matId,comp,mat,imp>::eval3D_pstretch_impl(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const
577+ {
578+ this ->_computePoints (patch,u);
579+
580+ gsMatrix<T> result (3 , u.cols () * z.rows ());
581+ std::pair<gsVector<T>,gsMatrix<T>> res;
582+ index_t colIdx;
583+
584+ gsMatrix<T> C33s = _eval3D_Compressible_C33 (patch,u,z);
585+ T C33;
586+
587+ gsMatrix<T,3 ,3 > c;
588+ for (index_t k=0 ; k!= u.cols (); k++)
589+ {
590+ for ( index_t j=0 ; j < z.rows (); ++j ) // through-thickness points
591+ {
592+ colIdx = j*u.cols ()+k;
593+ this ->_getMetric (k, z (j, k) * m_data.mine ().m_Tmat (0 , k)); // on point i, on height z(0,j)
594+
595+ C33 = C33s (0 ,k);
596+
597+ // Compute c
598+ c.setZero ();
599+ c.block (0 ,0 ,2 ,2 ) = m_data.mine ().m_Gcov_def .block (0 ,0 ,2 ,2 );
600+ c (2 ,2 ) = C33; // c33
601+
602+ res = this ->_evalStretch (c,m_data.mine ().m_gcon_ori );
603+ result.col (colIdx) = res.first ;
604+ }
605+ }
606+ return result;
607+ }
608+
609+ template <short_t dim, class T , index_t matId, bool comp, enum Material mat, enum Implementation imp >
610+ template <bool _comp>
611+ typename std::enable_if<!_comp, gsMatrix<T>>::type
612+ gsMaterialMatrixNonlinear<dim,T,matId,comp,mat,imp>::eval3D_pstretch_impl(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z) const
613+ {
614+ return Base::eval3D_pstretch (patch,u,z);
615+ }
616+
566617template <short_t dim, class T , index_t matId, bool comp, enum Material mat, enum Implementation imp >
567618gsMatrix<T> gsMaterialMatrixNonlinear<dim,T,matId,comp,mat,imp>::eval3D_pstress(const index_t patch, const gsMatrix<T> & u, const gsMatrix<T> & z, enum MaterialOutput out) const
568619{
0 commit comments