@@ -82,20 +82,20 @@ PYBIND11_MODULE(polyfempy, m) {
8282 " sets polyfem log level, valid value between 0 (all logs) and 6 (no logs)" ,
8383 py::arg (" log_level" ))
8484
85- .def (" load_mesh " , [](polyfem::State &s) {
85+ .def (" load_mesh_from_settings " , [](polyfem::State &s) {
8686 init_globals ();
8787 s.load_mesh ();
8888 },
8989 " Loads a mesh from the 'mesh' field of the json and 'bc_tag' if any bc tags" )
9090
91- .def (" load_mesh " , [](polyfem::State &s, const std::string &path) {
91+ .def (" load_mesh_from_path " , [](polyfem::State &s, const std::string &path) {
9292 init_globals ();
9393 s.args [" mesh" ] = path;
9494 s.load_mesh ();
9595 },
9696 " Loads a mesh from the path and 'bc_tag' from the json if any bc tags" ,
9797 py::arg (" path" ))
98- .def (" load_mesh " , [](polyfem::State &s, const std::string &path, const std::string &bc_tag) {
98+ .def (" load_mesh_from_path_and_tags " , [](polyfem::State &s, const std::string &path, const std::string &bc_tag) {
9999 init_globals ();
100100 s.args [" mesh" ] = path;
101101 s.args [" bc_tag" ] = bc_tag;
@@ -106,17 +106,13 @@ PYBIND11_MODULE(polyfempy, m) {
106106 .def (" set_mesh" , [](polyfem::State &s, const Eigen::MatrixXd &V, const Eigen::MatrixXi &F) {
107107 init_globals ();
108108
109- GEO::Mesh M;
110109 if (V.cols () == 2 )
111- polyfem::to_geogram_mesh (V, F, M );
110+ s. mesh = std::make_unique< polyfem::Mesh2D>( );
112111 else
113- polyfem::to_geogram_mesh_3d (V, F, M );
114- s.load_mesh (M, []( const polyfem::RowVectorNd&){ return - 1 ; }, true );
112+ s. mesh = std::make_unique< polyfem::Mesh3D>( );
113+ s.mesh -> build_from_matrices (V, F );
115114
116- double boundary_id_threshold = s.args [" boundary_id_threshold" ];
117- if (boundary_id_threshold <= 0 )
118- boundary_id_threshold = s.mesh ->is_volume () ? 1e-2 : 1e-7 ;
119- s.mesh ->compute_boundary_ids (boundary_id_threshold);
115+ s.load_mesh ();
120116 },
121117 " Loads a mesh from vertices and connectivity" ,
122118 py::arg (" vertices" ), py::arg (" connectivity" ))
@@ -142,7 +138,7 @@ PYBIND11_MODULE(polyfempy, m) {
142138 py::arg (" boundary_marker" ))
143139
144140
145- .def (" set_rhs " , [](polyfem::State &s, std::string &path) {
141+ .def (" set_rhs_from_path " , [](polyfem::State &s, std::string &path) {
146142 init_globals ();
147143 s.args [" rhs_path" ] = path;
148144 },
0 commit comments