@@ -10,5 +10,53 @@ namespace gismo
1010
1111 CLASS_TEMPLATE_INST gsMaterialMatrixBaseDim<2 ,real_t >;
1212 CLASS_TEMPLATE_INST gsMaterialMatrixBaseDim<3 ,real_t >;
13+
14+ #ifdef GISMO_BUILD_PYBIND11
15+
16+ namespace py = pybind11;
17+
18+ void pybind11_init_gsMaterialMatrixBase (py::module &m)
19+ {
20+ using Class = gsMaterialMatrixBase<real_t >;
21+ py::class_<Class>(m, " gsMaterialMatrixBase" )
22+
23+ // Member functions
24+ .def (" setOptions" , &Class::setOptions, " Sets the options" )
25+ .def (" density_into" , &Class::density_into, " Computes the density into a matrix" )
26+ .def (" stretch_into" , &Class::stretch_into, " Computes the stretches into a matrix" )
27+ .def (" stretchDir_into" , &Class::stretchDir_into, " Computes the stretch directions into a matrix" )
28+ .def (" thickness_into" , &Class::thickness_into, " Computes the thickness into a matrix" )
29+ .def (" transform_into" , &Class::transform_into, " Computes the stretch transformation into a matrix" )
30+ .def (" eval3D_matrix" , &Class::eval3D_matrix, " Evaluates the material matrix" )
31+ .def (" eval3D_vector" , &Class::eval3D_vector, " Evaluates the stress vector" )
32+ .def (" eval3D_pstress" , &Class::eval3D_pstress, " Evaluates the principal stress vector" )
33+
34+ .def (" setYoungsModulus" , &Class::setYoungsModulus, " Sets the Young's Modulus" )
35+ .def (" setPoissonsRatio" , &Class::setPoissonsRatio, " Sets the Poisson's Ratio" )
36+ .def (" setRatio" , &Class::setRatio , " Sets the Ratio for MR model" )
37+ .def (" setMu" , &Class::setMu , " Sets the Mu_i for OG model" )
38+ .def (" setAlpha" , &Class::setAlpha , " Sets the Alpha_i for OG model" )
39+ .def (" setDensity" , &Class::setDensity , " Sets the Density" )
40+ ;
41+ }
42+
43+ void pybind11_init_gsMaterialMatrixBaseDim2 (py::module &m)
44+ {
45+ using Base = gsMaterialMatrixBase<real_t >;
46+ using Class = gsMaterialMatrixBaseDim<2 ,real_t >;
47+ py::class_<Class,Base>(m, " gsMaterialMatrixBaseDim2" )
48+ ;
49+ }
50+
51+ void pybind11_init_gsMaterialMatrixBaseDim3 (py::module &m)
52+ {
53+ using Base = gsMaterialMatrixBase<real_t >;
54+ using Class = gsMaterialMatrixBaseDim<3 ,real_t >;
55+ py::class_<Class,Base>(m, " gsMaterialMatrixBaseDim3" )
56+ ;
57+ }
58+
59+ #endif
60+
1361}
1462
0 commit comments