[cig-commits] r6905 - in short/3D/PyLith/trunk: . unittests/pytests/topology

brad at geodynamics.org brad at geodynamics.org
Wed May 16 13:59:22 PDT 2007


Author: brad
Date: 2007-05-16 13:59:21 -0700 (Wed, 16 May 2007)
New Revision: 6905

Modified:
   short/3D/PyLith/trunk/configure.ac
   short/3D/PyLith/trunk/unittests/pytests/topology/Makefile.am
   short/3D/PyLith/trunk/unittests/pytests/topology/testdriver.py
Log:
Added configure flag for use of TetGen via PETSc (allows use of PETSc w/out TetGen).

Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac	2007-05-16 20:03:35 UTC (rev 6904)
+++ short/3D/PyLith/trunk/configure.ac	2007-05-16 20:59:21 UTC (rev 6905)
@@ -45,6 +45,15 @@
 	[enable_cubit=no])
 AM_CONDITIONAL([ENABLE_CUBIT], [test "$enable_cubit" = yes])
 
+# PETSc w/TetGen
+AC_ARG_ENABLE([tetgen],
+    [AC_HELP_STRING([--enable-tetgen],
+        [enable generating simple meshes w/TetGen via PETSc @<:@default=no@:>@])],
+	[enable_tetgen=yes
+	CXXFLAGS="-DENABLE_TETGEN $CXXFLAGS"; export CXXFLAGS],
+	[enable_tetgen=no])
+AM_CONDITIONAL([ENABLE_TETGEN], [test "$enable_tetgen" = yes])
+
 # DOCUMENTATION w/doxygen
 AC_ARG_ENABLE([documentation],
     [AC_HELP_STRING([--enable-documentation],
@@ -131,6 +140,24 @@
   ])
 fi
 
+# TETGEN
+if test "$enable_tetgen" = "yes" ; then
+  AC_REQUIRE_CPP
+  AC_LANG(C++)
+  CPPFLAGS="$PETSC_INCLUDE $PETSC_CXX_INCLUDE $CPPFLAGS"
+  AC_CHECK_HEADER([tetgen.h], [], [
+    AC_MSG_ERROR([tetgen header not found; check PETSc installation.])
+  ])
+  AC_MSG_CHECKING([for tetgenbehavior in -ltetgen])
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[#include <tetgen.h>]],
+	             [[tetgenbehavior  behavior;]])],
+    [AC_MSG_RESULT(yes)],
+    [AC_MSG_RESULT(no)
+     AC_MSG_ERROR([tetgen library not found; check PETSc installation.])
+  ])
+fi
+
 # PROJ4
 AC_CHECK_LIB(proj, pj_init_plus, [
   AC_CHECK_HEADER([proj_api.h], [], [

Modified: short/3D/PyLith/trunk/unittests/pytests/topology/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/topology/Makefile.am	2007-05-16 20:03:35 UTC (rev 6904)
+++ short/3D/PyLith/trunk/unittests/pytests/topology/Makefile.am	2007-05-16 20:59:21 UTC (rev 6905)
@@ -17,9 +17,16 @@
 
 check_SCRIPTS = testdriver.py
 
+if ENABLE_TETGEN
+  TESTS += testgensimple.py
+  check_SCRIPTS += testgensimple.py
+endif
+
+
 noinst_PYTHON = \
 	TestMesh.py \
 	TestMeshGenerator.py \
+	TestMeshGenSimple.py \
 	TestMeshImporter.py
 
 TESTS_ENVIRONMENT = $(PYTHON)

Modified: short/3D/PyLith/trunk/unittests/pytests/topology/testdriver.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/topology/testdriver.py	2007-05-16 20:03:35 UTC (rev 6904)
+++ short/3D/PyLith/trunk/unittests/pytests/topology/testdriver.py	2007-05-16 20:59:21 UTC (rev 6905)
@@ -63,9 +63,6 @@
     from TestMeshImporter import TestMeshImporter
     suite.addTest(unittest.makeSuite(TestMeshImporter))
 
-    from TestMeshGenSimple import TestMeshGenSimple
-    suite.addTest(unittest.makeSuite(TestMeshGenSimple))
-
     return suite
 
 



More information about the cig-commits mailing list