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

Added tolerance for computation of plane surface equation

parent f3faad6a
No related branches found
No related tags found
No related merge requests found
// $Id: Geom.cpp,v 1.13 2001-01-24 11:24:05 geuzaine Exp $ // $Id: Geom.cpp,v 1.14 2001-01-24 16:15:30 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -241,6 +241,9 @@ void Plan_SurfPlane (void *data,void *dum){ ...@@ -241,6 +241,9 @@ void Plan_SurfPlane (void *data,void *dum){
ix=iy=iz=0; ix=iy=iz=0;
// TOLERANCE ! WARNING WARNING
double eps = 1.e-6 * CTX.lc;
for(i=0;i<N;i++){ for(i=0;i<N;i++){
List_Read(points,i,&v); List_Read(points,i,&v);
if(!i){ if(!i){
...@@ -249,9 +252,9 @@ void Plan_SurfPlane (void *data,void *dum){ ...@@ -249,9 +252,9 @@ void Plan_SurfPlane (void *data,void *dum){
Z = v->Pos.Z; Z = v->Pos.Z;
} }
else{ else{
if(X != v->Pos.X ) ix = 1; if(fabs(X-v->Pos.X) > eps) ix = 1;
if(Y != v->Pos.Y ) iy = 1; if(fabs(Y-v->Pos.Y) > eps) iy = 1;
if(Z != v->Pos.Z ) iz = 1; if(fabs(Z-v->Pos.Z) > eps) iz = 1;
} }
sys[0][0] += v->Pos.X * v->Pos.X; sys[0][0] += v->Pos.X * v->Pos.X;
......
// $Id: 2D_Mesh.cpp,v 1.17 2001-01-12 13:29:00 geuzaine Exp $ // $Id: 2D_Mesh.cpp,v 1.18 2001-01-24 16:15:31 geuzaine Exp $
/* /*
Maillage Delaunay d'une surface (Point insertion Technique) Maillage Delaunay d'une surface (Point insertion Technique)
...@@ -107,6 +107,9 @@ void Plan_Moyen (void *data, void *dum){ ...@@ -107,6 +107,9 @@ void Plan_Moyen (void *data, void *dum){
ix = iy = iz = 0; ix = iy = iz = 0;
// TOLERANCE ! WARNING WARNING
double eps = 1.e-6 * CTX.lc;
for (i = 0; i < N; i++){ for (i = 0; i < N; i++){
List_Read (points, i, &v); List_Read (points, i, &v);
...@@ -116,12 +119,9 @@ void Plan_Moyen (void *data, void *dum){ ...@@ -116,12 +119,9 @@ void Plan_Moyen (void *data, void *dum){
Z = v->Pos.Z; Z = v->Pos.Z;
} }
else{ else{
if (X != v->Pos.X) if(fabs(X-v->Pos.X) > eps) ix = 1;
ix = 1; if(fabs(Y-v->Pos.Y) > eps) iy = 1;
if (Y != v->Pos.Y) if(fabs(Z-v->Pos.Z) > eps) iz = 1;
iy = 1;
if (Z != v->Pos.Z)
iz = 1;
} }
sys[0][0] += v->Pos.X * v->Pos.X; sys[0][0] += v->Pos.X * v->Pos.X;
......
// $Id: Vertex.cpp,v 1.5 2001-01-08 08:05:46 geuzaine Exp $ // $Id: Vertex.cpp,v 1.6 2001-01-24 16:15:31 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "Vertex.h" #include "Vertex.h"
...@@ -95,6 +95,7 @@ int compareVertex (const void *a, const void *b){ ...@@ -95,6 +95,7 @@ int compareVertex (const void *a, const void *b){
int comparePosition (const void *a, const void *b){ int comparePosition (const void *a, const void *b){
int i, j; int i, j;
Vertex **q, **w; Vertex **q, **w;
// TOLERANCE ! WARNING WARNING
double eps = 1.e-6 * CTX.lc; double eps = 1.e-6 * CTX.lc;
q = (Vertex **) a; q = (Vertex **) a;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment