ats = "False";
std::string cmd="import salome.smesh.smesh_tools as smt\n";
- cmd +="smt.smesh_create_dual_mesh(\"" + mesh_ior + "\", \"" +
+ cmd +="smt.smesh_create_dual_mesh(\"" + mesh_ior + "\", r\"" +
dual_mesh_file.string() + "\", mesh_name=\"" + mesh_name + "\", adapt_to_shape=" + ats + ")";
MESSAGE(cmd);
PyObject *py_main = PyImport_AddModule("__main__");
PyObject *py_dict = PyModule_GetDict(py_main);
+ PyObject *local_dict = PyDict_New();
- PyRun_String(cmd.c_str(), Py_file_input, py_dict, py_dict);
+ PyRun_String(cmd.c_str(), Py_file_input, py_dict, local_dict);
if (PyErr_Occurred()) {
// Restrieving python error
#Comparing volumes
dual_volume = dual_Mesh_1.GetVolume()
dual_raw_volume = dual_Mesh_raw_1.GetVolume()
+tetra_volume = Mesh_1.GetVolume()
+print("tetra_volume: ", tetra_volume)
print("dual_volume: ", dual_volume)
print("dual_raw_volume: ", dual_raw_volume)
# Check dual mesh volume
dual_raw_volume = dual_Mesh_raw_1.GetVolume()
-assert abs(dual_raw_volume-shape_volume)/shape_volume < 0.12
+assert abs(dual_raw_volume-shape_volume)/shape_volume < 0.14
# Check groups
dual_Mesh_raw_groups = dual_Mesh_raw_1.GetGroups()
print("dual_raw_volume: ", dual_raw_volume)
assert (dual_volume >= dual_raw_volume)
-assert abs(dual_volume-shape_volume)/shape_volume < 0.12
+assert abs(dual_volume-shape_volume)/shape_volume < 0.14
# Check groups
dual_Mesh_groups = dual_Mesh_1.GetGroups()