From 98d0841a84d47a23bfc5ac64a2c282e4febf0a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Remacle=20=28students=29?= <jean-francois.remacle@uclouvain.be> Date: Fri, 26 Jun 2009 10:36:01 +0000 Subject: [PATCH] *** empty log message *** --- Fltk/classificationEditor.cpp | 32 ++++++++++++++++++-------------- Geo/GFaceCompound.cpp | 7 ++++--- Geo/GModelIO_OCC.cpp | 2 +- Mesh/BDS.cpp | 2 +- Numeric/gmshLaplace.cpp | 3 ++- 5 files changed, 26 insertions(+), 20 deletions(-) diff --git a/Fltk/classificationEditor.cpp b/Fltk/classificationEditor.cpp index 95c9816932..1d37eaeb43 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 86c11ebc90..b119c0814d 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 ea8b1121d9..c67b767051 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 efc401792c..51d3e37e14 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 70caf33e55..8125b834e6 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; } -- GitLab