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 @@
#include "CellComplex.h"
#if defined(HAVE_KBIPACK)
CellComplex::CellComplex( std::vector<GEntity*> domain, std::vector<GEntity*> subdomain ){
......@@ -795,4 +796,4 @@ void CellComplex::printComplex(int dim){
}
}
#endif
......@@ -25,6 +25,7 @@
#include "GFace.h"
#include "GVertex.h"
#if defined(HAVE_KBIPACK)
// Abstract class representing an elemtary cell of a cell complex.
class Cell
......@@ -661,3 +662,5 @@ class CellComplex
};
#endif
#endif
......@@ -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){
int i = 0;
......@@ -524,3 +522,5 @@ void Chain::getData(std::map<int, std::vector<double> > & data){
return;
}
#endif
......@@ -9,7 +9,7 @@
#include "Homology.h"
#include "ChainComplex.h"
#if defined(HAVE_KBIPACK)
Homology::Homology(GModel* model, std::vector<int> physicalDomain, std::vector<int> physicalSubdomain){
_model = model;
......@@ -147,3 +147,4 @@ void Homology::findThickCuts(std::string fileName){
delete chains;
}
#endif
......@@ -9,9 +9,10 @@
#define _HOMOLOGY_H_
#include <sstream>
#include "CellComplex.h"
#if defined(HAVE_KBIPACK)
template <class TTypeA, class TTypeB>
bool convert(const TTypeA& input, TTypeB& output ){
std::stringstream stream;
......@@ -40,3 +41,5 @@ class Homology
};
#endif
#endif
......@@ -13,7 +13,7 @@
#include "PViewDataGModel.h"
#include "HomologyComputation.h"
#if defined(HAVE_KBIPACK)
StringXNumber HomologyComputationOptions_Number[] = {
{GMSH_FULLRC, "Physical group for domain", NULL, 0.},
{GMSH_FULLRC, "Physical group for subdomain", NULL, 0.},
......@@ -115,3 +115,5 @@ PView *GMSH_HomologyComputationPlugin::execute(PView *v)
return 0;
}
#endif
......@@ -11,6 +11,7 @@
#include <string>
#include "Plugin.h"
#if defined(HAVE_KBIPACK)
extern "C"
{
GMSH_Plugin *GMSH_RegisterHomologyComputationPlugin();
......@@ -31,3 +32,5 @@ public:
};
#endif
#endif
......@@ -229,8 +229,10 @@ void PluginManager::registerDefaultPlugins()
#endif
allPlugins.insert(std::pair<const char*, GMSH_Plugin*>
("FiniteElement", GMSH_RegisterFiniteElementPlugin()));
#if defined(HAVE_KBIPACK)
allPlugins.insert(std::pair<const char*, GMSH_Plugin*>
("HomologyComputation", GMSH_RegisterHomologyComputationPlugin()));
#endif
}
#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