From 34d2219f2192cd55e8721eb584954da07e2f9aba Mon Sep 17 00:00:00 2001 From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be> Date: Fri, 28 Oct 2005 08:31:00 +0000 Subject: [PATCH] *** empty log message *** --- Mesh/BDS.cpp | 8 +++----- Mesh/BDS.h | 2 +- Mesh/DiscreteSurface.cpp | 10 ++++++---- Plugin/Integrate.cpp | 7 ++++++- Plugin/ShapeFunctions.h | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp index f470af1392..dde6a0ef97 100644 --- a/Mesh/BDS.cpp +++ b/Mesh/BDS.cpp @@ -1,4 +1,4 @@ -// $Id: BDS.cpp,v 1.38 2005-10-27 15:06:26 remacle Exp $ +// $Id: BDS.cpp,v 1.39 2005-10-28 08:31:00 remacle Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -24,10 +24,8 @@ #include "Numeric.h" #include "GmshMatrix.h" #include "BDS.h" -#include "Context.h" #include "Message.h" -extern Context_T CTX; /* (X-Xc)^2 = R^2 @@ -2442,13 +2440,13 @@ void BDS_Mesh :: compute_metric_edge_lengths (const BDS_Metric & metric) } -int BDS_Mesh :: adapt_mesh ( double l, bool smooth, BDS_Mesh *geom_mesh) +int BDS_Mesh :: adapt_mesh ( double l, double C1, double C2 , bool smooth, BDS_Mesh *geom_mesh) { int nb_modif = 0; SNAP_SUCCESS = 0; SNAP_FAILURE = 0; - BDS_Metric metric ( l , LC/ CTX.mesh.min_elem_size_fact , LC, CTX.mesh.nb_elem_per_rc ); + BDS_Metric metric ( l , LC/ C1 , LC, C2 ); // �pr�intf("METRIC %g %g %g\n",LC,metric._min,metric._max); diff --git a/Mesh/BDS.h b/Mesh/BDS.h index c245a28030..aa36c3da55 100644 --- a/Mesh/BDS.h +++ b/Mesh/BDS.h @@ -643,7 +643,7 @@ class BDS_Mesh void color_plane_surf ( double eps , int nb); void reverseEngineerCAD ( ) ; void createSearchStructures ( ) ; - int adapt_mesh(double,bool smooth = false,BDS_Mesh *geom = 0); + int adapt_mesh(double,double, double,bool smooth = false,BDS_Mesh *geom = 0); void compute_metric_edge_lengths (const BDS_Metric & metric); void cleanup(); // io's diff --git a/Mesh/DiscreteSurface.cpp b/Mesh/DiscreteSurface.cpp index 6b888e87b7..92607d8d52 100644 --- a/Mesh/DiscreteSurface.cpp +++ b/Mesh/DiscreteSurface.cpp @@ -1,4 +1,4 @@ -// $Id: DiscreteSurface.cpp,v 1.29 2005-10-27 15:06:26 remacle Exp $ +// $Id: DiscreteSurface.cpp,v 1.30 2005-10-28 08:31:00 remacle Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -345,8 +345,8 @@ void BDS_To_Mesh(Mesh *m) int ReMesh(Mesh *M) { - if(M->status != 2) return 0; printf("status %d\n",M->status); + if(M->status != 2) return 0; if (!M->bds) { @@ -380,8 +380,10 @@ int MeshDiscreteSurface(Surface *s) if(!THEM->bds_mesh){ THEM->bds_mesh = new BDS_Mesh (*(THEM->bds)); int iter = 0; - while(iter < NITER && THEM->bds_mesh->adapt_mesh(CTX.mesh.lc_factor * THEM->bds->LC, - true, THEM->bds)){ + while(iter < NITER && THEM->bds_mesh->adapt_mesh(CTX.mesh.lc_factor * THEM->bds->LC, + CTX.mesh.min_elem_size_fact, + CTX.mesh.nb_elem_per_rc, + true, THEM->bds)){ Msg(STATUS2, "Iteration %2d/%d done (%d triangles)\n",iter, NITER,THEM->bds_mesh->triangles.size()); iter ++; } diff --git a/Plugin/Integrate.cpp b/Plugin/Integrate.cpp index 71d2f0f375..55aae0e814 100644 --- a/Plugin/Integrate.cpp +++ b/Plugin/Integrate.cpp @@ -1,4 +1,4 @@ -// $Id: Integrate.cpp,v 1.15 2005-10-27 15:06:42 remacle Exp $ +// $Id: Integrate.cpp,v 1.16 2005-10-28 08:31:00 remacle Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -89,6 +89,8 @@ static double integrate(int nbList, List_T *list, int dim, int nbNod, int nbComp, int step) { if(!nbList) return 0.; + + printf("dim = %d nbComp = %d nbNod = %d nbList = %d\n",dim,nbComp,nbNod,nbList); const int levelsetPositive = (int)IntegrateOptions_Number[0].def; @@ -110,6 +112,9 @@ static double integrate(int nbList, List_T *list, int dim, res += element->integrateLevelsetPositive(v); } else if(nbComp == 3){ + + printf("coucouc\n"); + if(dim == 1) res += element->integrateCirculation(v); else if(dim == 2) diff --git a/Plugin/ShapeFunctions.h b/Plugin/ShapeFunctions.h index 53ce15cca2..c400475ad4 100644 --- a/Plugin/ShapeFunctions.h +++ b/Plugin/ShapeFunctions.h @@ -163,7 +163,7 @@ public: getGaussPoint(i, u, v, w, weight); double det = getJacobian(u, v, w, jac); double d = interpolate(val, u, v, w, stride); - // if(d<0) printf("error %g %g %g %g %g %g %g %g %g\n",d,u,v,w,jac,val[0],val[1],val[2],val[3]); + //if(d<0) printf("error %g %g %g %g %g %g %g %g %g\n",d,u,v,w,jac,val[0],val[1],val[2],val[3]); sum += d * weight * det; } return sum; -- GitLab