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

fix compile without rtree

parent 7f063fce
No related branches found
No related tags found
No related merge requests found
// Gmsh - Copyright (C) 1997-2013 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@geuz.org>.
#include <algorithm>
#include <vector>
#include <set>
......@@ -10,6 +15,7 @@
#include "MQuadrangle.h"
#include "MPrism.h"
#include "MHexahedron.h"
#if defined(HAVE_RTREE)
#include "rtree.h"
void MElementBB(void *a, double *min, double *max);
......@@ -37,12 +43,13 @@ static bool inBB (double *mi, double *ma, double *x){
return true;
}
bool rtree_callback(MElement *e1,void* pe2){
bool rtree_callback(MElement *e1,void* pe2)
{
MElement_Wrapper *wrapper = static_cast<MElement_Wrapper*>(pe2);
MElement *e2 = wrapper->_e;
if (std::binary_search(wrapper->_notOverlap.begin(),wrapper->_notOverlap.end(),e1))return true;
if (std::binary_search(wrapper->_notOverlap.begin(),wrapper->_notOverlap.end(),e1))
return true;
for (int i=0;i<e1->getNumVertices();i++){
for (int j=0;j<e2->getNumVertices();j++){
......@@ -213,11 +220,30 @@ void filterOverlappingElements (std::vector<MElement*> &els,
}
els = newEls;
}
#else
void filterOverlappingElements (std::vector<MTriangle*> &blTris,
std::vector<MQuadrangle*>&blQuads,
std::map<MElement*,std::vector<MElement*> > &_elemColumns,
std::map<MElement*,MElement*> &_toFirst)
{
Msg::Error("Gmsh needs to be compiled with RTREE support for bonudary layers");
}
void filterOverlappingElements (std::vector<MPrism*> &blPrisms,
std::vector<MHexahedron*>&blHexes,
std::map<MElement*,std::vector<MElement*> > &_elemColumns,
std::map<MElement*,MElement*> &_toFirst)
{
Msg::Error("Gmsh needs to be compiled with RTREE support for bonudary layers");
}
void filterOverlappingElements (std::vector<MElement*> &els,
std::map<MElement*,std::vector<MElement*> > &_elemColumns,
std::map<MElement*,MElement*> &_toFirst )
{
Msg::Error("full boundary layer capabilities are only available whilst compiling GMSH together with a RTREE library");
Msg::Error("Gmsh needs to be compiled with RTREE support for bonudary layers");
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment