32# define MatExprType auto
43 typedef real_t Scalar;
52 enum{ Space = 0, ScalarValued= 0, ColBlocks= 0};
62 index_t rows()
const {
return _dim; }
63 index_t cols()
const {
return 1; }
70 void print(std::ostream &os)
const { os <<
"uv("<<_dim <<
")";}
83 typedef typename E::Scalar Scalar;
86 typename E::Nested_t _u;
87 typename gsGeometryMap<Scalar>::Nested_t _G;
93 enum{ Space = E::Space, ScalarValued= 0, ColBlocks= 0};
95 var1_expr(
const E & u,
const gsGeometryMap<Scalar> & G) : _u(u), _G(G) { }
98 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
111 index_t rows()
const {
return 1; }
112 index_t cols()
const {
return cols_impl(_u); }
116 parse_impl<E>(evList);
121 index_t cardinality_impl()
const {
return _u.cardinality_impl(); }
123 void print(std::ostream &os)
const { os <<
"var1("; _u.print(os); os <<
")"; }
126 template<
class U>
inline
127 typename util::enable_if< util::is_same<U,gsFeSpace<Scalar> >::value,
void>::type
136 template<
class U>
inline
137 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar>>::value || util::is_same<U,gsFeVariable<Scalar>>::value,
void>::type
143 grad(_u).parse(evList);
148 template<
class U>
inline
149 typename util::enable_if< util::is_same<U,gsFeSpace<Scalar> >::value,
const gsMatrix<Scalar> & >::type
150 eval_impl(
const U & u,
const index_t k)
const
152 const index_t A = u.cardinality()/u.dim();
153 res.resize(u.cardinality(), cols());
155 normal = _G.data().normal(k);
158 bGrads = u.data().values[1].col(k);
159 cJac = _G.data().values[1].
reshapeCol(k, _G.data().dim.first, _G.data().dim.second).transpose();
160 const Scalar measure = (cJac.
col3d(0).cross( cJac.
col3d(1) )).norm();
162 for (
index_t d = 0; d!= cols(); ++d)
165 for (
index_t j = 0; j!= A; ++j)
168 m_v.noalias() = (vecFun(d, bGrads.
at(2*j ) ).cross( cJac.
col3d(1) )
169 - vecFun(d, bGrads.
at(2*j+1) ).cross( cJac.
col3d(0) )) / measure;
172 res.row(s+j).noalias() = (m_v - ( normal*m_v.transpose() ) * normal).transpose();
178 template<
class U>
inline
179 typename util::enable_if< util::is_same<U,gsFeVariable<Scalar> >::value,
const gsMatrix<Scalar> & >::type
180 eval_impl(
const U & u,
const index_t k)
const
182 grad_expr<U> vGrad = grad_expr<U>(u);
183 bGrads = vGrad.eval(k);
185 return make_vector(k);
189 template<
class U>
inline
190 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value,
const gsMatrix<Scalar> & >::type
191 eval_impl(
const U & u,
const index_t k)
const
193 GISMO_ASSERT(1==u.data().actives.cols(),
"Single actives expected");
194 grad_expr<gsFeSolution<Scalar>> sGrad = grad_expr<gsFeSolution<Scalar>>(u);
195 bGrads = sGrad.eval(k);
197 return make_vector(k);
202 res.resize(rows(), cols());
203 normal = _G.data().normal(k);
206 cJac = _G.data().values[1].
reshapeCol(k, _G.data().dim.first, _G.data().dim.second).transpose();
207 const Scalar measure = (cJac.
col3d(0).cross( cJac.
col3d(1) )).norm();
209 m_v.noalias() = ( ( bGrads.
col3d(0) ).cross( cJac.
col3d(1) )
210 - ( bGrads.
col3d(1) ).cross( cJac.
col3d(0) ) ) / measure;
213 res = (m_v - ( normal*m_v.transpose() ) * normal).transpose();
217 template<
class U>
inline
218 typename util::enable_if< util::is_same<U,gsGeometryMap<Scalar> >::value,
index_t >::type
219 cols_impl(
const U & u)
const
221 return u.data().dim.second;
224 template<
class U>
inline
225 typename util::enable_if<util::is_same<U,gsFeSpace<Scalar> >::value || util::is_same<U,gsFeSolution<Scalar> >::value,
index_t >::type
226 cols_impl(
const U & u)
const
231 template<
class U>
inline
232 typename util::enable_if<util::is_same<U,gsFeVariable<Scalar> >::value,
index_t >::type
233 cols_impl(
const U & u)
const
235 return u.source().targetDim();
247template<
class E1,
class E2,
class E3>
251 typedef typename E1::Scalar Scalar;
254 typename E1::Nested_t _u;
255 typename E2::Nested_t _v;
256 typename gsGeometryMap<Scalar>::Nested_t _G;
257 typename E3::Nested_t _Ef;
260 enum{ Space = 3, ScalarValued= 0, ColBlocks= 0 };
262 var2dot_expr(
const E1 & u,
const E2 & v,
const gsGeometryMap<Scalar> & G, _expr<E3>
const& Ef) : _u(u),_v(v), _G(G), _Ef(Ef) { }
267 mutable gsVector<Scalar> m_u, m_v, normal, m_uv, m_u_der, n_der, n_der2, tmp;
268# define Eigen gsEigen
269 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
282 res.resize(_u.cardinality(), _u.cardinality());
284 normal = _G.data().normal(k);
286 uGrads = _u.data().values[1].col(k);
287 vGrads = _v.data().values[1].col(k);
288 cJac = _G.data().values[1].
reshapeCol(k, _G.data().dim.first, _G.data().dim.second).transpose();
290 const index_t cardU = _u.data().values[0].rows();
291 const index_t cardV = _v.data().values[0].rows();
292 const Scalar measure = (cJac.
col3d(0).cross( cJac.
col3d(1) )).norm();
296 for (
index_t j = 0; j!= cardU; ++j)
298 for (
index_t i = 0; i!= cardV; ++i)
300 for (
index_t d = 0; d!= _u.dim(); ++d)
302 m_u.noalias() = ( vecFun(d, uGrads.
at(2*j ) ).cross( cJac.
col3d(1) )
303 -vecFun(d, uGrads.
at(2*j+1) ).cross( cJac.
col3d(0) ))
308 for (
index_t c = 0; c!= _v.dim(); ++c)
311 m_v.noalias() = ( vecFun(c, vGrads.
at(2*i ) ).cross( cJac.
col3d(1) )
312 -vecFun(c, vGrads.
at(2*i+1) ).cross( cJac.
col3d(0) ))
316 n_der.noalias() = (m_v - ( normal*m_v.transpose() ) * normal);
318 m_uv.noalias() = ( vecFun(d, uGrads.
at(2*j ) ).cross( vecFun(c, vGrads.
at(2*i+1) ) )
319 +vecFun(c, vGrads.
at(2*i ) ).cross( vecFun(d, uGrads.
at(2*j+1) ) ))
322 m_u_der.noalias() = (m_uv - ( normal.dot(m_v) ) * m_u);
326 tmp = m_u_der - (m_u.dot(n_der) + normal.dot(m_u_der) ) * normal - (normal.dot(m_u) ) * n_der;
332 res(s + j, r + i ) = result(0,0);
364 void print(std::ostream &os)
const { os <<
"var2("; _u.print(os); os <<
")"; }
374template<
class E1,
class E2,
class E3>
378 typedef typename E1::Scalar Scalar;
381 typename E1::Nested_t _u;
382 typename E2::Nested_t _v;
383 typename gsGeometryMap<Scalar>::Nested_t _G;
384 typename E3::Nested_t _Ef;
387 enum{ Space = 3, ScalarValued= 0, ColBlocks= 0 };
389 var2deriv2dot_expr(
const E1 & u,
const E2 & v,
const gsGeometryMap<Scalar> & G, _expr<E3>
const& Ef) : _u(u),_v(v), _G(G), _Ef(Ef) { }
394 mutable gsVector<Scalar> m_u, m_v, normal, m_uv, m_u_der, n_der, n_der2, tmp;
395# define Eigen gsEigen
396 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
409 res.resize(_u.cardinality(), _u.cardinality());
411 normal = _G.data().normal(k);
413 uGrads = _u.data().values[1].col(k);
414 vGrads = _v.data().values[1].col(k);
415 cJac = _G.data().values[1].
reshapeCol(k, _G.data().dim.first, _G.data().dim.second).transpose();
416 cDer2 = _G.data().values[2].
reshapeCol(k, _G.data().dim.second, _G.data().dim.second);
418 const index_t cardU = _u.data().values[0].rows();
419 const index_t cardV = _v.data().values[0].rows();
420 const Scalar measure = (cJac.
col3d(0).cross( cJac.
col3d(1) )).norm();
424 for (
index_t j = 0; j!= cardU; ++j)
426 for (
index_t i = 0; i!= cardV; ++i)
428 for (
index_t d = 0; d!= _u.dim(); ++d)
430 m_u.noalias() = ( vecFun(d, uGrads.
at(2*j ) ).cross( cJac.
col3d(1) )
431 -vecFun(d, uGrads.
at(2*j+1) ).cross( cJac.
col3d(0) ))
436 for (
index_t c = 0; c!= _v.dim(); ++c)
439 m_v.noalias() = ( vecFun(c, vGrads.
at(2*i ) ).cross( cJac.
col3d(1) )
440 -vecFun(c, vGrads.
at(2*i+1) ).cross( cJac.
col3d(0) ))
444 n_der.noalias() = (m_v - ( normal*m_v.transpose() ) * normal);
446 m_uv.noalias() = ( vecFun(d, uGrads.
at(2*j ) ).cross( vecFun(c, vGrads.
at(2*i+1) ) )
447 +vecFun(c, vGrads.
at(2*i ) ).cross( vecFun(d, uGrads.
at(2*j+1) ) ))
450 m_u_der.noalias() = (m_uv - ( normal.dot(m_v) ) * m_u);
454 tmp = m_u_der - (m_u.dot(n_der) + normal.dot(m_u_der) ) * normal - (normal.dot(m_u) ) * n_der;
462 res(s + j, r + i ) = result(0,0);
494 void print(std::ostream &os)
const { os <<
"var2dot("; _u.print(os), _v.print(os), _G.print(os), _Ef.print(os); os <<
")"; }
498template<
class E1,
class E2>
502 typedef typename E1::Scalar Scalar;
506 typename E1::Nested_t _u;
507 typename E2::Nested_t _v;
508 typename gsGeometryMap<Scalar>::Nested_t _G;
511 enum{ Space = E1::Space, ScalarValued= 0, ColBlocks= 0 };
513 var2_expr(
const E1 & u,
const E2 & v,
const gsGeometryMap<Scalar> & G) : _u(u),_v(v), _G(G) { }
518 mutable gsVector<Scalar> m_u, m_v, normal, m_uv, m_u_der, n_der, n_der2, tmp;
520# define Eigen gsEigen
521 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
546 grad(_u).parse(evList);
547 grad(_v).parse(evList);
565 enum{rowSpan = 0, colSpan = 0};
567 void print(std::ostream &os)
const { os <<
"var2("; _u.print(os), _v.print(os), _G.print(os); os <<
")"; }
571 template<
class U,
class V>
inline
572 typename util::enable_if< !(util::is_same<U,gsFeVariable<Scalar> >::value && util::is_same<V,gsFeVariable<Scalar> >::value),
const gsMatrix<Scalar> & >::type
573 eval_impl(
const U & u,
const V & v,
const index_t k)
const
578 template<
class U,
class V>
inline
579 typename util::enable_if< util::is_same<U,gsFeVariable<Scalar> >::value && util::is_same<V,gsFeVariable<Scalar> >::value,
const gsMatrix<Scalar> & >::type
580 eval_impl(
const U & u,
const V & v,
const index_t k)
const
582 grad_expr<U> uGrad = grad_expr<U>(u);
583 uGrads = uGrad.eval(k);
584 grad_expr<V> vGrad = grad_expr<V>(v);
585 vGrads = vGrad.eval(k);
587 res.resize(rows(), cols());
589 normal = _G.data().normal(k);
592 cJac = _G.data().values[1].
reshapeCol(k, _G.data().dim.first, _G.data().dim.second).transpose();
593 cDer2 = _G.data().values[2].
reshapeCol(k, _G.data().dim.second, _G.data().dim.second);
595 const Scalar measure = (cJac.
col3d(0).cross( cJac.
col3d(1) )).norm();
597 m_u.noalias() = ( ( uGrads.col(0).template head<3>() ).cross( cJac.col(1).template head<3>() )
598 - ( uGrads.col(1).template head<3>() ).cross( cJac.col(0).template head<3>() ) )
601 m_v.noalias() = ( ( vGrads.col(0).template head<3>() ).cross( cJac.col(1).template head<3>() )
602 - ( vGrads.col(1).template head<3>() ).cross( cJac.col(0).template head<3>() ) )
606 n_der.noalias() = (m_v - ( normal*m_v.transpose() ) * normal);
608 m_uv.noalias() = ( ( uGrads.col(0).template head<3>() ).cross( vGrads.col(1).template head<3>() )
609 - ( vGrads.col(1).template head<3>() ).cross( uGrads.col(0).template head<3>() ) )
612 m_u_der.noalias() = (m_uv - ( normal.dot(m_v) ) * m_u);
616 tmp = m_u_der - (m_u.dot(n_der) + normal.dot(m_u_der) ) * normal - (normal.dot(m_u) ) * n_der;
662 typedef typename E::Scalar Scalar;
665 typename E::Nested_t _u;
666 typename gsGeometryMap<Scalar>::Nested_t _G;
673 enum{ Space = E::Space, ScalarValued= 0, ColBlocks= 0};
675 tvar1_expr(
const E & u,
const gsGeometryMap<Scalar> & G) : _u(u), _G(G) { }
677# define Eigen gsEigen
678 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
690 index_t rows()
const {
return 1; }
691 index_t cols()
const {
return _u.dim(); }
695 parse_impl<E>(evList);
700 index_t cardinality_impl()
const {
return _u.cardinality_impl(); }
702 void print(std::ostream &os)
const { os <<
"tvar("; _G.print(os); os <<
")"; }
705 template<
class U>
inline
706 typename util::enable_if< !util::is_same<U,gsFeSolution<Scalar> >::value,
void>::type
715 template<
class U>
inline
716 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value,
void>::type
722 grad(_u).parse(evList);
727 template<
class U>
inline
728 typename util::enable_if< !util::is_same<U,gsFeSolution<Scalar> >::value,
const gsMatrix<Scalar> & >::type
729 eval_impl(
const U & u,
const index_t k)
const
731 GISMO_ASSERT(_G.data().dim.second==3,
"Domain dimension should be 3, is "<<_G.data().dim.second);
733 const index_t A = u.cardinality()/u.dim();
734 res.resize(u.cardinality(), cols());
736 cJac = _G.data().jacobian(k);
737 cJac.colwise().normalize();
739 onormal = _G.data().outNormal(k);
741 tmp = cJac.transpose() * onormal;
742 tmp.colwise().normalize();
751 if ( (math::abs(tmp.
at(0)) < tol) && (math::abs(tmp.
at(1)) > 1-tol ) )
753 else if ( (math::abs(tmp.
at(1)) < tol) && (math::abs(tmp.
at(0)) > 1-tol ) )
756 gsInfo<<
"warning: choice unknown\n";
760 tangent = tan_expr.eval(k);
761 utangent = tangent.normalized();
766 Scalar dot = tangent.dot(cJac.col(colIndex));
767 sign = (Scalar(0) < dot) - (dot < Scalar(0));
771 gsWarn<<
"No suitable tangent and outer normal vector found for point "<<_G.data().values[0].transpose()<<
"\n";
776 bGrads = _u.data().values[1].col(k);
777 for (
index_t d = 0; d!= cols(); ++d)
780 for (
index_t j = 0; j!= A; ++j)
784 dtan = sign*vecFun(d, bGrads.
at(2*j+colIndex));
785 res.row(s+j).noalias() = (1 / tangent.norm() * ( dtan - ( utangent.transpose() * dtan ) * utangent ) ).transpose();
791 template<
class U>
inline
792 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value,
const gsMatrix<Scalar> & >::type
793 eval_impl(
const U & u,
const index_t k)
const
795 GISMO_ASSERT(1==_u.data().actives.cols(),
"Single actives expected");
796 res.resize(rows(), cols());
799 cJac = _G.data().jacobian(k);
800 cJac.colwise().normalize();
802 onormal = _G.data().outNormal(k);
804 tmp = cJac.transpose() * onormal;
805 tmp.colwise().normalize();
815 if ( (math::abs(tmp.
at(0)) < tol) && (math::abs(tmp.
at(1)) > 1-tol ) )
817 else if ( (math::abs(tmp.
at(1)) < tol) && (math::abs(tmp.
at(0)) > 1-tol ) )
820 gsInfo<<
"warning: choice unknown\n";
824 tangent = tan_expr.eval(k);
830 Scalar dot = tangent.dot(cJac.col(colIndex));
831 sign = (Scalar(0) < dot) - (dot < Scalar(0));
835 gsWarn<<
"No suitable tangent and outer normal vector found for point "<<_G.data().values[0].transpose()<<
"\n";
839 bGrads = _u.data().values[1].col(k);
840 dtan = sign*bGrads.col(colIndex);
841 res.noalias() = (1 / tangent.norm() * ( dtan - ( tangent * dtan ) * tangent / (tangent.norm() * tangent.norm()) )).transpose();
856 typedef typename E::Scalar Scalar;
859 typename E::Nested_t _u;
860 typename gsGeometryMap<Scalar>::Nested_t _G;
867 enum{ Space = E::Space, ScalarValued= 0, ColBlocks= 0};
869 ovar1_expr(
const E & u,
const gsGeometryMap<Scalar> & G) : _u(u), _G(G) { }
871# define Eigen gsEigen
872 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
885 index_t rows()
const {
return 1; }
886 index_t cols()
const {
return _u.dim(); }
890 parse_impl<E>(evList);
895 index_t cardinality_impl()
const {
return _u.cardinality_impl(); }
897 void print(std::ostream &os)
const { os <<
"ovar("; _G.print(os); os <<
")"; }
900 template<
class U>
inline
901 typename util::enable_if< !util::is_same<U,gsFeSolution<Scalar> >::value,
void>::type
909 tv(_G).parse(evList);
910 tvar1(_u,_G).parse(evList);
911 var1(_u,_G).parse(evList);
914 template<
class U>
inline
915 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value,
void>::type
921 grad(_u).parse(evList);
922 tv(_G).parse(evList);
927 template<
class U>
inline
928 typename util::enable_if< !util::is_same<U,gsFeSolution<Scalar> >::value,
const gsMatrix<Scalar> & >::type
929 eval_impl(
const U & u,
const index_t k)
const
931 GISMO_ASSERT(_G.data().dim.second==3,
"Domain dimension should be 3, is "<<_G.data().dim.second);
932 const index_t A = u.cardinality()/u.dim();
933 res.resize(u.cardinality(), cols());
936 tangent = tan_expr.eval(k);
940 normal = _G.data().normal(k);
944 tvarMat = tvar_expr.eval(k);
947 snvarMat = snvar_expr.eval(k);
949 for (
index_t d = 0; d!= cols(); ++d)
952 for (
index_t j = 0; j!= A; ++j)
954 tvar = tvarMat.row(s+j);
955 snvar= snvarMat.row(s+j);
958 res.row(s+j).noalias() = tvar.cross(normal) + tangent.cross(snvar);
964 template<
class U>
inline
965 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value,
const gsMatrix<Scalar> & >::type
966 eval_impl(
const U & u,
const index_t k)
const
968 GISMO_ASSERT(_G.data().dim.second==3,
"Domain dimension should be 3, is "<<_G.data().dim.second);
969 res.resize(rows(), cols());
972 tangent = tan_expr.eval(k);
976 normal = _G.data().normal(k);
980 tvar = tvar_expr.eval(k);
983 snvar = snvar_expr.eval(k);
987 res.noalias() = tvar.cross(normal) + tangent.cross(snvar);
1000template<
class E1,
class E2,
class E3>
1004 typedef typename E1::Scalar Scalar;
1007 typename E1::Nested_t _u;
1008 typename E2::Nested_t _v;
1009 typename gsGeometryMap<Scalar>::Nested_t _G;
1010 typename E3::Nested_t _C;
1012 mutable gsVector<Scalar,3> normal, onormal, tangent, utangent, dtanu, dtanv, tvaru, tvarv, tvar2,
1013 mu, mv, muv, mu_der, snvaru, snvarv, snvar2, nvar2;
1018 enum{ Space = 3, ScalarValued= 0, ColBlocks= 0 };
1020 ovar2dot_expr(
const E1 & u,
const E2 & v,
const gsGeometryMap<Scalar> & G, _expr<E3>
const& C) : _u(u), _v(v), _G(G), _C(C) { }
1022# define Eigen gsEigen
1023 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1036 GISMO_ASSERT(_G.data().dim.second==3,
"Domain dimension should be 3, is "<<_G.data().dim.second);
1037 GISMO_ASSERT(_C.cols()*_C.rows()==3,
"Size of vector is incorrect");
1038 res.resize(_u.cardinality(), _u.cardinality());
1044 cJac = _G.data().values[1].
reshapeCol(k, _G.data().dim.first, _G.data().dim.second).transpose();
1045 cJac.colwise().normalize();
1047 onormal = _G.data().outNormal(k);
1048 onormal.normalize();
1049 tmp = cJac.transpose() * onormal;
1050 tmp.colwise().normalize();
1060 if ( (math::abs(tmp.
at(0)) < tol) && (math::abs(tmp.
at(1)) > 1-tol ) )
1062 else if ( (math::abs(tmp.
at(1)) < tol) && (math::abs(tmp.
at(0)) > 1-tol ) )
1065 gsInfo<<
"warning: choice unknown\n";
1071 normal = _G.data().normal(k);
1073 uGrads = _u.data().values[1].col(k);
1074 vGrads = _v.data().values[1].col(k);
1076 const index_t cardU = _u.data().values[0].rows();
1077 const index_t cardV = _v.data().values[0].rows();
1078 const Scalar measure = (cJac.
col3d(0).cross( cJac.
col3d(1) )).norm();
1081 tangent = tan_expr.eval(k);
1082 utangent = tangent.normalized();
1087 Scalar dot = tangent.dot(cJac.col(colIndex));
1088 sign = (Scalar(0) < dot) - (dot < Scalar(0));
1092 gsWarn<<
"No suitable tangent and outer normal vector found for point "<<_G.data().values[0].transpose()<<
"\n";
1105 for (
index_t j = 0; j!= cardU; ++j)
1107 for (
index_t i = 0; i!= cardV; ++i)
1109 for (
index_t d = 0; d!= _u.dim(); ++d)
1116 dtanu = sign*vecFun(d, uGrads.
at(2*j+colIndex));
1117 tvaru = 1 / tangent.norm() * ( dtanu - ( utangent.dot(dtanu) ) * utangent );
1120 mu.noalias() = ( vecFun(d, uGrads.
at(2*j ) ).cross( cJac.
col3d(1) )
1121 -vecFun(d, uGrads.
at(2*j+1) ).cross( cJac.
col3d(0) ))
1123 snvaru.noalias() = (mu - ( normal.dot(mu) ) * normal);
1125 for (
index_t c = 0; c!= _v.dim(); ++c)
1132 dtanv = sign*vecFun(c, vGrads.
at(2*i+colIndex));
1133 tvarv = 1 / tangent.norm() * ( dtanv - ( utangent.dot(dtanv) ) * utangent );
1136 mv.noalias() = ( vecFun(c, vGrads.
at(2*i ) ).cross( cJac.
col3d(1) )
1137 -vecFun(c, vGrads.
at(2*i+1) ).cross( cJac.
col3d(0) ))
1139 snvarv.noalias() = (mv - ( normal.dot(mv) ) * normal);
1145 tvar2 = -1 / tangent.norm() * (
1146 ( tvarv.dot(dtanu) * utangent )
1147 + ( utangent.dot(dtanv) * tvaru )
1148 + ( utangent.dot(dtanu) * tvarv )
1152 muv.noalias() = ( vecFun(d, uGrads.
at(2*j ) ).cross( vecFun(c, vGrads.
at(2*i+1) ) )
1153 +vecFun(c, vGrads.
at(2*i ) ).cross( vecFun(d, uGrads.
at(2*j+1) ) ))
1156 mu_der.noalias() = (muv - ( normal.dot(mv) ) * mu);
1158 snvar2 = mu_der - (mu.dot(snvarv) + normal.dot(mu_der) ) * normal - (normal.dot(mu) ) * snvarv;
1161 nvar2 = tvar2.cross(normal) + tvaru.cross(snvarv) + tvarv.cross(snvaru) + utangent.cross(snvar2);
1163 res(s + j, r + i ) = (eC * nvar2).value();
1171 index_t rows()
const {
return 1; }
1173 index_t cols()
const {
return 1; }
1189 void print(std::ostream &os)
const { os <<
"nvar2("; _u.print(os); os <<
")"; }
1198template<
class E1,
class E2>
1201 typename E1::Nested_t _u;
1202 typename E2::Nested_t _v;
1205 enum{ Space = (E1::Space == 1 || E2::Space == 1) ? 1 : 0,
1210 typedef typename E1::Scalar Scalar;
1225 return cols_impl(_u);
1230 parse_impl<E1>(evList);
1235 if (E1::Space == 1 && E2::Space == 0)
1237 else if (E1::Space == 0 && E2::Space == 1)
1240 return gsNullExpr<Scalar>::get();
1245 if (E1::Space == 1 && E2::Space == 0)
1247 else if (E1::Space == 0 && E2::Space == 1)
1250 return gsNullExpr<Scalar>::get();
1253 void print(std::ostream &os)
const { os <<
"deriv2("; _u.print(os); _v.print(os); os <<
")"; }
1256 template<
class U>
inline
1257 typename util::enable_if< util::is_same<U,gsGeometryMap<Scalar> >::value,
void>::type
1269 template<
class U>
inline
1270 typename util::enable_if< util::is_same<U,gsFeSpace<Scalar> >::value,
void>::type
1282 template<
class U>
inline
1283 typename util::enable_if< util::is_same<U,gsFeVariable<Scalar> >::value,
void>::type
1295 template<
class U>
inline
1296 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value,
void>::type
1300 hess(_u).parse(evList);
1306 template<
class U>
inline
1307 typename util::enable_if< util::is_same<U,gsGeometryMap<Scalar> >::value,
const gsMatrix<Scalar> & >::type
1308 eval_impl(
const U & u,
const index_t k)
const
1321 tmp =u.data().values[2].reshapeCol(k, cols(), u.data().dim.second );
1323 res = vEv * tmp.transpose();
1327 template<
class U>
inline
1328 typename util::enable_if<util::is_same<U,gsFeSpace<Scalar> >::value,
const gsMatrix<Scalar> & >::type
1329 eval_impl(
const U & u,
const index_t k)
const
1337 const index_t numAct = u.data().values[0].rows();
1338 const index_t cardinality = u.cardinality();
1339 res.resize(rows()*cardinality, cols() );
1340 tmp.transpose() =_u.data().values[2].reshapeCol(k, cols(), numAct );
1343 for (
index_t i = 0; i!=_u.dim(); i++)
1344 res.block(i*numAct, 0, numAct, cols() ) = tmp * vEv.
at(i);
1348 template<
class U>
inline
1349 typename util::enable_if<util::is_same<U,gsFeVariable<Scalar> >::value,
const gsMatrix<Scalar> & >::type
1350 eval_impl(
const U & u,
const index_t k)
const
1363 tmp = u.data().values[2].col(k);
1364 index_t nDers = _u.source().domainDim() * (_u.source().domainDim() + 1) / 2;
1365 index_t dim = _u.source().targetDim();
1366 tmp2.resize(nDers, dim);
1367 for (
index_t comp = 0; comp != u.source().targetDim(); comp++)
1368 tmp2.col(comp) = tmp.block(comp * nDers, 0, nDers, 1);
1371 res = vEv * tmp2.transpose();
1375 template<
class U>
inline
1376 typename util::enable_if<util::is_same<U,gsFeSolution<Scalar> >::value,
const gsMatrix<Scalar> & >::type
1377 eval_impl(
const U & u,
const index_t k)
const
1389 hess_expr<gsFeSolution<Scalar>> sHess = hess_expr<gsFeSolution<Scalar>>(u);
1390 tmp = sHess.eval(k);
1396 template<
class U>
inline
1397 typename util::enable_if< util::is_same<U,gsGeometryMap<Scalar> >::value ||
1398 util::is_same<U,gsFeVariable<Scalar> >::value,
index_t >::type
1399 cols_impl(
const U & u)
const
1401 return u.targetDim();
1404 template<
class U>
inline
1405 typename util::enable_if< util::is_same<U,gsFeSpace<Scalar> >::value ||
1406 util::is_same<U,gsFeSolution<Scalar> >::value,
index_t >::type
1407 cols_impl(
const U & u)
const
1443 typename E::Nested_t _u;
1447 enum{ Space = E::Space, ScalarValued= 0, ColBlocks = (1==E::Space?1:0) };
1449 typedef typename E::Scalar Scalar;
1459 return rows_impl(_u);
1464 return cols_impl(_u);
1476 index_t cardinality_impl()
const {
return _u.cardinality_impl(); }
1478 void print(std::ostream &os)
const { os <<
"deriv2("; _u.print(os); os <<
")"; }
1481 template<
class U>
inline
1482 typename util::enable_if< util::is_same<U,gsGeometryMap<Scalar> >::value,
const gsMatrix<Scalar> & >::type
1483 eval_impl(
const U & u,
const index_t k)
const
1495 res = u.data().values[2].reshapeCol(k, cols(), u.data().dim.second );
1499 template<
class U>
inline
1500 typename util::enable_if< util::is_same<U,gsFeVariable<Scalar> >::value,
const gsMatrix<Scalar> & >::type
1501 eval_impl(
const U & u,
const index_t k)
const
1514 tmp = u.data().values[2];
1515 res.resize(rows(),cols());
1516 for (
index_t comp = 0; comp != u.source().targetDim(); comp++)
1517 res.col(comp) = tmp.block(comp*rows(),0,rows(),1);
1521 template<
class U>
inline
1522 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value,
const gsMatrix<Scalar> & >::type
1523 eval_impl(
const U & u,
const index_t k)
const
1535 hess_expr<gsFeSolution<Scalar>> sHess = hess_expr<gsFeSolution<Scalar>>(_u);
1536 res = sHess.eval(k).transpose();
1541 template<
class U>
inline
1542 typename util::enable_if<util::is_same<U,gsFeSpace<Scalar> >::value,
const gsMatrix<Scalar> & >::type
1562 const index_t numAct = u.data().values[0].rows();
1563 const index_t cardinality = u.cardinality();
1565 res.resize(rows(), _u.dim() *_u.cardinality());
1568 tmp = _u.data().values[2].reshapeCol(k, cols(), numAct );
1569 for (
index_t d = 0; d != cols(); ++d)
1571 const index_t s = d*(cardinality + 1);
1572 for (
index_t i = 0; i != numAct; ++i)
1573 res.col(s+i*_u.cols()) = tmp.col(i);
1579 template<
class U>
inline
1580 typename util::enable_if< util::is_same<U,gsFeVariable<Scalar> >::value || util::is_same<U,gsGeometryMap<Scalar> >::value || util::is_same<U,gsFeSpace<Scalar> >::value,
index_t >::type
1581 rows_impl(
const U & u)
const
1583 return u.source().domainDim() * ( u.source().domainDim() + 1 ) / 2;
1586 template<
class U>
inline
1587 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value,
index_t >::type
1588 rows_impl(
const U & u)
const
1590 return u.parDim() * ( u.parDim() + 1 ) / 2;
1594 template<
class U>
inline
1595 typename util::enable_if< util::is_same<U,gsFeVariable<Scalar> >::value || util::is_same<U,gsGeometryMap<Scalar> >::value,
index_t >::type
1596 cols_impl(
const U & u)
const
1598 return u.source().targetDim();
1601 template<
class U>
inline
1602 typename util::enable_if< util::is_same<U,gsFeSolution<Scalar> >::value || util::is_same<U,gsFeSpace<Scalar> >::value,
index_t >::type
1603 cols_impl(
const U & u)
const
1617template<
class E1,
class E2,
class E3>
1621 typedef typename E1::Scalar Scalar;
1624 typename E1::Nested_t _A;
1625 typename E2::Nested_t _B;
1626 typename E3::Nested_t _C;
1630 enum {Space = 3, ScalarValued = 0, ColBlocks = 0};
1634 flatdot_expr(_expr<E1>
const& A, _expr<E2>
const& B, _expr<E3>
const& C) : _A(A),_B(B),_C(C)
1641 const index_t An = _A.cardinality();
1643 const index_t Bn = _B.cardinality();
1649 GISMO_ASSERT(Bc==_A.rows(),
"Dimensions: "<<Bc<<
","<< _A.rows()<<
"do not match");
1650 GISMO_STATIC_ASSERT(E1::Space==1,
"First entry should be rowSpan" );
1651 GISMO_STATIC_ASSERT(E2::Space==2,
"Second entry should be colSpan.");
1656 for (
index_t i = 0; i!=An; ++i)
1657 for (
index_t j = 0; j!=Bn; ++j)
1659 tmp.noalias() = eB.middleCols(i*Bc,Bc) * eA.middleCols(j*Ac,Ac);
1661 tmp(0,0) *= eC.
at(0);
1662 tmp(0,1) *= eC.
at(2);
1663 tmp(1,0) *= eC.
at(2);
1664 tmp(1,1) *= eC.
at(1);
1665 res(i,j) = tmp.sum();
1670 index_t rows()
const {
return 1; }
1671 index_t cols()
const {
return 1; }
1674 { _A.parse(evList);_B.parse(evList);_C.parse(evList); }
1678 index_t cardinality_impl()
const {
return _A.cardinality_impl(); }
1680 void print(std::ostream &os)
const { os <<
"flatdot("; _A.print(os);_B.print(os);_C.print(os); os<<
")"; }
1692template<
class E1,
class E2,
class E3>
1696 typedef typename E1::Scalar Scalar;
1699 typename E1::Nested_t _A;
1700 typename E2::Nested_t _B;
1701 typename E3::Nested_t _C;
1705 enum {Space = E1::Space, ScalarValued = 0, ColBlocks = 0};
1707 flatdot2_expr(_expr<E1>
const& A, _expr<E2>
const& B, _expr<E3>
const& C) : _A(A),_B(B),_C(C)
1714 const index_t An = _A.cardinality();
1715 const index_t Bn = _B.cardinality();
1721 GISMO_ASSERT(_B.rows()==_A.cols(),
"Dimensions: "<<_B.rows()<<
","<< _A.cols()<<
"do not match");
1722 GISMO_STATIC_ASSERT(E1::Space==1,
"First entry should be rowSpan");
1723 GISMO_STATIC_ASSERT(E2::Space==2,
"Second entry should be colSpan.");
1724 GISMO_ASSERT(_C.cols()==_B.rows(),
"Dimensions: "<<_C.rows()<<
","<< _B.rows()<<
"do not match");
1727 for (
index_t i = 0; i!=An; ++i)
1728 for (
index_t j = 0; j!=Bn; ++j)
1730 tmp = eA.middleCols(i*Ac,Ac) * eB.col(j);
1732 res(i,j) = (eC.row(0) * tmp.col(0)).value();
1737 index_t rows()
const {
return 1; }
1738 index_t cols()
const {
return 1; }
1741 { _A.parse(evList);_B.parse(evList);_C.parse(evList); }
1745 index_t cardinality_impl()
const {
return _A.cardinality_impl(); }
1747 void print(std::ostream &os)
const { os <<
"flatdot2("; _A.print(os);_B.print(os);_C.print(os); os<<
")"; }
1757class cartcov_expr :
public _expr<cartcov_expr<T> >
1759 typename gsGeometryMap<T>::Nested_t _G;
1764 enum {Space = 0, ScalarValued = 0, ColBlocks = 0};
1766 cartcov_expr(
const gsGeometryMap<T> & G) : _G(G) { }
1768 mutable gsMatrix<Scalar> covBasis;
1769 mutable gsMatrix<Scalar,3,3> result;
1770 mutable gsVector<Scalar> normal, tmp;
1771 mutable gsVector<Scalar> e1, e2, a1, a2;
1773 gsMatrix<Scalar> eval(
const index_t k)
const
1775 if (_G.targetDim()==3)
1778 normal = _G.data().normals.col(k);
1780 covBasis.resize(3,3);
1781 covBasis.leftCols(2) = _G.data().jacobian(k);
1782 covBasis.col(2) = normal;
1784 else if (_G.targetDim()==2)
1787 covBasis.resize(2,2);
1788 covBasis = _G.data().jacobian(k);
1793 a1 = covBasis.col(0);
1794 a2 = covBasis.col(1);
1796 e1 = a1.normalized();
1797 e2 = (a2-(a2.dot(e1)*e1)).normalized();
1799 result(0,0) = (e1.dot(a1))*(a1.dot(e1));
1800 result(0,1) = (e1.dot(a2))*(a2.dot(e1));
1801 result(0,2) = 2*(e1.dot(a1))*(a2.dot(e1));
1803 result(1,0) = (e2.dot(a1))*(a1.dot(e2));
1804 result(1,1) = (e2.dot(a2))*(a2.dot(e2));
1805 result(1,2) = 2*(e2.dot(a1))*(a2.dot(e2));
1807 result(2,0) = (e1.dot(a1))*(a1.dot(e2));
1808 result(2,1) = (e1.dot(a2))*(a2.dot(e2));
1809 result(2,2) = (e1.dot(a1))*(a2.dot(e2)) + (e1.dot(a2))*(a1.dot(e2));
1813 cartcovinv_expr<T> inv()
const
1815 GISMO_ASSERT(rows() == cols(),
"The Jacobian matrix is not square");
1816 return cartcovinv_expr<T>(_G);
1819 index_t rows()
const {
return 3; }
1821 index_t cols()
const {
return 3; }
1823 static const gsFeSpace<Scalar> & rowVar() {
return gsNullExpr<Scalar>::get(); }
1824 static const gsFeSpace<Scalar> & colVar() {
return gsNullExpr<Scalar>::get(); }
1826 void parse(gsExprHelper<Scalar> & evList)
const
1833 void print(std::ostream &os)
const { os <<
"cartcov("; _G.print(os); os <<
")"; }
1839 typename gsGeometryMap<T>::Nested_t _G;
1844 enum {Space = 0, ScalarValued = 0, ColBlocks = 0};
1852 cartcov_expr<Scalar> cartcov = cartcov_expr<Scalar>(_G);
1853 temp = (cartcov.eval(k)).
reshape(3,3).inverse();
1857 index_t rows()
const {
return 3; }
1859 index_t cols()
const {
return 3; }
1867 cartcov(_G).parse(evList);
1873 void print(std::ostream &os)
const { os <<
"cartcovinv("; _G.print(os); os <<
")"; }
1882class cartcon_expr :
public _expr<cartcon_expr<T> >
1884 typename gsGeometryMap<T>::Nested_t _G;
1889 enum {Space = 0, ScalarValued = 0, ColBlocks = 0};
1891 cartcon_expr(
const gsGeometryMap<T> & G) : _G(G) { }
1893 mutable gsMatrix<Scalar> covBasis, conBasis, covMetric, conMetric, cartBasis;
1894 mutable gsMatrix<Scalar,3,3> result;
1895 mutable gsVector<Scalar> normal, tmp;
1896 mutable gsVector<Scalar> e1, e2, ac1, ac2, a1, a2;
1898 gsMatrix<Scalar> eval(
const index_t k)
const
1900 if (_G.targetDim()==3)
1903 normal = _G.data().normals.col(k);
1906 covBasis.resize(3,3);
1907 conBasis.resize(3,3);
1908 covBasis.leftCols(2) = _G.data().jacobian(k);
1909 covBasis.col(2) = normal;
1910 covMetric = covBasis.transpose() * covBasis;
1912 conMetric = covMetric.inverse();
1914 conBasis.col(0) = conMetric(0,0)*covBasis.col(0)+conMetric(0,1)*covBasis.col(1)+conMetric(0,2)*covBasis.col(2);
1915 conBasis.col(1) = conMetric(1,0)*covBasis.col(0)+conMetric(1,1)*covBasis.col(1)+conMetric(1,2)*covBasis.col(2);
1917 else if (_G.targetDim()==2)
1923 covBasis.resize(2,2);
1924 conBasis.resize(2,2);
1926 covBasis = _G.data().jacobian(k);
1927 covMetric = covBasis.transpose() * covBasis;
1929 conMetric = covMetric.inverse();
1931 conBasis.col(0) = conMetric(0,0)*covBasis.col(0)+conMetric(0,1)*covBasis.col(1);
1932 conBasis.col(1) = conMetric(1,0)*covBasis.col(0)+conMetric(1,1)*covBasis.col(1);
1937 a1 = covBasis.col(0);
1938 a2 = covBasis.col(1);
1940 e1 = a1.normalized();
1941 e2 = (a2-(a2.dot(e1)*e1)).normalized();
1943 ac1 = conBasis.col(0);
1944 ac2 = conBasis.col(1);
1946 result(0,0) = (e1.dot(ac1))*(ac1.dot(e1));
1947 result(0,1) = (e1.dot(ac2))*(ac2.dot(e1));
1948 result(0,2) = 2*(e1.dot(ac1))*(ac2.dot(e1));
1950 result(1,0) = (e2.dot(ac1))*(ac1.dot(e2));
1951 result(1,1) = (e2.dot(ac2))*(ac2.dot(e2));
1952 result(1,2) = 2*(e2.dot(ac1))*(ac2.dot(e2));
1954 result(2,0) = (e1.dot(ac1))*(ac1.dot(e2));
1955 result(2,1) = (e1.dot(ac2))*(ac2.dot(e2));
1956 result(2,2) = (e1.dot(ac1))*(ac2.dot(e2)) + (e1.dot(ac2))*(ac1.dot(e2));
1961 cartconinv_expr<T> inv()
const
1963 GISMO_ASSERT(rows() == cols(),
"The Jacobian matrix is not square");
1964 return cartconinv_expr<T>(_G);
1967 index_t rows()
const {
return 3; }
1969 index_t cols()
const {
return 3; }
1971 static const gsFeSpace<Scalar> & rowVar() {
return gsNullExpr<Scalar>::get(); }
1972 static const gsFeSpace<Scalar> & colVar() {
return gsNullExpr<Scalar>::get(); }
1974 void parse(gsExprHelper<Scalar> & evList)
const
1981 void print(std::ostream &os)
const { os <<
"cartcon("; _G.print(os); os <<
")"; }
1988 typename gsGeometryMap<T>::Nested_t _G;
1994 enum {Space = 0, ScalarValued = 0, ColBlocks = 0};
2000 cartcon_expr<Scalar> cartcon = cartcon_expr<Scalar>(_G);
2001 temp = (cartcon.eval(k)).
reshape(3,3).inverse();
2005 index_t rows()
const {
return 3; }
2007 index_t cols()
const {
return 3; }
2014 cartcon(_G).parse(evList);
2021 void print(std::ostream &os)
const { os <<
"cartconinv("; _G.print(os); os <<
")"; }
2027template<
class E> EIGEN_STRONG_INLINE
2028var1_expr<E> var1(
const E & u,
const gsGeometryMap<typename E::Scalar> & G) {
return var1_expr<E>(u, G); }
2030template<
class E1,
class E2> EIGEN_STRONG_INLINE
2031var2_expr<E1,E2> var2(
const E1 & u,
const E2 & v,
const gsGeometryMap<typename E1::Scalar> & G)
2032{
return var2_expr<E1,E2>(u,v, G); }
2034template<
class E1,
class E2,
class E3> EIGEN_STRONG_INLINE
2035var2dot_expr<E1,E2,E3> var2(
const E1 & u,
const E2 & v,
const gsGeometryMap<typename E1::Scalar> & G,
const E3 & Ef)
2036{
return var2dot_expr<E1,E2,E3>(u,v, G, Ef); }
2038template<
class E1,
class E2,
class E3> EIGEN_STRONG_INLINE
2039var2deriv2dot_expr<E1,E2,E3> var2deriv2(
const E1 & u,
const E2 & v,
const gsGeometryMap<typename E1::Scalar> & G,
const E3 & Ef)
2040{
return var2deriv2dot_expr<E1,E2,E3>(u,v, G, Ef); }
2042template<
class E> EIGEN_STRONG_INLINE
2043tvar1_expr<E> tvar1(
const E & u,
const gsGeometryMap<typename E::Scalar> & G) {
return tvar1_expr<E>(u, G); }
2045template<
class E> EIGEN_STRONG_INLINE
2046ovar1_expr<E> ovar1(
const E & u,
const gsGeometryMap<typename E::Scalar> & G) {
return ovar1_expr<E>(u, G); }
2048template<
class E1,
class E2,
class E3> EIGEN_STRONG_INLINE
2049ovar2dot_expr<E1,E2,E3> ovar2(
const E1 & u,
const E2 & v,
const gsGeometryMap<typename E1::Scalar> & G,
const E3 & C)
2050{
return ovar2dot_expr<E1,E2,E3>(u,v, G, C); }
2055template<
class E> EIGEN_STRONG_INLINE
2056deriv2_expr<E> deriv2(
const E & u) {
return deriv2_expr<E>(u); }
2058template<
class E1,
class E2> EIGEN_STRONG_INLINE
2059deriv2dot_expr<E1, E2> deriv2(
const E1 & u,
const E2 & v) {
return deriv2dot_expr<E1, E2>(u,v); }
2061template<
class E1,
class E2,
class E3> EIGEN_STRONG_INLINE
2062flatdot_expr<E1,E2,E3> flatdot(
const E1 & u,
const E2 & v,
const E3 & w)
2063{
return flatdot_expr<E1,E2,E3>(u, v, w); }
2065template<
class E1,
class E2,
class E3> EIGEN_STRONG_INLINE
2066flatdot2_expr<E1,E2,E3> flatdot2(
const E1 & u,
const E2 & v,
const E3 & w)
2067{
return flatdot2_expr<E1,E2,E3>(u, v, w); }
2069template<
class E> EIGEN_STRONG_INLINE
2070cartcov_expr<E> cartcov(
const gsGeometryMap<E> & G) {
return cartcov_expr<E>(G); }
2072template<
class E> EIGEN_STRONG_INLINE
2073cartcon_expr<E> cartcon(
const gsGeometryMap<E> & G) {
return cartcon_expr<E>(G); }
Definition gsThinShellUtils.h:1986
Definition gsThinShellUtils.h:1838
Computes the second derivative of an expression.
Definition gsThinShellUtils.h:1442
util::enable_if< util::is_same< U, gsFeSpace< Scalar > >::value, constgsMatrix< Scalar > & >::type eval_impl(const U &u, const index_t k) const
Spexialization for a space.
Definition gsThinShellUtils.h:1543
Expression that takes the second derivative of an expression and multiplies it with a row vector.
Definition gsThinShellUtils.h:1200
Computes the product of expressions E1 and E2 and multiplies with a vector E3 in voight notation.
Definition gsThinShellUtils.h:1694
Computes the product of expressions E1 and E2 and multiplies with a vector E3 in voight notation.
Definition gsThinShellUtils.h:1619
Definition gsExpressions.h:973
Expression for the first variation of the outer normal.
Definition gsThinShellUtils.h:854
Expression for the second variation of the outer normal times a vector.
Definition gsThinShellUtils.h:1002
Definition gsExpressions.h:3081
Expression for the first variation of the outer tangent.
Definition gsThinShellUtils.h:660
Simple expression for the unit vector of length dim and with value 1 on index.
Definition gsThinShellUtils.h:41
Expression for the first variation of the surface normal.
Definition gsThinShellUtils.h:81
Second variation of the normal.
Definition gsThinShellUtils.h:500
Second variation of the surface normal times the second derivative of the geometry map times a vector...
Definition gsThinShellUtils.h:376
Second variation of the surface normal times a vector.
Definition gsThinShellUtils.h:249
Definition gsExprHelper.h:27
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
gsAsMatrix< T, Dynamic, Dynamic > reshapeCol(index_t c, index_t n, index_t m)
Returns column c of the matrix resized to n x m matrix This function assumes that the matrix is size ...
Definition gsMatrix.h:231
Col3DType col3d(index_t c)
Returns column c as a fixed-size 3D vector.
Definition gsMatrix.h:244
T at(index_t i) const
Returns the i-th element of the vectorization of the matrix.
Definition gsMatrix.h:211
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
T at(index_t i) const
Returns the i-th element of the vector.
Definition gsVector.h:177
Provides assembler and solver options.
Provides declaration of Basis abstract interface.
Provides gsBoundaryConditions class.
#define short_t
Definition gsConfig.h:35
#define index_t
Definition gsConfig.h:32
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
#define GISMO_ERROR(message)
Definition gsDebug.h:118
#define gsWarn
Definition gsDebug.h:50
#define GISMO_UNUSED(x)
Definition gsDebug.h:112
#define gsInfo
Definition gsDebug.h:43
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
Provides the gsDofMapper class for re-indexing DoFs.
Defines different expressions.
This object is a cache for computed values from an evaluator.
This is the main header file that collects wrappers of Eigen for linear algebra.
Provides functions to generate structured point data.
EIGEN_STRONG_INLINE reshape_expr< E > const reshape(E const &u, index_t n, index_t m)
Reshape an expression.
Definition gsExpressions.h:1925
EIGEN_STRONG_INLINE tangent_expr< T > tv(const gsGeometryMap< T > &u)
The tangent boundary vector of a geometry map in 2D.
Definition gsExpressions.h:4513
EIGEN_STRONG_INLINE grad_expr< E > grad(const E &u)
The gradient of a variable.
Definition gsExpressions.h:4490
The G+Smo namespace, containing all definitions for the library.
@ NEED_VALUE
Value of the object.
Definition gsForwardDeclarations.h:72
@ NEED_DERIV2
Second derivatives.
Definition gsForwardDeclarations.h:80
@ NEED_DERIV
Gradient of the object.
Definition gsForwardDeclarations.h:73
@ NEED_NORMAL
Normal vector of the object.
Definition gsForwardDeclarations.h:85
@ NEED_OUTER_NORMAL
Outward normal on the boundary.
Definition gsForwardDeclarations.h:86
@ NEED_ACTIVE
Active function ids.
Definition gsForwardDeclarations.h:84