From 396ebdabbcdf909de1a44a50435263bd977512da Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 28 Oct 2010 07:50:46 +0000 Subject: [PATCH] fix createPartitionBoundaries binding --- Geo/GModel.cpp | 16 ++++++++++------ Geo/GModel.h | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 64326f4fb0..90008eceb1 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 fffd49eec1..f9e2fd56db 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(); -- GitLab