Skip to content
Snippets Groups Projects
Commit 167c2a98 authored by Akash Anand's avatar Akash Anand
Browse files

Updating Gmsh to use new, "external" version of FourierModel.
parent 9aa8d2f3
No related branches found
No related tags found
No related merge requests found
...@@ -12,11 +12,11 @@ extern Context_T CTX; ...@@ -12,11 +12,11 @@ extern Context_T CTX;
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
#include "FPatch.h" #include "FM_FPatch.h"
#include "PlaneProjectionSurface.h" #include "FM_PlaneProjectionSurface.h"
#include "ParaboloidProjectionSurface.h" #include "FM_ParaboloidProjectionSurface.h"
#include "CylindricalProjectionSurface.h" #include "FM_CylindricalProjectionSurface.h"
#include "RevolvedParabolaProjectionSurface.h" #include "FM_RevolvedParabolaProjectionSurface.h"
static FProjectionFace *createProjectionFaceFromName(char *name) static FProjectionFace *createProjectionFaceFromName(char *name)
{ {
......
# $Id: Makefile,v 1.139 2007-08-07 03:14:24 geuzaine Exp $ # $Id: Makefile,v 1.140 2007-08-07 22:13:52 anand Exp $
# #
# Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
# #
...@@ -24,7 +24,7 @@ include ../variables ...@@ -24,7 +24,7 @@ include ../variables
LIB = ../lib/libGmshFltk.a LIB = ../lib/libGmshFltk.a
INCLUDE = -I../Common -I../DataStr -I../Graphics -I../Geo -I../Mesh -I../Post\ INCLUDE = -I../Common -I../DataStr -I../Graphics -I../Geo -I../Mesh -I../Post\
-I../Numeric -I../Parser -I../Fltk -I../Plugin -I../utils/solvers\ -I../Numeric -I../Parser -I../Fltk -I../Plugin -I../utils/solvers\
-I../contrib/ANN/include -I../contrib/FourierModel -I../contrib/ANN/include
CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE}
SRC = Main.cpp \ SRC = Main.cpp \
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
FEdge::FEdge(GModel *model, FM::FM_Edge* edge_, int tag, GVertex *v0, GVertex *v1) FEdge::FEdge(GModel *model, FM::TopoEdge* edge_, int tag, GVertex *v0, GVertex *v1)
: GEdge(model, tag, v0, v1), edge(edge_) : GEdge(model, tag, v0, v1), edge(edge_)
{ {
//meshAttributes.Method = TRANSFINI; //meshAttributes.Method = TRANSFINI;
......
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
#include "FM_Edge.h" #include "FM_TopoEdge.h"
#include "FM_Face.h" #include "FM_TopoFace.h"
class FEdge : public GEdge { class FEdge : public GEdge {
protected: protected:
FM::FM_Edge* edge; FM::TopoEdge* edge;
int edgeNum; int edgeNum;
public: public:
FEdge(GModel *model, FM::FM_Edge* edge_, int tag, GVertex *v0, GVertex *v1); FEdge(GModel *model, FM::TopoEdge* edge_, int tag, GVertex *v0, GVertex *v1);
virtual ~FEdge() {} virtual ~FEdge() {}
double period() const { throw ; } double period() const { throw ; }
virtual bool periodic(int dim=0) const { return false; } virtual bool periodic(int dim=0) const { return false; }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
FFace::FFace(GModel *m, FM::FM_Face *face_, int tag, std::list<GEdge*> l_edges_) FFace::FFace(GModel *m, FM::TopoFace *face_, int tag, std::list<GEdge*> l_edges_)
: GFace(m,tag), face(face_) : GFace(m,tag), face(face_)
{ {
for (std::list<GEdge*>::iterator it = l_edges_.begin(); for (std::list<GEdge*>::iterator it = l_edges_.begin();
...@@ -15,7 +15,7 @@ FFace::FFace(GModel *m, FM::FM_Face *face_, int tag, std::list<GEdge*> l_edges_) ...@@ -15,7 +15,7 @@ FFace::FFace(GModel *m, FM::FM_Face *face_, int tag, std::list<GEdge*> l_edges_)
} }
} }
FFace::FFace(GModel *m, FM::FM_Face *face_, int tag, std::list<GEdge*> l_edges_, FFace::FFace(GModel *m, FM::TopoFace *face_, int tag, std::list<GEdge*> l_edges_,
std::list<int> l_dirs_) : GFace(m,tag), face(face_) std::list<int> l_dirs_) : GFace(m,tag), face(face_)
{ {
for (std::list<GEdge*>::iterator it = l_edges_.begin(); for (std::list<GEdge*>::iterator it = l_edges_.begin();
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
#include "FM_Face.h" #include "FM_TopoFace.h"
class FFace : public GFace { class FFace : public GFace {
protected: protected:
FM::FM_Face *face; FM::TopoFace *face;
public: public:
FFace(GModel *m, FM::FM_Face *face_, int tag, std::list<GEdge*> l_edges_); FFace(GModel *m, FM::TopoFace *face_, int tag, std::list<GEdge*> l_edges_);
FFace(GModel *m, FM::FM_Face *face_, int tag, std::list<GEdge*> l_edges_, FFace(GModel *m, FM::TopoFace *face_, int tag, std::list<GEdge*> l_edges_,
std::list<int> l_dirs_); std::list<int> l_dirs_);
virtual ~FFace() {} virtual ~FFace() {}
...@@ -42,7 +42,7 @@ class FFace : public GFace { ...@@ -42,7 +42,7 @@ class FFace : public GFace {
ModelType getNativeType() const { return FourierModel; } ModelType getNativeType() const { return FourierModel; }
void * getNativePtr() const {throw;} void * getNativePtr() const {throw;}
virtual bool surfPeriodic(int dim) const; virtual bool surfPeriodic(int dim) const;
FM::FM_Face* GetFMFace() { return face; } FM::TopoFace* GetFMFace() { return face; }
}; };
#endif #endif
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
#include "ProjectionSurface.h" #include "FM_ProjectionSurface.h"
class FProjectionFace : public GFace { class FProjectionFace : public GFace {
protected: protected:
......
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
#include "FM_Vertex.h" #include "FM_TopoVertex.h"
class FVertex : public GVertex { class FVertex : public GVertex {
protected: protected:
FM::FM_Vertex* v; FM::TopoVertex* v;
public: public:
FVertex(GModel *m, int num, FM::FM_Vertex* _v) : GVertex(m, num), v(_v) FVertex(GModel *m, int num, FM::TopoVertex* _v) : GVertex(m, num), v(_v)
{ {
mesh_vertices.push_back(new MVertex(x(), y(), z(), this)); mesh_vertices.push_back(new MVertex(x(), y(), z(), this));
} }
......
#include <string> #include <string>
#include "GModel.h" #include "GModel.h"
#include "Message.h" #include "Message.h"
#include "FVertex.h"
#include "FEdge.h"
#include "FFace.h" #include "FFace.h"
#include "GModelIO_F.h" #include "GModelIO_F.h"
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
#include "FVertex.h" #include "FM_FPatch.h"
#include "FEdge.h" #include "FM_FCurve.h"
#include "FFace.h" #include "FM_TopoVertex.h"
#include "FPatch.h" #include "FM_TopoEdge.h"
#include "FCurve.h" #include "FM_TopoFace.h"
#include "FM_Vertex.h"
#include "FM_Edge.h"
#include "FM_Face.h"
#include "FM_Reader.h" #include "FM_Reader.h"
extern GModel *GMODEL; extern GModel *GMODEL;
...@@ -31,16 +30,16 @@ void makeGFace(FM::Patch* patch) ...@@ -31,16 +30,16 @@ void makeGFace(FM::Patch* patch)
int tagVertex = GMODEL->numVertex(); int tagVertex = GMODEL->numVertex();
patch->F(LL[0],LL[1],xx,yy,zz); patch->F(LL[0],LL[1],xx,yy,zz);
FM::FM_Vertex* vLL = new FM::FM_Vertex(++tagVertex,xx,yy,zz); FM::TopoVertex* vLL = new FM::TopoVertex(++tagVertex,xx,yy,zz);
GMODEL->add(new FVertex(GMODEL,vLL->GetTag(),vLL)); GMODEL->add(new FVertex(GMODEL,vLL->GetTag(),vLL));
patch->F(LR[0],LR[1],xx,yy,zz); patch->F(LR[0],LR[1],xx,yy,zz);
FM::FM_Vertex* vLR = new FM::FM_Vertex(++tagVertex,xx,yy,zz); FM::TopoVertex* vLR = new FM::TopoVertex(++tagVertex,xx,yy,zz);
GMODEL->add(new FVertex(GMODEL,vLR->GetTag(),vLR)); GMODEL->add(new FVertex(GMODEL,vLR->GetTag(),vLR));
patch->F(UL[0],UL[1],xx,yy,zz); patch->F(UL[0],UL[1],xx,yy,zz);
FM::FM_Vertex* vUL = new FM::FM_Vertex(++tagVertex,xx,yy,zz); FM::TopoVertex* vUL = new FM::TopoVertex(++tagVertex,xx,yy,zz);
GMODEL->add(new FVertex(GMODEL,vUL->GetTag(),vUL)); GMODEL->add(new FVertex(GMODEL,vUL->GetTag(),vUL));
patch->F(UR[0],UR[1],xx,yy,zz); patch->F(UR[0],UR[1],xx,yy,zz);
FM::FM_Vertex* vUR = new FM::FM_Vertex(++tagVertex,xx,yy,zz); FM::TopoVertex* vUR = new FM::TopoVertex(++tagVertex,xx,yy,zz);
GMODEL->add(new FVertex(GMODEL,vUR->GetTag(),vUR)); GMODEL->add(new FVertex(GMODEL,vUR->GetTag(),vUR));
FM::Curve* curveB = new FM::FCurve(0,patch,LL,LR); FM::Curve* curveB = new FM::FCurve(0,patch,LL,LR);
...@@ -49,28 +48,28 @@ void makeGFace(FM::Patch* patch) ...@@ -49,28 +48,28 @@ void makeGFace(FM::Patch* patch)
FM::Curve* curveL = new FM::FCurve(0,patch,UL,LL); FM::Curve* curveL = new FM::FCurve(0,patch,UL,LL);
int tagEdge = GMODEL->numEdge(); int tagEdge = GMODEL->numEdge();
FM::FM_Edge* eB = new FM::FM_Edge(++tagEdge,curveB,vLL,vLR); FM::TopoEdge* eB = new FM::TopoEdge(++tagEdge,curveB,vLL,vLR);
i1 = eB->GetStartPoint()->GetTag(); i1 = eB->GetStartPoint()->GetTag();
i2 = eB->GetEndPoint()->GetTag(); i2 = eB->GetEndPoint()->GetTag();
GMODEL->add(new FEdge(GMODEL,eB,eB->GetTag(),GMODEL->vertexByTag(i1), GMODEL->add(new FEdge(GMODEL,eB,eB->GetTag(),GMODEL->vertexByTag(i1),
GMODEL->vertexByTag(i2))); GMODEL->vertexByTag(i2)));
FM::FM_Edge* eR = new FM::FM_Edge(++tagEdge,curveR,vLR,vUR); FM::TopoEdge* eR = new FM::TopoEdge(++tagEdge,curveR,vLR,vUR);
i1 = eR->GetStartPoint()->GetTag(); i1 = eR->GetStartPoint()->GetTag();
i2 = eR->GetEndPoint()->GetTag(); i2 = eR->GetEndPoint()->GetTag();
GMODEL->add(new FEdge(GMODEL,eR,eR->GetTag(),GMODEL->vertexByTag(i1), GMODEL->add(new FEdge(GMODEL,eR,eR->GetTag(),GMODEL->vertexByTag(i1),
GMODEL->vertexByTag(i2))); GMODEL->vertexByTag(i2)));
FM::FM_Edge* eT = new FM::FM_Edge(++tagEdge,curveT,vUR,vUL); FM::TopoEdge* eT = new FM::TopoEdge(++tagEdge,curveT,vUR,vUL);
i1 = eT->GetStartPoint()->GetTag(); i1 = eT->GetStartPoint()->GetTag();
i2 = eT->GetEndPoint()->GetTag(); i2 = eT->GetEndPoint()->GetTag();
GMODEL->add(new FEdge(GMODEL,eT,eT->GetTag(),GMODEL->vertexByTag(i1), GMODEL->add(new FEdge(GMODEL,eT,eT->GetTag(),GMODEL->vertexByTag(i1),
GMODEL->vertexByTag(i2))); GMODEL->vertexByTag(i2)));
FM::FM_Edge* eL = new FM::FM_Edge(++tagEdge,curveL,vUL,vLL); FM::TopoEdge* eL = new FM::TopoEdge(++tagEdge,curveL,vUL,vLL);
i1 = eL->GetStartPoint()->GetTag(); i1 = eL->GetStartPoint()->GetTag();
i2 = eL->GetEndPoint()->GetTag(); i2 = eL->GetEndPoint()->GetTag();
GMODEL->add(new FEdge(GMODEL,eL,eL->GetTag(),GMODEL->vertexByTag(i1), GMODEL->add(new FEdge(GMODEL,eL,eL->GetTag(),GMODEL->vertexByTag(i1),
GMODEL->vertexByTag(i2))); GMODEL->vertexByTag(i2)));
FM::FM_Face* face = new FM::FM_Face(GMODEL->numFace() + 1,patch); FM::TopoFace* face = new FM::TopoFace(GMODEL->numFace() + 1,patch);
face->AddEdge(eB); face->AddEdge(eR); face->AddEdge(eB); face->AddEdge(eR);
face->AddEdge(eT); face->AddEdge(eL); face->AddEdge(eT); face->AddEdge(eL);
std::list<GEdge*> l_edges; std::list<GEdge*> l_edges;
...@@ -83,7 +82,7 @@ void makeGFace(FM::Patch* patch) ...@@ -83,7 +82,7 @@ void makeGFace(FM::Patch* patch)
int GModel::readF(const std::string &filename) int GModel::readF(const std::string &filename)
{ {
FM::FM_Reader* reader = new FM::FM_Reader(filename.c_str()); FM::Reader* reader = new FM::Reader(filename.c_str());
for (int i = 0; i < reader->GetNumPatches(); i++) for (int i = 0; i < reader->GetNumPatches(); i++)
makeGFace(reader->GetPatch(i)); makeGFace(reader->GetPatch(i));
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
#include "Patch.h" #include "FM_Patch.h"
void makeGFace(FM::Patch* patch); void makeGFace(FM::Patch* patch);
......
# $Id: Makefile,v 1.155 2007-08-07 03:14:24 geuzaine Exp $ # $Id: Makefile,v 1.156 2007-08-07 22:13:53 anand Exp $
# #
# Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
# #
...@@ -23,8 +23,8 @@ include ../variables ...@@ -23,8 +23,8 @@ include ../variables
LIB = ../lib/libGmshGeo.a LIB = ../lib/libGmshGeo.a
INCLUDE = -I../Common -I../DataStr -I../Geo -I../Mesh -I../Post -I../Numeric\ INCLUDE = -I../Common -I../DataStr -I../Geo -I../Mesh -I../Post -I../Numeric\
-I../Parser -I../Fltk -I../contrib/NR -I../contrib/FourierModel\ -I../Parser -I../Fltk -I../contrib/NR -I../contrib/ANN/include\
-I../contrib/ANN/include -I../contrib/MathEval -I../contrib/MathEval
CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE}
SRC = GEntity.cpp\ SRC = GEntity.cpp\
......
...@@ -870,7 +870,7 @@ Optional Features: ...@@ -870,7 +870,7 @@ Optional Features:
--enable-cgns enable CGNS output (default=no) --enable-cgns enable CGNS output (default=no)
--enable-occ enable OpenCascade support (default=no) --enable-occ enable OpenCascade support (default=no)
--enable-med enable MED support (default=yes) --enable-med enable MED support (default=yes)
--enable-fm enable support for Fourier models (default=yes) --enable-fm enable support for FourierModel (default=yes)
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
...@@ -890,6 +890,7 @@ Optional Packages: ...@@ -890,6 +890,7 @@ Optional Packages:
--with-hdf5-prefix=PFX prefix where OpenCascade is installed --with-hdf5-prefix=PFX prefix where OpenCascade is installed
--with-med-prefix=PFX prefix where OpenCascade is installed --with-med-prefix=PFX prefix where OpenCascade is installed
--with-fftw3-prefix=PFX prefix where FFTW3 is installed --with-fftw3-prefix=PFX prefix where FFTW3 is installed
--with-fm-prefix=PFX prefix where FourierModel is installed
Some influential environment variables: Some influential environment variables:
CC C compiler command CC C compiler command
...@@ -1409,6 +1410,12 @@ if test "${with_fftw3_prefix+set}" = set; then ...@@ -1409,6 +1410,12 @@ if test "${with_fftw3_prefix+set}" = set; then
FFTW3_PREFIX=$withval FFTW3_PREFIX=$withval
fi; fi;
# Check whether --with-fm-prefix or --without-fm-prefix was given.
if test "${with_fm_prefix+set}" = set; then
withval="$with_fm_prefix"
FM_PREFIX=$withval
fi;
# Check whether --enable-gsl or --disable-gsl was given. # Check whether --enable-gsl or --disable-gsl was given.
if test "${enable_gsl+set}" = set; then if test "${enable_gsl+set}" = set; then
enableval="$enable_gsl" enableval="$enable_gsl"
...@@ -4303,184 +4310,6 @@ fi ...@@ -4303,184 +4310,6 @@ fi
fi fi
fi fi
if test "x$enable_fm" != "xno"; then
echo "$as_me:$LINENO: checking for ./contrib/FourierModel/FM_Face.cpp" >&5
echo $ECHO_N "checking for ./contrib/FourierModel/FM_Face.cpp... $ECHO_C" >&6
if test "${ac_cv_file___contrib_FourierModel_FM_Face_cpp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
test "$cross_compiling" = yes &&
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
if test -r "./contrib/FourierModel/FM_Face.cpp"; then
ac_cv_file___contrib_FourierModel_FM_Face_cpp=yes
else
ac_cv_file___contrib_FourierModel_FM_Face_cpp=no
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_file___contrib_FourierModel_FM_Face_cpp" >&5
echo "${ECHO_T}$ac_cv_file___contrib_FourierModel_FM_Face_cpp" >&6
if test $ac_cv_file___contrib_FourierModel_FM_Face_cpp = yes; then
FOURIER="yes"
else
FOURIER="no"
fi
if test "x${FOURIER}" = "xyes"; then
echo "$as_me:$LINENO: checking for main in -llapack" >&5
echo $ECHO_N "checking for main in -llapack... $ECHO_C" >&6
if test "${ac_cv_lib_lapack_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-llapack $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_lapack_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_lapack_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_lapack_main" >&5
echo "${ECHO_T}$ac_cv_lib_lapack_main" >&6
if test $ac_cv_lib_lapack_main = yes; then
LAPACK="yes"
else
LAPACK="no"
fi
if test "x${LAPACK}" != "xyes"; then
{ echo "$as_me:$LINENO: WARNING: Could not find lapack: disabling FourierModel." >&5
echo "$as_me: WARNING: Could not find lapack: disabling FourierModel." >&2;}
else
if test "x${FFTW3_PREFIX}" != "x"; then
LDFLAGS="-L${FFTW3_PREFIX}/lib ${LDFLAGS}"
fi
echo "$as_me:$LINENO: checking for main in -lfftw3" >&5
echo $ECHO_N "checking for main in -lfftw3... $ECHO_C" >&6
if test "${ac_cv_lib_fftw3_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_fftw3_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_fftw3_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_fftw3_main" >&5
echo "${ECHO_T}$ac_cv_lib_fftw3_main" >&6
if test $ac_cv_lib_fftw3_main = yes; then
FFTW3="yes"
else
FFTW3="no"
fi
if test "x${FFTW3}" != "xyes"; then
{ echo "$as_me:$LINENO: WARNING: Could not find FFTW3: disabling FourierModel." >&5
echo "$as_me: WARNING: Could not find FFTW3: disabling FourierModel." >&2;}
else
GMSH_DIRS="${GMSH_DIRS} contrib/FourierModel"
if test "x${FFTW3_PREFIX}" = "x"; then
GMSH_LIBS="${GMSH_LIBS} -lGmshFourierModel -lfftw3"
FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS}"
else
GMSH_LIBS="${GMSH_LIBS} -lGmshFourierModel -L${FFTW3_PREFIX}/lib -lfftw3"
FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS} -I${FFTW3_PREFIX}/include"
fi
GMSH_LIBS="${GMSH_LIBS} -llapack"
fi
fi
fi
fi
fi fi
if test "x$enable_gsl" != "xno"; then if test "x$enable_gsl" != "xno"; then
...@@ -4858,6 +4687,233 @@ fi ...@@ -4858,6 +4687,233 @@ fi
fi fi
fi fi
if test "x$enable_fm" != "xno"; then
if test "x${FM_PREFIX}" != "x"; then
LDFLAGS="-L${FM_PREFIX}/lib ${LDFLAGS}"
fi
echo "$as_me:$LINENO: checking for main in -lFourierModel" >&5
echo $ECHO_N "checking for main in -lFourierModel... $ECHO_C" >&6
if test "${ac_cv_lib_FourierModel_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lFourierModel $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_FourierModel_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_FourierModel_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_FourierModel_main" >&5
echo "${ECHO_T}$ac_cv_lib_FourierModel_main" >&6
if test $ac_cv_lib_FourierModel_main = yes; then
FM="yes"
else
FM="no"
fi
if test "x${FM}" = "xyes"; then
echo "$as_me:$LINENO: checking for main in -llapack" >&5
echo $ECHO_N "checking for main in -llapack... $ECHO_C" >&6
if test "${ac_cv_lib_lapack_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-llapack $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_lapack_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_lapack_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_lapack_main" >&5
echo "${ECHO_T}$ac_cv_lib_lapack_main" >&6
if test $ac_cv_lib_lapack_main = yes; then
LAPACK="yes"
else
LAPACK="no"
fi
if test "x${LAPACK}" != "xyes"; then
{ echo "$as_me:$LINENO: WARNING: Could not find lapack: disabling FourierModel." >&5
echo "$as_me: WARNING: Could not find lapack: disabling FourierModel." >&2;}
else
if test "x${FFTW3_PREFIX}" != "x"; then
LDFLAGS="-L${FFTW3_PREFIX}/lib ${LDFLAGS}"
fi
echo "$as_me:$LINENO: checking for main in -lfftw3" >&5
echo $ECHO_N "checking for main in -lfftw3... $ECHO_C" >&6
if test "${ac_cv_lib_fftw3_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_fftw3_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_fftw3_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_fftw3_main" >&5
echo "${ECHO_T}$ac_cv_lib_fftw3_main" >&6
if test $ac_cv_lib_fftw3_main = yes; then
FFTW3="yes"
else
FFTW3="no"
fi
if test "x${FFTW3}" != "xyes"; then
{ echo "$as_me:$LINENO: WARNING: Could not find FFTW3: disabling FourierModel." >&5
echo "$as_me: WARNING: Could not find FFTW3: disabling FourierModel." >&2;}
else
if test "x${FM_PREFIX}" = "x"; then
GMSH_LIBS="${GMSH_LIBS} -lFourierModel"
FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS}"
else
GMSH_LIBS="${GMSH_LIBS} -L${FM_PREFIX}/lib -lFourierModel"
FLAGS="-DHAVE_FOURIER_MODEL -I${FM_PREFIX} ${FLAGS}"
fi
if test "x${FFTW3_PREFIX}" = "x"; then
GMSH_LIBS="${GMSH_LIBS} -lfftw3"
else
GMSH_LIBS="${GMSH_LIBS} -L${FFTW3_PREFIX}/lib -lfftw3"
FLAGS="${FLAGS} -I${FFTW3_PREFIX}/include"
fi
GMSH_LIBS="${GMSH_LIBS} -llapack"
fi
fi
fi
fi
if test "x${ZLIB}" = "xyes"; then if test "x${ZLIB}" = "xyes"; then
if test "x$enable_med" != "xno"; then if test "x$enable_med" != "xno"; then
if test "x${HDF5_PREFIX}" != "x"; then if test "x${HDF5_PREFIX}" != "x"; then
......
dnl $Id: configure.in,v 1.129 2007-08-02 22:28:05 geuzaine Exp $ dnl $Id: configure.in,v 1.130 2007-08-07 22:13:52 anand Exp $
dnl dnl
dnl Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle dnl Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
dnl dnl
...@@ -73,6 +73,10 @@ AC_ARG_WITH(fftw3-prefix, ...@@ -73,6 +73,10 @@ AC_ARG_WITH(fftw3-prefix,
AC_HELP_STRING([--with-fftw3-prefix=PFX], AC_HELP_STRING([--with-fftw3-prefix=PFX],
[prefix where FFTW3 is installed]), [prefix where FFTW3 is installed]),
[FFTW3_PREFIX=$withval]) [FFTW3_PREFIX=$withval])
AC_ARG_WITH(fm-prefix,
AC_HELP_STRING([--with-fm-prefix=PFX],
[prefix where FourierModel is installed]),
[FM_PREFIX=$withval])
dnl Parse '--enable' command line options dnl Parse '--enable' command line options
AC_ARG_ENABLE(gsl, AC_ARG_ENABLE(gsl,
...@@ -131,7 +135,7 @@ AC_ARG_ENABLE(med, ...@@ -131,7 +135,7 @@ AC_ARG_ENABLE(med,
[enable MED support (default=yes)])) [enable MED support (default=yes)]))
AC_ARG_ENABLE(fm, AC_ARG_ENABLE(fm,
AC_HELP_STRING([--enable-fm], AC_HELP_STRING([--enable-fm],
[enable support for Fourier models (default=yes)])) [enable support for FourierModel (default=yes)]))
dnl Get the operating system name dnl Get the operating system name
UNAME=`uname` UNAME=`uname`
...@@ -495,37 +499,6 @@ if test "x$enable_contrib" != "xno"; then ...@@ -495,37 +499,6 @@ if test "x$enable_contrib" != "xno"; then
fi fi
fi fi
dnl Check for FourierModel
if test "x$enable_fm" != "xno"; then
AC_CHECK_FILE(./contrib/FourierModel/FM_Face.cpp, FOURIER="yes", FOURIER="no")
if test "x${FOURIER}" = "xyes"; then
dnl Check for lapack
AC_CHECK_LIB(lapack,main,LAPACK="yes",LAPACK="no")
if test "x${LAPACK}" != "xyes"; then
AC_MSG_WARN([Could not find lapack: disabling FourierModel.])
else
dnl Check for FFTW3
if test "x${FFTW3_PREFIX}" != "x"; then
LDFLAGS="-L${FFTW3_PREFIX}/lib ${LDFLAGS}"
fi
AC_CHECK_LIB(fftw3,main,FFTW3="yes",FFTW3="no")
if test "x${FFTW3}" != "xyes"; then
AC_MSG_WARN([Could not find FFTW3: disabling FourierModel.])
else
GMSH_DIRS="${GMSH_DIRS} contrib/FourierModel"
if test "x${FFTW3_PREFIX}" = "x"; then
GMSH_LIBS="${GMSH_LIBS} -lGmshFourierModel -lfftw3"
FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS}"
else
GMSH_LIBS="${GMSH_LIBS} -lGmshFourierModel -L${FFTW3_PREFIX}/lib -lfftw3"
FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS} -I${FFTW3_PREFIX}/include"
fi
GMSH_LIBS="${GMSH_LIBS} -llapack"
fi
fi
fi
fi
fi fi
dnl Check for GSL dnl Check for GSL
...@@ -627,6 +600,45 @@ if test "x$enable_occ" = "xyes"; then ...@@ -627,6 +600,45 @@ if test "x$enable_occ" = "xyes"; then
fi fi
fi fi
dnl Check for FourierModel
if test "x$enable_fm" != "xno"; then
if test "x${FM_PREFIX}" != "x"; then
LDFLAGS="-L${FM_PREFIX}/lib ${LDFLAGS}"
fi
AC_CHECK_LIB(FourierModel,main,FM="yes",FM="no")
if test "x${FM}" = "xyes"; then
dnl Check for lapack
AC_CHECK_LIB(lapack,main,LAPACK="yes",LAPACK="no")
if test "x${LAPACK}" != "xyes"; then
AC_MSG_WARN([Could not find lapack: disabling FourierModel.])
else
dnl Check for FFTW3
if test "x${FFTW3_PREFIX}" != "x"; then
LDFLAGS="-L${FFTW3_PREFIX}/lib ${LDFLAGS}"
fi
AC_CHECK_LIB(fftw3,main,FFTW3="yes",FFTW3="no")
if test "x${FFTW3}" != "xyes"; then
AC_MSG_WARN([Could not find FFTW3: disabling FourierModel.])
else
if test "x${FM_PREFIX}" = "x"; then
GMSH_LIBS="${GMSH_LIBS} -lFourierModel"
FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS}"
else
GMSH_LIBS="${GMSH_LIBS} -L${FM_PREFIX}/lib -lFourierModel"
FLAGS="-DHAVE_FOURIER_MODEL -I${FM_PREFIX} ${FLAGS}"
fi
if test "x${FFTW3_PREFIX}" = "x"; then
GMSH_LIBS="${GMSH_LIBS} -lfftw3"
else
GMSH_LIBS="${GMSH_LIBS} -L${FFTW3_PREFIX}/lib -lfftw3"
FLAGS="${FLAGS} -I${FFTW3_PREFIX}/include"
fi
GMSH_LIBS="${GMSH_LIBS} -llapack"
fi
fi
fi
fi
dnl Check for HDF5 (required by MED, needs zlib) dnl Check for HDF5 (required by MED, needs zlib)
if test "x${ZLIB}" = "xyes"; then if test "x${ZLIB}" = "xyes"; then
if test "x$enable_med" != "xno"; then if test "x$enable_med" != "xno"; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment