Skip to content
Snippets Groups Projects
Commit 22efe568 authored by Matti Pellika's avatar Matti Pellika
Browse files

Added "#if defined(HAVE_KBIPACK)" preprocessor directives to only enable
homology plugin & compile the code when kbipack & gmp library is avaible.
parent 6f549b7a
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "CellComplex.h" #include "CellComplex.h"
#if defined(HAVE_KBIPACK)
CellComplex::CellComplex( std::vector<GEntity*> domain, std::vector<GEntity*> subdomain ){ CellComplex::CellComplex( std::vector<GEntity*> domain, std::vector<GEntity*> subdomain ){
...@@ -795,4 +796,4 @@ void CellComplex::printComplex(int dim){ ...@@ -795,4 +796,4 @@ void CellComplex::printComplex(int dim){
} }
} }
#endif
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "GFace.h" #include "GFace.h"
#include "GVertex.h" #include "GVertex.h"
#if defined(HAVE_KBIPACK)
// Abstract class representing an elemtary cell of a cell complex. // Abstract class representing an elemtary cell of a cell complex.
class Cell class Cell
...@@ -661,3 +662,5 @@ class CellComplex ...@@ -661,3 +662,5 @@ class CellComplex
}; };
#endif #endif
#endif
...@@ -437,8 +437,6 @@ std::vector<int> ChainComplex::getCoeffVector(int dim, int chainNumber){ ...@@ -437,8 +437,6 @@ std::vector<int> ChainComplex::getCoeffVector(int dim, int chainNumber){
} }
#endif
Chain::Chain(std::set<Cell*, Less_Cell> cells, std::vector<int> coeffs, CellComplex* cellComplex, std::string name){ Chain::Chain(std::set<Cell*, Less_Cell> cells, std::vector<int> coeffs, CellComplex* cellComplex, std::string name){
int i = 0; int i = 0;
...@@ -524,3 +522,5 @@ void Chain::getData(std::map<int, std::vector<double> > & data){ ...@@ -524,3 +522,5 @@ void Chain::getData(std::map<int, std::vector<double> > & data){
return; return;
} }
#endif
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "Homology.h" #include "Homology.h"
#include "ChainComplex.h" #include "ChainComplex.h"
#if defined(HAVE_KBIPACK)
Homology::Homology(GModel* model, std::vector<int> physicalDomain, std::vector<int> physicalSubdomain){ Homology::Homology(GModel* model, std::vector<int> physicalDomain, std::vector<int> physicalSubdomain){
_model = model; _model = model;
...@@ -147,3 +147,4 @@ void Homology::findThickCuts(std::string fileName){ ...@@ -147,3 +147,4 @@ void Homology::findThickCuts(std::string fileName){
delete chains; delete chains;
} }
#endif
...@@ -9,9 +9,10 @@ ...@@ -9,9 +9,10 @@
#define _HOMOLOGY_H_ #define _HOMOLOGY_H_
#include <sstream> #include <sstream>
#include "CellComplex.h" #include "CellComplex.h"
#if defined(HAVE_KBIPACK)
template <class TTypeA, class TTypeB> template <class TTypeA, class TTypeB>
bool convert(const TTypeA& input, TTypeB& output ){ bool convert(const TTypeA& input, TTypeB& output ){
std::stringstream stream; std::stringstream stream;
...@@ -40,3 +41,5 @@ class Homology ...@@ -40,3 +41,5 @@ class Homology
}; };
#endif #endif
#endif
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "PViewDataGModel.h" #include "PViewDataGModel.h"
#include "HomologyComputation.h" #include "HomologyComputation.h"
#if defined(HAVE_KBIPACK)
StringXNumber HomologyComputationOptions_Number[] = { StringXNumber HomologyComputationOptions_Number[] = {
{GMSH_FULLRC, "Physical group for domain", NULL, 0.}, {GMSH_FULLRC, "Physical group for domain", NULL, 0.},
{GMSH_FULLRC, "Physical group for subdomain", NULL, 0.}, {GMSH_FULLRC, "Physical group for subdomain", NULL, 0.},
...@@ -115,3 +115,5 @@ PView *GMSH_HomologyComputationPlugin::execute(PView *v) ...@@ -115,3 +115,5 @@ PView *GMSH_HomologyComputationPlugin::execute(PView *v)
return 0; return 0;
} }
#endif
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <string> #include <string>
#include "Plugin.h" #include "Plugin.h"
#if defined(HAVE_KBIPACK)
extern "C" extern "C"
{ {
GMSH_Plugin *GMSH_RegisterHomologyComputationPlugin(); GMSH_Plugin *GMSH_RegisterHomologyComputationPlugin();
...@@ -31,3 +32,5 @@ public: ...@@ -31,3 +32,5 @@ public:
}; };
#endif #endif
#endif
...@@ -229,8 +229,10 @@ void PluginManager::registerDefaultPlugins() ...@@ -229,8 +229,10 @@ void PluginManager::registerDefaultPlugins()
#endif #endif
allPlugins.insert(std::pair<const char*, GMSH_Plugin*> allPlugins.insert(std::pair<const char*, GMSH_Plugin*>
("FiniteElement", GMSH_RegisterFiniteElementPlugin())); ("FiniteElement", GMSH_RegisterFiniteElementPlugin()));
#if defined(HAVE_KBIPACK)
allPlugins.insert(std::pair<const char*, GMSH_Plugin*> allPlugins.insert(std::pair<const char*, GMSH_Plugin*>
("HomologyComputation", GMSH_RegisterHomologyComputationPlugin())); ("HomologyComputation", GMSH_RegisterHomologyComputationPlugin()));
#endif
} }
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment