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

more work for Visual C++

parent 47a86744
No related branches found
No related tags found
No related merge requests found
// $Id: gmshSurface.cpp,v 1.8 2007-03-14 10:21:12 remacle Exp $
// $Id: gmshSurface.cpp,v 1.9 2008-01-18 20:41:33 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -117,6 +117,7 @@ SPoint3 gmshParametricSurface ::point(double par1, double par2) const
{
#if !defined(HAVE_MATH_EVAL)
Msg(GERROR, "MathEval is not compiled in this version of Gmsh");
return SPoint3(0.,0.,0.);
#else
char *names[2] = {"u","v"};
double values [2] = {par1,par2};
......
// $Id: Field.cpp,v 1.9 2008-01-14 21:29:14 remacle Exp $
// $Id: Field.cpp,v 1.10 2008-01-18 20:41:33 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -195,6 +195,7 @@ double ParametricField::operator()(double x, double y, double z)
{
#if !defined(HAVE_MATH_EVAL)
Msg(GERROR, "MathEval is not compiled in this version of Gmsh");
return 0.;
#else
static char *names[3] = {"x", "y", "z"};
double values [3] = {x, y, z};
......@@ -233,6 +234,7 @@ double FunctionField::operator()(double x, double y, double z)
{
#if !defined(HAVE_MATH_EVAL)
Msg(GERROR, "MathEval is not compiled in this version of Gmsh");
return 0.;
#else
values[0] = x;
values[1] = y;
......@@ -388,6 +390,7 @@ double AttractorField::operator()(double X, double Y, double Z)
return sqrt(dist[0]);
#else
Msg(GERROR,"GMSH should be compiled with ANN in order to enable attractors");
return 0.;
#endif
}
}
......@@ -506,6 +509,7 @@ double AttractorField_1DMesh::operator()(double X, double Y, double Z)
return lc;
#else
Msg(GERROR,"GMSH should be compiled with ANN in order to enable attractors");
return 1.e22;
#endif
}
......
// $Id: gsl_min.cpp,v 1.1 2008-01-14 21:29:53 remacle Exp $
// $Id: gsl_min.cpp,v 1.2 2008-01-18 20:41:33 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -291,6 +291,33 @@ void minimize_N (int N,
}
#else
#include "Message.h"
void minimize_2 ( double (*f) (double, double, void *data),
void (*df) (double, double, double &, double &, double &, void *data) ,
void *data,int niter,
double &U, double &V, double &res)
{
Msg(GERROR, "Gmsh must be compiled with GSL support for minimize_2");
}
void minimize_3 ( double (*f) (double, double, double, void *data),
void (*df) (double, double, double , double &, double &, double &, double &, void *data) ,
void *data,int niter,
double &U, double &V, double &W, double &res)
{
Msg(GERROR, "Gmsh must be compiled with GSL support for minimize_3");
}
void minimize_N (int N,
double (*f) (double*, void *data),
void (*df) (double*, double*, double &, void *data) ,
void *data,int niter,
double *, double &res)
{
Msg(GERROR, "Gmsh must be compiled with GSL support for minimize_N");
}
#endif
dnl $Id: configure.in,v 1.141 2008-01-18 20:02:27 geuzaine Exp $
dnl $Id: configure.in,v 1.142 2008-01-18 20:41:33 geuzaine Exp $
dnl
dnl Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
dnl
......@@ -869,6 +869,7 @@ AC_SUBST(OBJEXT)
AC_SUBST(LIBEXT)
AC_SUBST(ISYM)
AC_SUBST(CSYM)
AC_SUBST(DSYM)
AC_SUBST(SYSINCLUDE)
AC_OUTPUT(variables)
......
# $Id: Makefile,v 1.5 2008-01-18 20:02:30 geuzaine Exp $
# $Id: Makefile,v 1.6 2008-01-18 20:41:33 geuzaine Exp $
#
# Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
#
......@@ -21,11 +21,10 @@
include ../../variables
LIB = ../../lib/libGmshNR.a
INCLUDE = -I../../Common -I../../DataStr -I../../Numeric
LIB = ../../lib/libGmshNR${LIBEXT}
INCLUDE = ${ISYM}../../Common ${ISYM}../../DataStr ${ISYM}../../Numeric
# don't optimize this library: there are some problems with gcc...
OPTIM = -O0
CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE}
CFLAGS = ${FLAGS} ${INCLUDE} ${SYSINCLUDE}
SRC = brent.cpp\
dpythag.cpp\
......@@ -39,19 +38,19 @@ SRC = brent.cpp\
newt.cpp\
nrutil.cpp
OBJ = ${SRC:.cpp=.o}
OBJ = ${SRC:.cpp=${OBJEXT}}
.SUFFIXES: .o .cpp
.SUFFIXES: ${OBJEXT} .cpp
${LIB}: ${OBJ}
${AR} ${LIB} ${OBJ}
${AR} ${ARFLAGS}${LIB} ${OBJ}
${RANLIB} ${LIB}
.cpp.o:
${CXX} ${CFLAGS} -c $<
.cpp${OBJEXT}:
${CXX} ${CFLAGS} ${CSYM} $<
clean:
rm -f *.o
rm -f *${OBJEXT}
depend:
(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
......
# $Id: Makefile,v 1.6 2008-01-18 20:13:13 geuzaine Exp $
# $Id: Makefile,v 1.7 2008-01-18 20:41:33 geuzaine Exp $
#
# Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
#
......@@ -21,24 +21,24 @@
include ../../variables
LIB = ../../lib/libGmshTetgen.a
LIB = ../../lib/libGmshTetgen${LIBEXT}
# Do not optimize (same as Triangle...)
CFLAGS = ${FLAGS} -DTETLIBRARY
CFLAGS = ${FLAGS} ${DSYM}TETLIBRARY
SRC = predicates.cxx tetgen.cxx
OBJ = ${SRC:.cxx=.o}
OBJ = ${SRC:.cxx=${OBJEXT}}
.SUFFIXES: .o .cxx
.SUFFIXES: ${OBJEXT} .cxx
${LIB}: ${OBJ}
${AR} ${LIB} ${OBJ}
${AR} ${ARFLAGS}${LIB} ${OBJ}
${RANLIB} ${LIB}
.cxx.o:
${CXX} ${CFLAGS} -c $<
.cxx${OBJEXT}:
${CXX} ${CFLAGS} ${CSYM} $<
clean:
rm -f *.o
rm -f *${OBJEXT}
depend:
(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
......
# $Id: variables.in,v 1.21 2008-01-18 20:13:12 geuzaine Exp $
# $Id: variables.in,v 1.22 2008-01-18 20:41:33 geuzaine Exp $
#
# Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
#
......@@ -57,6 +57,7 @@ RANLIB=@RANLIB@
# The symbols used for includes and compiling
ISYM=@ISYM@
CSYM=@CSYM@
DSYM=@DSYM@
# The extension to use for object files, libraries and executables
OBJEXT=@OBJEXT@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment