diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 64326f4fb0dddbfa3e6eb4d61b1439a4dae8ec6f..90008eceb193724b4cb10622a42f5d2671ffaa5b 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -40,6 +40,7 @@ #include "Field.h" #include "Generator.h" #include "meshGFaceOptimize.h" +#include "meshPartition.h" #endif std::vector<GModel*> GModel::list; @@ -2325,9 +2326,11 @@ void GModel::classifyFaces(std::set<GFace*> &_faces) #endif } -#include "meshPartition.h" -static void createPartitionBoundaries_binding(GModel *model, int createGhostCells) { - CreatePartitionBoundaries(model, createGhostCells); +void GModel::createPartitionBoundaries(int createGhostCells) +{ +#if defined(HAVE_CHACO) || defined(HAVE_METIS) + CreatePartitionBoundaries(this, createGhostCells); +#endif } #include "Bindings.h" @@ -2501,8 +2504,9 @@ void GModel::registerBindings(binding *b) "extrusion height."); cm->setArgNames("{list of entities}","height",NULL); - cm = cb->addMethod("createPartitionBoundaries", &createPartitionBoundaries_binding); - cm->setDescription("Assigns partition tags to boundary elements. Should be called only after the partitions have been assigned"); - cm->setArgNames("gmodel","createGhostCells",NULL); + cm = cb->addMethod("createPartitionBoundaries", &GModel::createPartitionBoundaries); + cm->setDescription("Assigns partition tags to boundary elements. Should be called " + "only after the partitions have been assigned"); + cm->setArgNames("createGhostCells",NULL); } diff --git a/Geo/GModel.h b/Geo/GModel.h index fffd49eec139dc73bb076aae0874cde27b2d4e48..f9e2fd56db5014e2dca98bec23c6fdae84339732 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -360,6 +360,9 @@ class GModel // mesh the model int mesh(int dimension); + // create partition boundaries + void createPartitionBoundaries(int createGhostCells); + // fill the vertex arrays, given the current option and data void fillVertexArrays();