Skip to content
Snippets Groups Projects
Commit a91e10f2 authored by Gaetan Bricteux's avatar Gaetan Bricteux
Browse files

fix commit

parent 34589b29
No related branches found
No related tags found
No related merge requests found
......@@ -3,15 +3,19 @@
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include "voro++.hh"
#include "Voronoi3D.h"
#include "GModel.h"
#include "MElement.h"
#include "meshGRegion.h"
#include <fstream>
#include "Levy3D.h"
#if defined(HAVE_Voro3D)
#include "voro++.hh"
#endif
#if defined(HAVE_Voro3D)
using namespace voro;
#endif
/*********class clip*********/
......@@ -72,6 +76,7 @@ void clip::execute(GRegion* gr){
}
void clip::execute(std::vector<SPoint3>& vertices,std::vector<VoronoiElement>& clipped){
#if defined(HAVE_Voro3D)
int i;
int j;
int start;
......@@ -265,6 +270,9 @@ void clip::execute(std::vector<SPoint3>& vertices,std::vector<VoronoiElement>& c
//printf("%f %f\n",volume1,volume2);
for(i=0;i<pointers.size();i++) delete pointers[i];
#else
Msg::Error("Gmsh needs to be compiled with Voro3D to use clip");
#endif
}
double clip::min(double a,double b){
......@@ -296,4 +304,4 @@ void clip::print_segment(SPoint3 p1,SPoint3 p2,std::ofstream& file){
<< p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
<< p2.x() << ", " << p2.y() << ", " << p2.z()
<< "){10, 20};\n";
}
\ No newline at end of file
}
......@@ -171,7 +171,7 @@ void meshMetric::exportInfo(const char * fileendname){
meshMetric::~meshMetric(){
if (_octree) delete _octree;
for (int i=0; i< _elements.size(); i++)
for (unsigned int i = 0; i < _elements.size(); i++)
delete _elements[i];
}
......
......@@ -3,15 +3,19 @@
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include "voro++.hh"
#include "periodical.h"
#include "GModel.h"
#include "meshGRegion.h"
#include <fstream>
#include <algorithm>
#include "MElement.h"
#if defined(HAVE_Voro3D)
#include "voro++.hh"
#endif
#if defined(HAVE_Voro3D)
using namespace voro;
#endif
/*********class voroMetal3D*********/
......@@ -58,6 +62,7 @@ void voroMetal3D::execute(GRegion* gr){
}
void voroMetal3D::execute(std::vector<SPoint3>& vertices){
#if defined(HAVE_Voro3D)
int i;
int j;
int start;
......@@ -144,6 +149,9 @@ void voroMetal3D::execute(std::vector<SPoint3>& vertices){
file << "};\n";
for(i=0;i<pointers.size();i++) delete pointers[i];
#else
Msg::Error("Gmsh needs to be compiled with Voro3D to use voroMetal3D");
#endif
}
void voroMetal3D::print_segment(SPoint3 p1,SPoint3 p2,std::ofstream& file){
......@@ -151,4 +159,4 @@ void voroMetal3D::print_segment(SPoint3 p1,SPoint3 p2,std::ofstream& file){
<< p1.x() << ", " << p1.y() << ", " << p1.z() << ", "
<< p2.x() << ", " << p2.y() << ", " << p2.z()
<< "){10, 20};\n";
}
\ No newline at end of file
}
......@@ -9,7 +9,9 @@
#include "MElementOctree.h"
#include "meshGRegion.h"
#include <queue>
#if defined(HAVE_RTREE)
#include "rtree.h"
#endif
#include <fstream>
#define k1 0.7 //k1*h is the minimal distance between two nodes
......@@ -325,6 +327,7 @@ void Filler::treat_model(){
}
void Filler::treat_region(GRegion* gr){
#if defined(HAVE_RTREE)
int i,j;
int count;
bool ok;
......@@ -433,6 +436,9 @@ void Filler::treat_region(GRegion* gr){
for(i=0;i<garbage.size();i++) delete garbage[i];
for(i=0;i<new_vertices.size();i++) delete new_vertices[i];
new_vertices.clear();
#else
Msg::Error("Gmsh needs to be compiled with rtree to use Filler::treat_region");
#endif
}
Metric Filler::get_metric(double x,double y,double z){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment