diff --git a/Fltk/classificationEditor.cpp b/Fltk/classificationEditor.cpp index 95c98169325c98deff8278833971a00a630ecf13..1d37eaeb43665f2b1c4b6877d80e9e6a8edf99aa 100644 --- a/Fltk/classificationEditor.cpp +++ b/Fltk/classificationEditor.cpp @@ -401,7 +401,7 @@ static void class_color_cb(Fl_Widget* w, void* data) segments.erase(it); it++; - //printf("***candidate mline %d %d of size \n", vB->getNum(), vE->getNum(), segments.size()); + printf("***candidate mline %d %d of size \n", vB->getNum(), vE->getNum(), segments.size()); for (int i=0; i<2; i++) { @@ -409,17 +409,17 @@ static void class_color_cb(Fl_Widget* w, void* data) for (std::list<MLine*>::iterator it = segments.begin() ; it != segments.end(); ++it){ MVertex *v1 = (*it)->getVertex(0); MVertex *v2 = (*it)->getVertex(1); - //printf("mline %d %d \n", v1->getNum(), v2->getNum()); + printf("mline %d %d \n", v1->getNum(), v2->getNum()); if ( v1 == vE ){ - //printf("->push back this mline \n"); + printf("->push back this mline \n"); myLines.push_back(*it); segments.erase(it); vE = v2; i = -1; } else if ( v2 == vE){ - //printf("->push back this mline \n"); + printf("->push back this mline \n"); myLines.push_back(*it); segments.erase(it); vE = v1; @@ -431,29 +431,31 @@ static void class_color_cb(Fl_Widget* w, void* data) if (segments.empty()) break; - //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); + printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); MVertex *temp = vB; vB = vE; vE = temp; - //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); + printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); } -// printf("************ CANDIDATE NEW EDGE \n"); -// for (std::vector<MLine*>::iterator it = myLines.begin() ; it != myLines.end() ; ++it){ -// MVertex *v1 = (*it)->getVertex(0); -// MVertex *v2 = (*it)->getVertex(1); -// printf("Line %d %d \n", v1->getNum(), v2->getNum()); -// } + printf("************ CANDIDATE NEW EDGE \n"); + for (std::vector<MLine*>::iterator it = myLines.begin() ; it != myLines.end() ; ++it){ + MVertex *v1 = (*it)->getVertex(0); + MVertex *v2 = (*it)->getVertex(1); + printf("Line %d %d \n", v1->getNum(), v2->getNum()); + } GEdge *newGe = new discreteEdge(GModel::current(), maxEdgeNum() + 1, 0, 0); newGe->lines.insert(newGe->lines.end(), myLines.begin(), myLines.end()); GModel::current()->add(newGe); - //printf("create new edge with tag =%d\n", maxEdgeNum()); + printf("create new edge with tag =%d\n", maxEdgeNum()); }//end for each actual GEdge - + } + printf("end new edge with tag \n"); + for (std::map<std::pair<int, int>, GEdge*>::iterator it = newEdges.begin() ; it != newEdges.end() ; ++it){ GEdge *ge = it->second; GModel::current()->remove(ge); @@ -467,6 +469,8 @@ static void class_color_cb(Fl_Widget* w, void* data) } } + printf("before drawing \n"); + CTX::instance()->mesh.changed = ENT_ALL; Draw(); Msg::StatusBar(3, false, ""); diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index 86c11ebc908f69f91507d751f1605115a2e526fc..b119c0814de48487171ae27a43cbdb6de0da19cf 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -158,7 +158,8 @@ public: value[i] = p[2]; } double val = _current->interpolate(value, uvw[0], uvw[1], uvw[2]); - return 1.0;//exp(15*val); + //return exp(5*val); + return 1.0; } }; @@ -176,7 +177,7 @@ void GFaceCompound::parametrize() const if (!oct){ coordinates.clear(); - parametrize(ITERD); + //parametrize(ITERD); parametrize(ITERU); parametrize(ITERV); computeNormals(); @@ -574,7 +575,7 @@ void GFaceCompound::parametrize(iterationStep step) const } } else{ - gmshLaplaceTerm laplace(model(), &diffusivity, 1); + gmshLaplaceTerm laplace(model(), &ONE, 1); it = _compound.begin(); for ( ; it != _compound.end() ; ++it){ for (unsigned int i = 0; i < (*it)->triangles.size(); ++i){ diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index ea8b1121d93d90de6cda018cc923652e37d20c6d..c67b767051fc3e86055c43691e2dca286f31afad 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -740,7 +740,7 @@ int GModel::readOCCBREP(const std::string &fn) return 0; } -int GModel::importOCCShape(const void *shape, const void *options) +int GModel::importOCCShape(const void *shape) //, const void *options) { Msg::Error("Gmsh must be compiled with OpenCascade support to import " "a TopoDS_Shape"); diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp index efc401792ca2c428dc5933844e78e30baf0d5dca..51d3e37e14ca1bb8327a5160fc480122647e9708 100644 --- a/Mesh/BDS.cpp +++ b/Mesh/BDS.cpp @@ -1198,7 +1198,7 @@ bool BDS_Mesh::smooth_point_centroid(BDS_Point *p, GFace *gf, bool test_quality) GPoint gp = gf->point(U * scalingU, V * scalingV); if (!gp.succeeded()){ - printf ("iha\n"); + // printf ("iha\n"); return false; } const double oldX = p->X; diff --git a/Numeric/gmshLaplace.cpp b/Numeric/gmshLaplace.cpp index 70caf33e5560628ffc01537ffd0017c877c1a9af..8125b834e652be5c2aa7f6b58ea50a90b31785c2 100644 --- a/Numeric/gmshLaplace.cpp +++ b/Numeric/gmshLaplace.cpp @@ -37,9 +37,10 @@ void gmshLaplaceTerm::elementMatrix(MElement *e, gmshMatrix<double> &m) const Grads[j][2] = invjac[2][0] * grads[j][0] + invjac[2][1] * grads[j][1] + invjac[2][2] * grads[j][2]; } + double H=6.0; for (int j = 0; j < nbNodes; j++){ for (int k = 0; k <= j; k++){ - m(j, k) += (Grads[j][0] * Grads[k][0] + + m(j, k) += (H*Grads[j][0] * Grads[k][0] + Grads[j][1] * Grads[k][1] + Grads[j][2] * Grads[k][2]) * weight * detJ * _diff; }