From 737767f222baabf09eb4e6416932eab74c305dbc Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sat, 18 May 2002 21:35:10 +0000 Subject: [PATCH] Reorganize the Numeric lib --- Geo/CAD.cpp | 20 ++++++++++---------- Mesh/Makefile | 4 ++-- Mesh/Utils.cpp | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Geo/CAD.cpp b/Geo/CAD.cpp index fc9c03d89d..12f2d3c837 100644 --- a/Geo/CAD.cpp +++ b/Geo/CAD.cpp @@ -1,4 +1,4 @@ -// $Id: CAD.cpp,v 1.50 2002-05-18 16:31:16 geuzaine Exp $ +// $Id: CAD.cpp,v 1.51 2002-05-18 21:35:10 geuzaine Exp $ // // Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle // @@ -1587,8 +1587,8 @@ void ReplaceAllDuplicates(Mesh *m){ static Curve *CURVE, *CURVE_2; static Surface *SURFACE; static Vertex *VERTEX; -extern void newt(float x[], int n, int *check, - void (*vecfunc)(int, float [], float [])); +extern void newt(double x[], int n, int *check, + void (*vecfunc)(int, double [], double [])); double min1d (double (*funct)(double), double *xmin){ double xx, fx, fb, fa, bx, ax; @@ -1603,7 +1603,7 @@ double min1d (double (*funct)(double), double *xmin){ return( brent(ax,xx,bx,funct,TOL,xmin) ); } -static void intersectCS (int N, float x[], float res[]){ +static void intersectCS (int N, double x[], double res[]){ //x[1] = u x[2] = v x[3] = w Vertex s,c; s = InterpolateSurface(SURFACE,x[1],x[2],0,0); @@ -1613,7 +1613,7 @@ static void intersectCS (int N, float x[], float res[]){ res[3] = s.Pos.Z - c.Pos.Z; } -static void intersectCC (int N, float x[], float res[]){ +static void intersectCC (int N, double x[], double res[]){ //x[1] = u x[2] = v Vertex c2,c; c2 = InterpolateCurve(CURVE_2,x[2],0); @@ -1622,7 +1622,7 @@ static void intersectCC (int N, float x[], float res[]){ res[2] = c2.Pos.Y - c.Pos.Y; } -static void projectPS (int N, float x[], float res[]){ +static void projectPS (int N, double x[], double res[]){ //x[1] = u x[2] = v Vertex du,dv,c; c = InterpolateSurface(SURFACE,x[1],x[2],0,0); @@ -1763,7 +1763,7 @@ bool try_a_value(Surface *s, Vertex *p, double u, double v,double *uu, double *v } bool ProjectPointOnSurface (Surface *s, Vertex &p){ - float x[3] = {0.5,0.5,0.5}; + double x[3] = {0.5,0.5,0.5}; Vertex vv; int check; SURFACE = s; @@ -1789,7 +1789,7 @@ bool ProjectPointOnSurface (Surface *s, Vertex &p){ } bool ProjectPointOnSurface (Surface *s, Vertex *p,double *u, double *v){ - static float x[3]; + static double x[3]; int check; static int deb = 1; double VMIN,VMAX,UMIN,UMAX,l, lmin; @@ -1869,7 +1869,7 @@ bool ProjectPointOnSurface (Surface *s, Vertex *p,double *u, double *v){ } bool IntersectCurveSurface (Curve *c, Surface *s){ - float x[4]; + double x[4]; int check; SURFACE = s; CURVE = c; @@ -1893,7 +1893,7 @@ void DivideCurve (Curve *c , double u, Vertex *v, Curve **c1, Curve **c2){ bool IntersectCurves (Curve *c1, Curve *c2, Curve **c11, Curve **c12, Curve **c21, Curve **c22, Vertex **v){ - float x[3]; + double x[3]; Vertex v1,v2; int check; diff --git a/Mesh/Makefile b/Mesh/Makefile index 74dd69f9e6..80ae13eb0a 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.43 2002-05-18 16:31:16 geuzaine Exp $ +# $Id: Makefile,v 1.44 2002-05-18 21:35:10 geuzaine Exp $ # # Makefile for "libGmshMesh.a" # @@ -259,7 +259,7 @@ Utils.o: Utils.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \ ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Simplex.h \ ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/Metric.h ../Mesh/Matrix.h \ - Mesh.h Interpolation.h ../Numeric/nrutil.h ../Common/Context.h + Mesh.h Interpolation.h ../Numeric/NRUtil.h ../Common/Context.h Metric.o: Metric.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \ diff --git a/Mesh/Utils.cpp b/Mesh/Utils.cpp index 99fbf3d8a2..f40410e1be 100644 --- a/Mesh/Utils.cpp +++ b/Mesh/Utils.cpp @@ -1,4 +1,4 @@ -// $Id: Utils.cpp,v 1.11 2002-05-18 08:01:39 geuzaine Exp $ +// $Id: Utils.cpp,v 1.12 2002-05-18 21:35:10 geuzaine Exp $ // // Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle // @@ -22,7 +22,7 @@ #include "CAD.h" #include "Mesh.h" #include "Interpolation.h" -#include "nrutil.h" +#include "NRUtil.h" #include "Context.h" extern Context_T CTX; -- GitLab