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

don't use internal GEO data in the field

parent 773b9d8b
Branches
Tags
No related merge requests found
...@@ -19,15 +19,16 @@ ...@@ -19,15 +19,16 @@
#include "GmshConfig.h" #include "GmshConfig.h"
#include "Context.h" #include "Context.h"
#include "Field.h" #include "Field.h"
#include "Geo.h"
#include "GeoInterpolation.h"
#include "GModel.h" #include "GModel.h"
#include "GModelIO_GEO.h"
#include "GmshMessage.h" #include "GmshMessage.h"
#include "Numeric.h" #include "Numeric.h"
#include "mathEvaluator.h" #include "mathEvaluator.h"
#include "BackgroundMeshTools.h" #include "BackgroundMeshTools.h"
#include "STensor3.h" #include "STensor3.h"
#include "meshMetric.h" #include "meshMetric.h"
#include "ExtrudeParams.h"
#if defined(HAVE_POST) #if defined(HAVE_POST)
#include "PView.h" #include "PView.h"
#include "OctreePost.h" #include "OctreePost.h"
...@@ -1858,6 +1859,8 @@ class AttractorAnisoCurveField : public Field { ...@@ -1858,6 +1859,8 @@ class AttractorAnisoCurveField : public Field {
(lMinNormal, "Minimum mesh size in the direction normal to the closest curve."); (lMinNormal, "Minimum mesh size in the direction normal to the closest curve.");
options["lMaxNormal"] = new FieldOptionDouble options["lMaxNormal"] = new FieldOptionDouble
(lMaxNormal, "Maximum mesh size in the direction normal to the closest curve."); (lMaxNormal, "Maximum mesh size in the direction normal to the closest curve.");
// make sure all internal GEO CAD data has been synced with GModel
GModel::current()->getGEOInternals()->synchronize(GModel::current());
} }
virtual bool isotropic () const {return false;} virtual bool isotropic () const {return false;}
~AttractorAnisoCurveField() ~AttractorAnisoCurveField()
...@@ -1893,21 +1896,6 @@ class AttractorAnisoCurveField : public Field { ...@@ -1893,21 +1896,6 @@ class AttractorAnisoCurveField : public Field {
int k = 0; int k = 0;
for(std::list<int>::iterator it = edges_id.begin(); for(std::list<int>::iterator it = edges_id.begin();
it != edges_id.end(); ++it) { it != edges_id.end(); ++it) {
Curve *c = FindCurve(*it);
if(c) {
for(int i = 1; i < n_nodes_by_edge - 1; i++) {
double u = (double)i / (n_nodes_by_edge - 1);
Vertex V = InterpolateCurve(c, u, 0);
zeronodes[k][0] = V.Pos.X;
zeronodes[k][1] = V.Pos.Y;
zeronodes[k][2] = V.Pos.Z;
Vertex V2 = InterpolateCurve(c, u, 1);
tg[k] = SVector3(V2.Pos.X, V2.Pos.Y, V2.Pos.Z);
tg[k].normalize();
k++;
}
}
else {
GEdge *e = GModel::current()->getEdgeByTag(*it); GEdge *e = GModel::current()->getEdgeByTag(*it);
if(e) { if(e) {
for(int i = 1; i < n_nodes_by_edge - 1; i++) { for(int i = 1; i < n_nodes_by_edge - 1; i++) {
...@@ -1925,7 +1913,6 @@ class AttractorAnisoCurveField : public Field { ...@@ -1925,7 +1913,6 @@ class AttractorAnisoCurveField : public Field {
} }
} }
} }
}
kdtree = new ANNkd_tree(zeronodes, totpoints, 3); kdtree = new ANNkd_tree(zeronodes, totpoints, 3);
update_needed = false; update_needed = false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment