Skip to content
Snippets Groups Projects
Commit 2efa9acc authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix

parent 70fc390b
No related branches found
No related tags found
No related merge requests found
// Gmsh - Copyright (C) 1997-2016 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@onelab.info>.
#include <stdlib.h>
#include <vector>
// general
......@@ -30,7 +35,9 @@
// triangles are defining the boundary
// internal points are allowed
// This has been done for HEXTREME
GRegion * createDiscreteRegionFromRawData ( GModel *gm, fullMatrix<double> & pts, fullMatrix<int> &triangles) {
GRegion * createDiscreteRegionFromRawData(GModel *gm, fullMatrix<double> &pts,
fullMatrix<int> &triangles)
{
GRegion *gr = new discreteRegion(gm, NEWREG());
GFace *gf = new discreteFace(gm, NEWREG());
gm->add(gr);
......@@ -38,8 +45,8 @@ GRegion * createDiscreteRegionFromRawData ( GModel *gm, fullMatrix<double> & pt
std::list<GFace*> faces; faces.push_back(gf); gr->set(faces);
// get boundary nodes
std::set<int> bnd;
int nbTriangles = triangles.size1();
int nbPts = pts.size1();
unsigned int nbTriangles = triangles.size1();
unsigned int nbPts = pts.size1();
for (unsigned int i = 0; i < nbTriangles; i++) {
bnd.insert(triangles(i, 0));
bnd.insert(triangles(i, 1));
......@@ -73,8 +80,9 @@ GRegion * createDiscreteRegionFromRawData ( GModel *gm, fullMatrix<double> & pt
return gr;
}
GRegion * createTetrahedralMesh ( GModel *gm, fullMatrix<double> & pts, fullMatrix<int> &triangles ) {
GRegion *createTetrahedralMesh(GModel *gm, fullMatrix<double> &pts,
fullMatrix<int> &triangles)
{
GRegion *gr = createDiscreteRegionFromRawData(gm, pts, triangles);
try{
meshGRegionBoundaryRecovery(gr);
......@@ -87,7 +95,5 @@ GRegion * createTetrahedralMesh ( GModel *gm, fullMatrix<double> & pts, fullMatr
Msg::Error("Could not recover boundary: error %d", err);
}
}
return gr;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment