[cig-commits] r18109 - in short/3D/PyLith/trunk: . libsrc/meshio libsrc/topology libsrc/utils unittests/libtests/meshio
brad at geodynamics.org
brad at geodynamics.org
Mon Mar 14 19:41:45 PDT 2011
Author: brad
Date: 2011-03-14 19:41:45 -0700 (Mon, 14 Mar 2011)
New Revision: 18109
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/configure.ac
short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc
short/3D/PyLith/trunk/libsrc/topology/Field.cc
short/3D/PyLith/trunk/libsrc/utils/array.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestOutputSolnSubset.cc
Log:
Merge from trunk.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2011-03-15 02:38:55 UTC (rev 18108)
+++ short/3D/PyLith/trunk/TODO 2011-03-15 02:41:45 UTC (rev 18109)
@@ -17,6 +17,12 @@
each processor having lots of gaps in the range of cells and
vertices it has?
+ IntSections - Matt improved distribution to use allow IntSections
+ over vertices or cells rather than vertices + cells. This cuts
+ differences down to 75%.
+
+ Need to check sum, because we may not be tracking deallocation.
+
* Field split with nonlinear solver [MATT]
The custom preconditioner is not being used in the nonlinear
@@ -27,7 +33,7 @@
* Unform global refinement
(1) Unit tests (serial) fail for hex8 refinement. An exception is
- own in the call to the simple copy on line 451 of
+ thrown in the call to the simple copy on line 451 of
RefineVol8Face4Edges2.cc.
(2) The overlap is not updated properly for hex8 refinement. Running
@@ -36,9 +42,10 @@
* Output to HDF5 files. [BRAD and MATT]
- (1) The PETSc Vec is not created correctly for DirichletBC. If the
- x-dof is fixed the unconstrained (y-dof) values end up in the x-dof
- with zeros for the y-dof, the opposite of the correct behavior.
+ (1) The Sieve section to PETSc Vec is not done correctly for
+ DirichletBC. If the x-dof is fixed the unconstrained (y-dof) values
+ end up in the x-dof with zeros for the y-dof, the opposite of the
+ correct behavior.
(2) Add time dataset to vertex_fields and cell_fields. [BRAD]
Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac 2011-03-15 02:38:55 UTC (rev 18108)
+++ short/3D/PyLith/trunk/configure.ac 2011-03-15 02:41:45 UTC (rev 18109)
@@ -27,18 +27,12 @@
# PYTHON
AC_ARG_VAR(PYTHON, [Python interpreter])
AC_ARG_VAR(PYTHONPATH, [Python module search path])
-AC_ARG_WITH([embedding],
- [AC_HELP_STRING([--with-embedding],
- [embed Python with PyLith in a single executable @<:@default=yes@:>@])],
- [want_embedding="$withval"],
- [want_embedding=no])
-AM_CONDITIONAL([COND_EMBEDDING], [test "$want_embedding" = yes])
# SWIG
AC_ARG_ENABLE([swig],
[AC_HELP_STRING([--enable-swig],
[enable generating modules with SWIG) @<:@default=no@:>@])],
- [enable_swig=yes],
+ [if test "$enableval" = yes ; then enable_swig=yes; else enable_swig=no; fi],
[enable_swig=no])
AM_CONDITIONAL([ENABLE_SWIG], [test "$enable_swig" = yes])
@@ -46,7 +40,7 @@
AC_ARG_ENABLE([testing],
[AC_HELP_STRING([--enable-testing],
[enable unit testing with cppunit (requires cppunit) @<:@default=no@:>@])],
- [enable_testing=yes],
+ [if test "$enableval" = yes ; then enable_testing=yes; else enable_testing=no; fi],
[enable_testing=no])
AM_CONDITIONAL([ENABLE_TESTING], [test "$enable_testing" = yes])
@@ -54,9 +48,11 @@
AC_ARG_ENABLE([cubit],
[AC_HELP_STRING([--enable-cubit],
[enable reading/writing Cubit EXODUS files (requires netcdf) @<:@default=no@:>@])],
- [enable_cubit=yes
- CPPFLAGS="-DENABLE_CUBIT $CPPFLAGS"; export CPPFLAGS;
- PYLITH_SWIG_CPPFLAGS="-DENABLE_CUBIT $PYLITH_SWIG_CPPFLAGS"; export PYLITH_SWIG_CPPFLAGS],
+ [if test "$enableval" = yes ; then
+ enable_cubit=yes
+ CPPFLAGS="-DENABLE_CUBIT $CPPFLAGS"; export CPPFLAGS;
+ PYLITH_SWIG_CPPFLAGS="-DENABLE_CUBIT $PYLITH_SWIG_CPPFLAGS"; export PYLITH_SWIG_CPPFLAGS
+ else enable_cubit=no; fi],
[enable_cubit=no])
AM_CONDITIONAL([ENABLE_CUBIT], [test "$enable_cubit" = yes])
AC_SUBST(PYLITH_SWIG_CPPFLAGS)
@@ -65,8 +61,10 @@
AC_ARG_ENABLE([tetgen],
[AC_HELP_STRING([--enable-tetgen],
[enable generating simple meshes w/TetGen via PETSc @<:@default=no@:>@])],
- [enable_tetgen=yes
- CPPFLAGS="-DENABLE_TETGEN $CPPFLAGS"; export CPPFLAGS],
+ [if test "$enableval" = yes ; then
+ enable_tetgen=yes
+ CPPFLAGS="-DENABLE_TETGEN $CPPFLAGS"; export CPPFLAGS
+ else enable_tetgen=no; fi],
[enable_tetgen=no])
AM_CONDITIONAL([ENABLE_TETGEN], [test "$enable_tetgen" = yes])
@@ -94,8 +92,10 @@
AC_ARG_ENABLE([memory_logging],
[AC_HELP_STRING([--enable-memory-logging],
[enable memory logging @<:@default=no@:>@])],
- [enable_memory_logging=yes
- CPPFLAGS="-DALE_MEM_LOGGING $CPPFLAGS"; export CPPFLAGS],
+ [if test "$enableval" = yes ; then
+ enable_memory_logging=yes
+ CPPFLAGS="-DALE_MEM_LOGGING $CPPFLAGS"; export CPPFLAGS
+ else enable_memory_logging=no; fi],
[enable_memory_logging=no])
AM_CONDITIONAL([ENABLE_MEMORY_LOGGING], [test "$enable_memory_logging" = yes])
@@ -103,7 +103,7 @@
AC_ARG_ENABLE([documentation],
[AC_HELP_STRING([--enable-documentation],
[enable building HTML documentation (requires doxygen) @<:@default=no@:>@])],
- [enable_documentation=yes],
+ [if test "$enableval" = yes ; then enable_documentation=yes; else enable_documentation=no; fi],
[enable_documentation=no])
AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test "$enable_documentation" = yes])
@@ -157,36 +157,14 @@
# CPPUNIT
if test "$enable_testing" = "yes" ; then
- AC_LANG(C++)
- AC_CHECK_HEADER([cppunit/TestRunner.h], [], [
- AC_MSG_ERROR([CppUnit header not found; try CPPFLAGS="-I<CppUnit include dir>"])
- ])
- AC_MSG_CHECKING([for CppUnit::TestRunner in -lcppunit])
- AC_REQUIRE_CPP
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include <cppunit/TestRunner.h>]],
- [[CppUnit::TestRunner runner;]])],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)
- AC_MSG_ERROR([CppUnit library not found; try LDFLAGS="-L<CppUnit lib dir>"])
- ])
+ CIT_CPPUNIT_HEADER
+ CIT_CPPUNIT_LIB
fi
# CUBIT (netcdf)
if test "$enable_cubit" = "yes" ; then
- AC_LANG(C++)
- AC_CHECK_HEADER([netcdfcpp.h], [], [
- AC_MSG_ERROR([netcdf C++ header not found; try CPPFLAGS="-I<netcdf include dir>"])
- ])
- AC_MSG_CHECKING([for NcFile in -lnetcdfc++])
- AC_REQUIRE_CPP
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include <netcdfcpp.h>]],
- [[NcFile ncfile("filename");]])],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)
- AC_MSG_ERROR([netcdfc++ library not found; try LDFLAGS="-L<netcdf lib dir>"])
- ])
+ CIT_NETCDF_HEADER
+ CIT_NETCDF_LIB
fi
# TETGEN
@@ -250,29 +228,12 @@
fi
# PROJ4
-AC_CHECK_LIB(proj, pj_init_plus, [
- AC_CHECK_HEADER([proj_api.h], [], [
- AC_MSG_ERROR([Proj4 header not found; try CPPFLAGS="-I<Proj4 include dir>"])
- ])
-],[
- AC_MSG_ERROR([Proj4 library not found; try LDFLAGS="-L<Proj4 lib dir>"])
-])
+CIT_PROJ4_HEADER
+CIT_PROJ4_LIB
# SPATIALDATA
-AC_LANG(C++)
-AC_CHECK_HEADER([spatialdata/spatialdb/SpatialDB.hh], [], [
- AC_MSG_ERROR([SpatialDB header not found; try CPPFLAGS="-I<Spatialdata include dir>"])
-])
-AC_MSG_CHECKING([for spatialdb::SimpleDB in -lspatialdata])
-AC_REQUIRE_CPP
-AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include <spatialdata/spatialdb/SpatialDB.hh>]
- [#include <spatialdata/spatialdb/SimpleDB.hh>]],
- [[spatialdata::spatialdb::SimpleDB db;]])],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)
- AC_MSG_ERROR([Spatialdata library not found; try LDFLAGS="-L<Spatialdata lib dir>"])
-])
+CIT_SPATIALDATA_HEADER
+CIT_SPATIALDATA_LIB
# DOXYGEN
if test "$enable_documentation" = "yes" ; then
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc 2011-03-15 02:38:55 UTC (rev 18108)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc 2011-03-15 02:41:45 UTC (rev 18109)
@@ -258,6 +258,11 @@
_timesteps[field.label()] += 1;
const int istep = _timesteps[field.label()];
+#if 1
+ field.view("writeVertexField");
+ VecView(vector, PETSC_VIEWER_STDOUT_WORLD);
+#endif
+
// Set temporary block size that matches fiber dimension for output.
int blockSize = 0;
err = VecGetBlockSize(vector, &blockSize); CHECK_PETSC_ERROR(err);
Modified: short/3D/PyLith/trunk/libsrc/topology/Field.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Field.cc 2011-03-15 02:38:55 UTC (rev 18108)
+++ short/3D/PyLith/trunk/libsrc/topology/Field.cc 2011-03-15 02:41:45 UTC (rev 18109)
@@ -838,7 +838,7 @@
// Create scatter
err = MeshCreateGlobalScatter(_mesh.sieveMesh(), _section, order,
- _section, &sinfo.scatter);
+ &sinfo.scatter);
CHECK_PETSC_ERROR(err);
// Create scatterVec
@@ -985,6 +985,8 @@
_section);
assert(!order.isNull());
+ order->view("GLOBAL ORDER");
+
// Create scatter
err = MeshCreateGlobalScatter(_mesh.sieveMesh(), _section, order,
&sinfo.scatter);
Modified: short/3D/PyLith/trunk/libsrc/utils/array.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/utils/array.hh 2011-03-15 02:38:55 UTC (rev 18108)
+++ short/3D/PyLith/trunk/libsrc/utils/array.hh 2011-03-15 02:41:45 UTC (rev 18109)
@@ -30,6 +30,8 @@
#include "arrayfwd.hh"
+#include "sievetypes.hh" // ensure we include petscsys.h BEFORE valarray to prevent clash over isinf() and isnan().
+
#include <vector>
#include <valarray>
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestOutputSolnSubset.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestOutputSolnSubset.cc 2011-03-15 02:38:55 UTC (rev 18108)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestOutputSolnSubset.cc 2011-03-15 02:41:45 UTC (rev 18109)
@@ -99,7 +99,7 @@
const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
const ALE::Obj<SieveSubMesh::sieve_type>& sieve = sieveSubMesh->getSieve();
assert(!sieve.isNull());
- typedef ALE::SieveAlg<Mesh> SieveAlg;
+ typedef ALE::SieveAlg<SieveMesh> SieveAlg;
CPPUNIT_ASSERT_EQUAL(ncells, int(cells->size()));
More information about the CIG-COMMITS
mailing list