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

fix compile without solver module

parent 74e4b11b
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
// //
// Contributed by Cecile Piret // Contributed by Cecile Piret
#include "GmshConfig.h"
#include "GRbf.h" #include "GRbf.h"
#include <math.h> #include <math.h>
#include <vector> #include <vector>
...@@ -16,7 +17,10 @@ ...@@ -16,7 +17,10 @@
#include "OS.h" #include "OS.h"
#include "MVertex.h" #include "MVertex.h"
#include "MVertexPositionSet.h" #include "MVertexPositionSet.h"
#if defined(HAVE_SOLVER)
#include "linearSystem.h" #include "linearSystem.h"
#endif
#if defined(HAVE_ANN) #if defined(HAVE_ANN)
#include <ANN/ANN.h> #include <ANN/ANN.h>
...@@ -589,8 +593,10 @@ void GRbf::RbfLapSurface_local_CPM(bool isLow, ...@@ -589,8 +593,10 @@ void GRbf::RbfLapSurface_local_CPM(bool isLow,
void GRbf::RbfLapSurface_local_CPM_sparse(std::vector<MVertex*> &bndVertices, bool isLow, void GRbf::RbfLapSurface_local_CPM_sparse(std::vector<MVertex*> &bndVertices, bool isLow,
const fullMatrix<double> &cntrs, const fullMatrix<double> &cntrs,
const fullMatrix<double> &normals, linearSystem<double> &sys) const fullMatrix<double> &normals,
linearSystem<double> &sys)
{ {
#if defined(HAVE_SOLVER)
std::set<int> bndIndices; std::set<int> bndIndices;
for (size_t i = 0; i < bndVertices.size(); ++i) { for (size_t i = 0; i < bndVertices.size(); ++i) {
bndIndices.insert(_mapV[bndVertices[i]]); bndIndices.insert(_mapV[bndVertices[i]]);
...@@ -660,6 +666,7 @@ void GRbf::RbfLapSurface_local_CPM_sparse(std::vector<MVertex*> &bndVertices, bo ...@@ -660,6 +666,7 @@ void GRbf::RbfLapSurface_local_CPM_sparse(std::vector<MVertex*> &bndVertices, bo
sys.addToMatrix(i + 2 * numNodes, pts[j] + 2 * numNodes, LocalOper(2 * nbp,j + 2 * nbp)); sys.addToMatrix(i + 2 * numNodes, pts[j] + 2 * numNodes, LocalOper(2 * nbp,j + 2 * nbp));
} }
} }
#endif
} }
// NEW METHOD #1 CPM GLOBAL HIGH // NEW METHOD #1 CPM GLOBAL HIGH
...@@ -840,6 +847,7 @@ void GRbf::solveHarmonicMap_sparse(linearSystem<double> &sys, int numNodes, ...@@ -840,6 +847,7 @@ void GRbf::solveHarmonicMap_sparse(linearSystem<double> &sys, int numNodes,
const std::vector<double> &coords, const std::vector<double> &coords,
std::map<MVertex*, SPoint3> &rbf_param) std::map<MVertex*, SPoint3> &rbf_param)
{ {
#if defined(HAVE_SOLVER)
Msg::Info("*** RBF ... solving map"); Msg::Info("*** RBF ... solving map");
int nb = numNodes * 3; int nb = numNodes * 3;
UV.resize(nb,2); UV.resize(nb,2);
...@@ -930,6 +938,7 @@ void GRbf::solveHarmonicMap_sparse(linearSystem<double> &sys, int numNodes, ...@@ -930,6 +938,7 @@ void GRbf::solveHarmonicMap_sparse(linearSystem<double> &sys, int numNodes,
Msg::Info("*** RBF solved map"); Msg::Info("*** RBF solved map");
exportParametrizedMesh(UV, nbNodes); exportParametrizedMesh(UV, nbNodes);
#endif
} }
void GRbf::solveHarmonicMap(fullMatrix<double> Oper, void GRbf::solveHarmonicMap(fullMatrix<double> Oper,
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "MVertex.h" #include "MVertex.h"
#include "Context.h" #include "Context.h"
template <class t> template <class t> class linearSystem;
class linearSystem;
#if defined(HAVE_ANN) #if defined(HAVE_ANN)
class ANNkd_tree; class ANNkd_tree;
#endif #endif
...@@ -131,7 +131,8 @@ class GRbf { ...@@ -131,7 +131,8 @@ class GRbf {
void RbfLapSurface_local_CPM_sparse(std::vector<MVertex*> &bndVertices, bool isLow, void RbfLapSurface_local_CPM_sparse(std::vector<MVertex*> &bndVertices, bool isLow,
const fullMatrix<double> &cntrs, const fullMatrix<double> &cntrs,
const fullMatrix<double> &normals, linearSystem<double> &sys); const fullMatrix<double> &normals,
linearSystem<double> &sys);
// Finds global surface differentiation matrix (method CPML) // Finds global surface differentiation matrix (method CPML)
void RbfLapSurface_global_CPM_low(const fullMatrix<double> &cntrs, void RbfLapSurface_global_CPM_low(const fullMatrix<double> &cntrs,
...@@ -166,8 +167,10 @@ class GRbf { ...@@ -166,8 +167,10 @@ class GRbf {
void solveHarmonicMap(fullMatrix<double> Oper, std::vector<MVertex*> ordered, void solveHarmonicMap(fullMatrix<double> Oper, std::vector<MVertex*> ordered,
std::vector<double> coords, std::map<MVertex*, SPoint3> &rbf_param); std::vector<double> coords, std::map<MVertex*, SPoint3> &rbf_param);
void solveHarmonicMap_sparse(linearSystem<double> &sys, int numNodes,const std::vector<MVertex*> &ordered, void solveHarmonicMap_sparse(linearSystem<double> &sys, int numNodes,
const std::vector<double> &coords, std::map<MVertex*, SPoint3> &rbf_param); const std::vector<MVertex*> &ordered,
const std::vector<double> &coords,
std::map<MVertex*, SPoint3> &rbf_param);
inline const fullMatrix<double> getUV() {return UV;}; inline const fullMatrix<double> getUV() {return UV;};
inline const fullMatrix<double> getXYZ() {return centers;}; inline const fullMatrix<double> getXYZ() {return centers;};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment