From 28b3f958c33728e9d58f0fae6d2d112dece6e17e Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 18 Mar 2003 00:15:43 +0000 Subject: [PATCH] Cleanup NR includes --- Geo/CAD.cpp | 9 +-------- Geo/Makefile | 5 ++--- Mesh/Utils.cpp | 4 ++-- NR/NR.h | 17 ----------------- NR/nrutil.h | 1 + Numeric/Numeric.h | 11 +++++++++++ Numeric/gsl_brent.h | 28 ---------------------------- Numeric/gsl_newt.h | 25 ------------------------- 8 files changed, 17 insertions(+), 83 deletions(-) delete mode 100644 NR/NR.h delete mode 100644 Numeric/gsl_brent.h delete mode 100644 Numeric/gsl_newt.h diff --git a/Geo/CAD.cpp b/Geo/CAD.cpp index 550830e098..3a4e83ccfb 100644 --- a/Geo/CAD.cpp +++ b/Geo/CAD.cpp @@ -1,4 +1,4 @@ -// $Id: CAD.cpp,v 1.61 2003-03-11 05:57:06 geuzaine Exp $ +// $Id: CAD.cpp,v 1.62 2003-03-18 00:15:43 geuzaine Exp $ // // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle // @@ -30,13 +30,6 @@ #include "Edge.h" #include "Context.h" -#if defined(HAVE_GSL) -#include "gsl_newt.h" -#include "gsl_brent.h" -#else -#include "NR.h" -#endif - extern Mesh *THEM; extern Context_T CTX; diff --git a/Geo/Makefile b/Geo/Makefile index acd83feb4f..a79ae4a4ba 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.36 2003-03-02 18:44:16 geuzaine Exp $ +# $Id: Makefile,v 1.37 2003-03-18 00:15:43 geuzaine Exp $ include ../variables @@ -44,8 +44,7 @@ CAD.o: CAD.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../Numeric/Numeric.h Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \ ../Mesh/Simplex.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \ ../Mesh/Metric.h ../Mesh/Matrix.h DataBase.h ../Mesh/Interpolation.h \ - ../Mesh/Create.h CAD.h ExtrudeParams.h ../Common/Context.h \ - ../Numeric/gsl_newt.h ../Numeric/gsl_brent.h + ../Mesh/Create.h CAD.h ExtrudeParams.h ../Common/Context.h DataBase.o: DataBase.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.h \ diff --git a/Mesh/Utils.cpp b/Mesh/Utils.cpp index 94387d20f2..cec9f43756 100644 --- a/Mesh/Utils.cpp +++ b/Mesh/Utils.cpp @@ -1,4 +1,4 @@ -// $Id: Utils.cpp,v 1.17 2003-03-01 22:36:42 geuzaine Exp $ +// $Id: Utils.cpp,v 1.18 2003-03-18 00:15:43 geuzaine Exp $ // // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle // @@ -31,7 +31,7 @@ #include <gsl/gsl_vector.h> #include <gsl/gsl_linalg.h> #else -#include "NR.h" +#include "nrutil.h" #endif extern Context_T CTX; diff --git a/NR/NR.h b/NR/NR.h deleted file mode 100644 index ed754c101a..0000000000 --- a/NR/NR.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _NR_H_ -#define _NR_H_ - -#include "Gmsh.h" -#include "nrutil.h" - -/* "public" routines used in Gmsh */ - -void dsvdcmp(double **a, int m, int n, double w[], double **v); -double brent(double ax, double bx, double cx, - double (*f)(double), double tol, double *xmin); -void mnbrak(double *ax, double *bx, double *cx, double *fa, double *fb, - double *fc, double (*func)(double)); -void newt(double x[], int n, int *check, - void (*vecfunc)(int, double [], double [])); - -#endif diff --git a/NR/nrutil.h b/NR/nrutil.h index ddfa7d0b51..436193de5e 100644 --- a/NR/nrutil.h +++ b/NR/nrutil.h @@ -4,6 +4,7 @@ /* This file has been modified for inclusion in Gmsh */ /* Gmsh: */ +#include "Gmsh.h" #include "Numeric.h" /* Gmsh: diff --git a/Numeric/Numeric.h b/Numeric/Numeric.h index 25e2136229..44db5599b5 100644 --- a/Numeric/Numeric.h +++ b/Numeric/Numeric.h @@ -74,4 +74,15 @@ double InterpolateIso(double *X, double *Y, double *Z, void gradSimplex (double *x, double *y, double *z, double *v, double *grad); +/* Numerical routines implemented using either Numerical Recipes or + the GSL */ + +void dsvdcmp(double **a, int m, int n, double w[], double **v); +double brent(double ax, double bx, double cx, + double (*f)(double), double tol, double *xmin); +void mnbrak(double *ax, double *bx, double *cx, double *fa, double *fb, + double *fc, double (*func)(double)); +void newt(double x[], int n, int *check, + void (*vecfunc)(int, double [], double [])); + #endif diff --git a/Numeric/gsl_brent.h b/Numeric/gsl_brent.h deleted file mode 100644 index caa02ad7ef..0000000000 --- a/Numeric/gsl_brent.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _GSL_BRENT_H_ -#define _GSL_BRENT_H_ - -// Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "gmsh@geuz.org". - -double brent(double ax, double xx, double bx, - double (*f)(double), double tol, double *xmin); -void mnbrak(double *ax, double *bx, double *cx, double *fa, double *fb, double *fc, - double (*func)(double)); - -#endif diff --git a/Numeric/gsl_newt.h b/Numeric/gsl_newt.h deleted file mode 100644 index 5730ac634a..0000000000 --- a/Numeric/gsl_newt.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _GSL_NEWT_H_ -#define _GSL_NEWT_H_ - -// Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "gmsh@geuz.org". - -void newt(double x[], int n, int *check, void (*func)(int, double [], double [])); - -#endif -- GitLab