[cig-commits] r18408 - in short/3D/PyLith/branches/multifields: . libsrc libsrc/pylith/bc libsrc/pylith/faults libsrc/pylith/feassemble libsrc/pylith/friction libsrc/pylith/materials libsrc/pylith/meshio libsrc/pylith/problems libsrc/pylith/topology libsrc/pylith/utils modulesrc/bc modulesrc/faults modulesrc/feassemble modulesrc/friction modulesrc/materials modulesrc/meshio modulesrc/mpi modulesrc/problems modulesrc/topology modulesrc/utils unittests/libtests/meshio

brad at geodynamics.org brad at geodynamics.org
Sat May 21 07:02:55 PDT 2011


Author: brad
Date: 2011-05-21 07:02:54 -0700 (Sat, 21 May 2011)
New Revision: 18408

Added:
   short/3D/PyLith/branches/multifields/libsrc/pylith/
   short/3D/PyLith/branches/multifields/unittests/libtests/meshio/TestXdmf.cc
   short/3D/PyLith/branches/multifields/unittests/libtests/meshio/TestXdmf.hh
Removed:
   short/3D/PyLith/branches/multifields/libsrc/Makefile.am
   short/3D/PyLith/branches/multifields/libsrc/bc/
   short/3D/PyLith/branches/multifields/libsrc/faults/
   short/3D/PyLith/branches/multifields/libsrc/feassemble/
   short/3D/PyLith/branches/multifields/libsrc/friction/
   short/3D/PyLith/branches/multifields/libsrc/materials/
   short/3D/PyLith/branches/multifields/libsrc/meshio/
   short/3D/PyLith/branches/multifields/libsrc/problems/
   short/3D/PyLith/branches/multifields/libsrc/topology/
   short/3D/PyLith/branches/multifields/libsrc/utils/
Modified:
   short/3D/PyLith/branches/multifields/configure.ac
   short/3D/PyLith/branches/multifields/libsrc/pylith/bc/
   short/3D/PyLith/branches/multifields/libsrc/pylith/faults/
   short/3D/PyLith/branches/multifields/libsrc/pylith/feassemble/
   short/3D/PyLith/branches/multifields/libsrc/pylith/friction/
   short/3D/PyLith/branches/multifields/libsrc/pylith/materials/
   short/3D/PyLith/branches/multifields/libsrc/pylith/meshio/
   short/3D/PyLith/branches/multifields/libsrc/pylith/problems/
   short/3D/PyLith/branches/multifields/libsrc/pylith/topology/
   short/3D/PyLith/branches/multifields/libsrc/pylith/utils/
   short/3D/PyLith/branches/multifields/modulesrc/bc/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/faults/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/feassemble/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/friction/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/materials/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/meshio/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/mpi/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/problems/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/topology/Makefile.am
   short/3D/PyLith/branches/multifields/modulesrc/utils/Makefile.am
   short/3D/PyLith/branches/multifields/subpackage.am
   short/3D/PyLith/branches/multifields/unittests/libtests/meshio/Makefile.am
Log:
Merge from trunk.

Modified: short/3D/PyLith/branches/multifields/configure.ac
===================================================================
--- short/3D/PyLith/branches/multifields/configure.ac	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/configure.ac	2011-05-21 14:02:54 UTC (rev 18408)
@@ -264,16 +264,17 @@
 # ----------------------------------------------------------------------
 AC_CONFIG_FILES([Makefile
 		pylith/Makefile
-                libsrc/Makefile
-		libsrc/bc/Makefile
-                libsrc/feassemble/Makefile
-		libsrc/faults/Makefile
-		libsrc/friction/Makefile
-                libsrc/materials/Makefile
-                libsrc/meshio/Makefile
-                libsrc/problems/Makefile
-		libsrc/topology/Makefile
-		libsrc/utils/Makefile
+		libsrc/Makefile
+		libsrc/pylith/Makefile
+		libsrc/pylith/bc/Makefile
+                libsrc/pylith/feassemble/Makefile
+		libsrc/pylith/faults/Makefile
+		libsrc/pylith/friction/Makefile
+                libsrc/pylith/materials/Makefile
+                libsrc/pylith/meshio/Makefile
+                libsrc/pylith/problems/Makefile
+		libsrc/pylith/topology/Makefile
+		libsrc/pylith/utils/Makefile
                 modulesrc/Makefile
                 modulesrc/include/Makefile
                 modulesrc/bc/Makefile

Deleted: short/3D/PyLith/branches/multifields/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/libsrc/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/libsrc/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -1,195 +0,0 @@
-# -*- Makefile -*-
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard, U.S. Geological Survey
-# Charles A. Williams, GNS Science
-# Matthew G. Knepley, University of Chicago
-#
-# This code was developed as part of the Computational Infrastructure
-# for Geodynamics (http://geodynamics.org).
-#
-# Copyright (c) 2010 University of California, Davis
-#
-# See COPYING for license information.
-#
-# ----------------------------------------------------------------------
-#
-
-SUBDIRS = \
-	utils \
-	topology \
-	meshio \
-	materials \
-	bc \
-	feassemble \
-	faults \
-	friction \
-	problems
-
-.cu.lo:
-	$(LIBTOOL) --tag=CC --mode=compile nvcc --compile -m64 $(NVCC_FLAGS) -o ${@F} $<
-
-lib_LTLIBRARIES = libpylith.la
-
-libpylith_la_SOURCES = \
-	bc/BoundaryCondition.cc \
-	bc/BoundaryConditionPoints.cc \
-	bc/BCIntegratorSubMesh.cc \
-	bc/TimeDependent.cc \
-	bc/TimeDependentPoints.cc \
-	bc/DirichletBC.cc \
-	bc/DirichletBoundary.cc \
-	bc/Neumann.cc \
-	bc/AbsorbingDampers.cc \
-	bc/PointForce.cc \
-	faults/Fault.cc \
-	faults/SlipTimeFn.cc \
-	faults/StepSlipFn.cc \
-	faults/ConstRateSlipFn.cc \
-	faults/BruneSlipFn.cc \
-	faults/TimeHistorySlipFn.cc \
-	faults/LiuCosSlipFn.cc \
-	faults/EqKinSrc.cc \
-	faults/TopologyOps.cc \
-	faults/CohesiveTopology.cc \
-	faults/FaultCohesive.cc \
-	faults/FaultCohesiveLagrange.cc \
-	faults/FaultCohesiveKin.cc \
-	faults/FaultCohesiveDyn.cc \
-	faults/FaultCohesiveTract.cc \
-	feassemble/CellGeometry.cc \
-	feassemble/Constraint.cc \
-	feassemble/GeometryPoint1D.cc \
-	feassemble/GeometryPoint2D.cc \
-	feassemble/GeometryPoint3D.cc \
-	feassemble/GeometryLine1D.cc \
-	feassemble/GeometryLine2D.cc \
-	feassemble/GeometryLine3D.cc \
-	feassemble/GeometryTri2D.cc \
-	feassemble/GeometryTri3D.cc \
-	feassemble/GeometryTet3D.cc \
-	feassemble/GeometryQuad2D.cc \
-	feassemble/GeometryQuad3D.cc \
-	feassemble/GeometryHex3D.cc \
-	feassemble/QuadratureRefCell.cc \
-	feassemble/QuadratureEngine.cc \
-	feassemble/Quadrature0D.cc \
-	feassemble/Quadrature1D.cc \
-	feassemble/Quadrature1Din2D.cc \
-	feassemble/Quadrature1Din3D.cc \
-	feassemble/Quadrature2D.cc \
-	feassemble/Quadrature2Din3D.cc \
-	feassemble/Quadrature3D.cc \
-	feassemble/IntegratorElasticity.cc \
-	feassemble/ElasticityImplicit.cc \
-	feassemble/ElasticityExplicit.cc \
-	feassemble/ElasticityExplicitTri3.cc \
-	feassemble/ElasticityExplicitTet4.cc \
-	feassemble/IntegratorElasticityLgDeform.cc \
-	feassemble/ElasticityImplicitLgDeform.cc \
-	feassemble/ElasticityExplicitLgDeform.cc \
-	friction/FrictionModel.cc \
-	friction/StaticFriction.cc \
-	friction/SlipWeakening.cc \
-	friction/RateStateAgeing.cc \
-	friction/TimeWeakening.cc \
-	materials/Metadata.cc \
-	materials/Material.cc \
-	materials/ElasticMaterial.cc \
-	materials/ElasticStrain1D.cc \
-	materials/ElasticStress1D.cc \
-	materials/ElasticPlaneStrain.cc \
-	materials/ElasticPlaneStress.cc \
-	materials/ElasticIsotropic3D.cc \
-	materials/ViscoelasticMaxwell.cc \
-	materials/GenMaxwellIsotropic3D.cc \
-	materials/GenMaxwellQpQsIsotropic3D.cc \
-	materials/MaxwellIsotropic3D.cc \
-	materials/MaxwellPlaneStrain.cc \
-	materials/PowerLaw3D.cc \
-	materials/DruckerPrager3D.cc \
-	meshio/BinaryIO.cc \
-	meshio/GMVFile.cc \
-	meshio/GMVFileAscii.cc \
-	meshio/GMVFileBinary.cc \
-	meshio/MeshBuilder.cc \
-	meshio/MeshIO.cc \
-	meshio/MeshIOAscii.cc \
-	meshio/MeshIOLagrit.cc \
-	meshio/MeshIOSieve.cc \
-	meshio/PsetFile.cc \
-	meshio/PsetFileAscii.cc \
-	meshio/PsetFileBinary.cc \
-	meshio/OutputSolnSubset.cc \
-	meshio/UCDFaultFile.cc \
-	problems/Formulation.cc \
-	problems/Explicit.cc \
-	problems/Implicit.cc \
-	problems/Solver.cc \
-	problems/SolverLinear.cc \
-	problems/SolverNonlinear.cc \
-	problems/SolverLumped.cc \
-	topology/FieldBase.cc \
-	topology/Jacobian.cc \
-	topology/Mesh.cc \
-	topology/MeshOps.cc \
-	topology/SubMesh.cc \
-	topology/SolutionFields.cc \
-	topology/Distributor.cc \
-	topology/RefineUniform.cc \
-	topology/ReverseCuthillMcKee.cc \
-	utils/EventLogger.cc \
-	utils/TestArray.cc
-
-
-# TEMPORARY
-libpylith_la_SOURCES += \
-	topology/RefineEdges2.cc \
-	topology/CellRefinerTri3.cc \
-	topology/CellRefinerTet4.cc \
-	topology/RefineFace4Edges2.cc \
-	topology/CellRefinerQuad4.cc \
-	topology/RefineVol8Face4Edges2.cc \
-	topology/CellRefinerHex8.cc \
-	topology/MeshOrder.cc
-
-
-libpylith_la_LDFLAGS = $(AM_LDFLAGS) $(PYTHON_LA_LDFLAGS)
-libpylith_la_LIBADD = \
-	-lspatialdata \
-	$(PETSC_LIB)
-if NO_UNDEFINED
-libpylith_la_LIBADD += \
-	$(PYTHON_BLDLIBRARY) $(PYTHON_LIBS) $(PYTHON_SYSLIBS)
-endif
-
-INCLUDES = -I$(top_builddir)/include
-INCLUDES += $(PETSC_CC_INCLUDES)
-
-AM_CPPFLAGS = $(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR) $(PETSC_SIEVE_FLAGS)
-
-if ENABLE_HDF5
-  libpylith_la_SOURCES += \
-	meshio/HDF5.cc \
-	meshio/Xdmf.cc
-  libpylith_la_LIBADD += -lhdf5
-endif
-
-if ENABLE_CUBIT
-  libpylith_la_SOURCES += \
-	meshio/MeshIOCubit.cc
-  libpylith_la_LIBADD += -lnetcdf_c++ -lnetcdf
-endif
-
-if ENABLE_CUDA
-  libpylith_la_SOURCES += \
-	feassemble/ElasticityImplicitCUDA.cc \
-	feassemble/ElasticityImplicitCUDAKernel.cu
-  libpylith_la_LIBADD += -lcudart -lcuda 
-#    -L/usr/local/cuda/lib
-# INCLUDES +=  -I/usr/local/cuda/include
-endif
-
-
-# End of file 

Copied: short/3D/PyLith/branches/multifields/libsrc/pylith (from rev 18407, short/3D/PyLith/trunk/libsrc/pylith)

Modified: short/3D/PyLith/branches/multifields/modulesrc/bc/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/bc/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/bc/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -49,7 +49,7 @@
 dist__bcmodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _bcmodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if ENABLE_CUBIT

Modified: short/3D/PyLith/branches/multifields/modulesrc/faults/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/faults/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/faults/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -52,7 +52,7 @@
 dist__faultsmodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _faultsmodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if ENABLE_CUBIT

Modified: short/3D/PyLith/branches/multifields/modulesrc/feassemble/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/feassemble/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/feassemble/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -61,7 +61,7 @@
 dist__feassemblemodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _feassemblemodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if ENABLE_CUBIT

Modified: short/3D/PyLith/branches/multifields/modulesrc/friction/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/friction/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/friction/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -45,7 +45,7 @@
 dist__frictionmodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _frictionmodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if ENABLE_CUBIT

Modified: short/3D/PyLith/branches/multifields/modulesrc/materials/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/materials/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/materials/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -54,7 +54,7 @@
 dist__materialsmodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _materialsmodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if ENABLE_CUBIT

Modified: short/3D/PyLith/branches/multifields/modulesrc/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/meshio/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/meshio/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -51,7 +51,7 @@
 dist__meshiomodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _meshiomodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if ENABLE_CUBIT

Modified: short/3D/PyLith/branches/multifields/modulesrc/mpi/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/mpi/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/mpi/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -38,7 +38,7 @@
 dist__mpimodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _mpimodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if NO_UNDEFINED

Modified: short/3D/PyLith/branches/multifields/modulesrc/problems/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/problems/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/problems/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -44,7 +44,7 @@
 dist__problemsmodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _problemsmodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if ENABLE_CUBIT

Modified: short/3D/PyLith/branches/multifields/modulesrc/topology/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/topology/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/topology/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -48,7 +48,7 @@
 dist__topologymodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
 _topologymodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIBS)
 if NO_UNDEFINED

Modified: short/3D/PyLith/branches/multifields/modulesrc/utils/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/modulesrc/utils/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/modulesrc/utils/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -57,7 +57,7 @@
 dist__petscmodule_la_SOURCES = $(petsc_swig_sources) $(petsc_swig_generated)
 
 _petscmodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIB)
 if NO_UNDEFINED
@@ -72,7 +72,7 @@
 dist__utilsmodule_la_SOURCES = $(utils_swig_sources) $(utils_swig_generated)
 
 _utilsmodule_la_LIBADD = \
-	$(top_builddir)/libsrc/libpylith.la \
+	$(top_builddir)/libsrc/pylith/libpylith.la \
 	-lspatialdata \
 	$(PETSC_LIB)
 if NO_UNDEFINED

Modified: short/3D/PyLith/branches/multifields/subpackage.am
===================================================================
--- short/3D/PyLith/branches/multifields/subpackage.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/subpackage.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -39,7 +39,7 @@
 clean-nobase_subpkgincludeHEADERS:
 	$(MAKE) $(AM_MAKEFLAGS) pkgincludedir=$(export_incdir) uninstall-nobase_subpkgincludeHEADERS
 
-INCLUDES = -I$(top_builddir)/include
+INCLUDES = -I$(top_srcdir)/libsrc
 
 
 # End of file 

Modified: short/3D/PyLith/branches/multifields/unittests/libtests/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/branches/multifields/unittests/libtests/meshio/Makefile.am	2011-05-21 13:56:23 UTC (rev 18407)
+++ short/3D/PyLith/branches/multifields/unittests/libtests/meshio/Makefile.am	2011-05-21 14:02:54 UTC (rev 18408)
@@ -242,7 +242,8 @@
 	TestDataWriterHDF5ExtBCMesh.cc \
 	TestDataWriterHDF5ExtBCMeshCases.cc \
 	TestDataWriterHDF5ExtFaultMesh.cc \
-	TestDataWriterHDF5ExtFaultMeshCases.cc
+	TestDataWriterHDF5ExtFaultMeshCases.cc \
+	TestXdmf.cc
 
 
   noinst_HEADERS += \
@@ -264,7 +265,8 @@
 	TestDataWriterHDF5ExtBCMesh.hh \
 	TestDataWriterHDF5ExtBCMeshCases.hh \
 	TestDataWriterHDF5ExtFaultMesh.hh \
-	TestDataWriterHDF5ExtFaultMeshCases.hh
+	TestDataWriterHDF5ExtFaultMeshCases.hh \
+	TestXdmf.hh
 
   testmeshio_LDADD += -lhdf5
 endif

Copied: short/3D/PyLith/branches/multifields/unittests/libtests/meshio/TestXdmf.cc (from rev 18407, short/3D/PyLith/trunk/unittests/libtests/meshio/TestXdmf.cc)
===================================================================
--- short/3D/PyLith/branches/multifields/unittests/libtests/meshio/TestXdmf.cc	                        (rev 0)
+++ short/3D/PyLith/branches/multifields/unittests/libtests/meshio/TestXdmf.cc	2011-05-21 14:02:54 UTC (rev 18408)
@@ -0,0 +1,106 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestXdmf.hh" // Implementation of class methods
+
+#include "pylith/meshio/Xdmf.hh" // USES Xdmf
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::meshio::TestXdmf );
+
+// ----------------------------------------------------------------------
+// Test constructor.
+void
+pylith::meshio::TestXdmf::testConstructor(void)
+{ // testConstructor
+  Xdmf one;
+} // testConstructor
+
+// ----------------------------------------------------------------------
+// Test write() with 2D mesh and vertex data.
+void
+pylith::meshio::TestXdmf::testWrite2DVertex(void)
+{ // testWrite2DVertex
+
+  const char* filenameHDF5 = "data/tri3_vertex.h5";
+  const char* filenameXdmf = "tri3_vertex.xmf";
+
+  Xdmf metafile;
+  metafile.write(filenameXdmf, filenameHDF5);
+
+  //_checkFile(filenameXdmf);
+} // testWrite2DVertex
+
+// ----------------------------------------------------------------------
+// Test write() with 2D mesh and cell data.
+void
+pylith::meshio::TestXdmf::testWrite2DCell(void)
+{ // testWrite2DCell
+} // testWrite2DCell
+
+// ----------------------------------------------------------------------
+// Test write() with 3D mesh and vertex data.
+void
+pylith::meshio::TestXdmf::testWrite3DVertex(void)
+{ // testWrite3DVertex
+} // testWrite3DVertex
+
+// ----------------------------------------------------------------------
+// Test write() with 3D mesh and cell data.
+void
+pylith::meshio::TestXdmf::testWrite3DCell(void)
+{ // testWrite3DCell
+} // testWrite3DCell
+
+// ----------------------------------------------------------------------
+// Check VTK file against archived file.
+void
+pylith::meshio::TestXdmf::_checkFile(const char* filename)
+{ // _checkFile
+  const std::string filenameE = std::string("data/") + std::string(filename);
+
+  std::ifstream fileInE(filenameE.c_str());
+  CPPUNIT_ASSERT(fileInE.is_open());
+
+  std::ifstream fileIn(filename);
+  CPPUNIT_ASSERT(fileIn.is_open());
+
+  const int maxLen = 256;
+  char line[maxLen];
+  char lineE[maxLen];
+
+  int i = 1;
+  while(!fileInE.eof()) {
+    fileInE.getline(lineE, maxLen);
+    fileIn.getline(line, maxLen);
+    if (0 != strcmp(line, lineE)) {
+      std::cerr << "Line " << i << " of file '" << filename << "' is incorrect."
+		<< std::endl;
+      CPPUNIT_ASSERT(false);
+    } // if
+    ++i;
+  } // while
+
+  fileInE.close();
+  fileIn.close();
+} // _checkFile
+
+
+// End of file 

Copied: short/3D/PyLith/branches/multifields/unittests/libtests/meshio/TestXdmf.hh (from rev 18407, short/3D/PyLith/trunk/unittests/libtests/meshio/TestXdmf.hh)
===================================================================
--- short/3D/PyLith/branches/multifields/unittests/libtests/meshio/TestXdmf.hh	                        (rev 0)
+++ short/3D/PyLith/branches/multifields/unittests/libtests/meshio/TestXdmf.hh	2011-05-21 14:02:54 UTC (rev 18408)
@@ -0,0 +1,88 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestXdmf.hh
+ *
+ * @brief C++ TestXdmf object
+ *
+ * C++ unit testing for Xdmf.
+ */
+
+#if !defined(pylith_meshio_testxdmf_hh)
+#define pylith_meshio_testxdmf_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace meshio {
+    class TestXdmf;
+  } // meshio
+} // pylith
+
+/// C++ unit testing for Xdmf
+class pylith::meshio::TestXdmf : public CppUnit::TestFixture
+{ // class TestXdmf
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestXdmf );
+
+  CPPUNIT_TEST( testConstructor );
+  CPPUNIT_TEST( testWrite2DVertex );
+#if 0
+  CPPUNIT_TEST( testWrite2DCell );
+  CPPUNIT_TEST( testWrite3DVertex );
+  CPPUNIT_TEST( testWrite3DCell );
+#endif
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Test constructor.
+  void testConstructor(void);
+
+  /// Test write() with 2D mesh and vertex data.
+  void testWrite2DVertex(void);
+
+  /// Test write() with 2D mesh and cell data.
+  void testWrite2DCell(void);
+
+  /// Test write() with 3D mesh and vertex data.
+  void testWrite3DVertex(void);
+
+  /// Test write() with 3D mesh and cell data.
+  void testWrite3DCell(void);
+
+  // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+  /** Check Xmdf file against archived file.
+   *
+   * @param filename Name of file to check.
+   */
+  static
+  void _checkFile(const char* filename);
+  
+}; // class TestXdmf
+
+#endif // pylith_meshio_testxdmf_hh
+
+// End of file 



More information about the CIG-COMMITS mailing list