From dda33d6344877bf922d7e2d345dd69cd30404277 Mon Sep 17 00:00:00 2001 From: Bastien Gorissen <bastien.gorissen@cenaero.be> Date: Wed, 20 Jul 2011 07:00:47 +0000 Subject: [PATCH] Filling boundary layer data structure --- Geo/CMakeLists.txt | 1 + Geo/MVertexBoundaryLayerData.h | 3 +++ Mesh/meshGFaceExtruded.cpp | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/Geo/CMakeLists.txt b/Geo/CMakeLists.txt index 43e9387e04..0db6bd1692 100644 --- a/Geo/CMakeLists.txt +++ b/Geo/CMakeLists.txt @@ -40,6 +40,7 @@ set(SRC MZone.cpp MZoneBoundary.cpp Cell.cpp CellComplex.cpp ChainComplex.cpp Homology.cpp Curvature.cpp + MVertexBoundaryLayerData.cpp ) file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) diff --git a/Geo/MVertexBoundaryLayerData.h b/Geo/MVertexBoundaryLayerData.h index 510a2f4d38..91ff8104fc 100644 --- a/Geo/MVertexBoundaryLayerData.h +++ b/Geo/MVertexBoundaryLayerData.h @@ -22,6 +22,9 @@ class MVertexBoundaryLayerData { std::vector<std::vector<MVertex*> > children; public: + MVertexBoundaryLayerData(){}; + ~MVertexBoundaryLayerData(){}; + std::vector<MVertex*>* getChildren(int i); int getNumChildren(int i); diff --git a/Mesh/meshGFaceExtruded.cpp b/Mesh/meshGFaceExtruded.cpp index 0df1afadc7..461f4827c9 100644 --- a/Mesh/meshGFaceExtruded.cpp +++ b/Mesh/meshGFaceExtruded.cpp @@ -66,7 +66,10 @@ static void extrudeMesh(GEdge *from, GFace *to, // create vertices (if the edges are constrained, they already exist) if(!constrainedEdges){ for(unsigned int i = 0; i < from->mesh_vertices.size(); i++){ + std::vector<MVertex*> extruded_vertices; MVertex *v = from->mesh_vertices[i]; + MEdgeVertex *mv = (MEdgeVertex*) v; + mv->bl_data = new MVertexBoundaryLayerData(); for(int j = 0; j < ep->mesh.NbLayer; j++) { for(int k = 0; k < ep->mesh.NbElmLayer[j]; k++) { double x = v->x(), y = v->y(), z = v->z(); @@ -75,9 +78,11 @@ static void extrudeMesh(GEdge *from, GFace *to, MVertex *newv = new MVertex(x, y, z, to); to->mesh_vertices.push_back(newv); pos.insert(newv); + extruded_vertices.push_back(newv); } } } + mv->bl_data->addChildrenFamily(extruded_vertices); } } -- GitLab