[cig-commits] r21581 - in short/3D/PyLith/trunk: libsrc/pylith/faults libsrc/pylith/feassemble libsrc/pylith/meshio libsrc/pylith/topology libsrc/pylith/utils modulesrc/meshio modulesrc/topology unittests/libtests/faults

brad at geodynamics.org brad at geodynamics.org
Tue Mar 19 15:13:02 PDT 2013


Author: brad
Date: 2013-03-19 15:13:02 -0700 (Tue, 19 Mar 2013)
New Revision: 21581

Removed:
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.icc
   short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.icc
   short/3D/PyLith/trunk/libsrc/pylith/topology/ISectionSpaces.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/ISectionSpaces.hh
   short/3D/PyLith/trunk/modulesrc/topology/FieldsNew.i
Modified:
   short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/QuadratureEngine.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/ExodusII.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/GMVFileAscii.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/GMVFileBinary.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/HDF5.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputManager.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/VertexFilterVecNorm.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/Xdmf.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/Jacobian.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/Makefile.am
   short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/SubMesh.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/topologyfwd.hh
   short/3D/PyLith/trunk/libsrc/pylith/utils/array.hh
   short/3D/PyLith/trunk/libsrc/pylith/utils/arrayfwd.hh
   short/3D/PyLith/trunk/modulesrc/meshio/meshio.i
   short/3D/PyLith/trunk/modulesrc/topology/Makefile.am
   short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc
Log:
Cleanup of topology code. Removed some obsolete objects.

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -37,11 +37,6 @@
 #include <sstream> // USES std::ostringstream
 
 // ----------------------------------------------------------------------
-typedef pylith::topology::SubMesh::SieveMesh SieveSubMesh;
-typedef pylith::topology::SubMesh::RealUniformSection SubRealUniformSection;
-typedef pylith::topology::Mesh::RealSection RealSection;
-
-// ----------------------------------------------------------------------
 // Default constructor.
 pylith::faults::TractPerturbation::TractPerturbation(void) :
   _parameters(0),

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/QuadratureEngine.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/QuadratureEngine.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/QuadratureEngine.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -27,7 +27,7 @@
 
 // Include directives ---------------------------------------------------
 #include "feassemblefwd.hh" // forward declaration
-#include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/array.hh" // HASA scalar_array
 
 // Quadrature0D ---------------------------------------------------------
 /// Abstract base class for quadrature computation engine.

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/ExodusII.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/ExodusII.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/ExodusII.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -28,7 +28,7 @@
 // Include directives ---------------------------------------------------
 #include "meshiofwd.hh" // Forward declarations
 
-#include "pylith/utils/array.hh" // USES string_vector
+#include "pylith/utils/arrayfwd.hh" // USES string_vector
 
 #include <string> // HASA std::string
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/GMVFileAscii.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/GMVFileAscii.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/GMVFileAscii.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -28,7 +28,7 @@
 // Include directives ---------------------------------------------------
 #include "GMVFile.hh" // ISA GMVFile
 
-#include "pylith/utils/array.hh" // USES int_array, scalar_array
+#include "pylith/utils/arrayfwd.hh" // USES int_array, scalar_array
 #include <iosfwd>
 
 // GMVFileAscii ---------------------------------------------------------

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/GMVFileBinary.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/GMVFileBinary.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/GMVFileBinary.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -28,7 +28,7 @@
 // Include directives ---------------------------------------------------
 #include "GMVFile.hh" // ISA GMVFile
 
-#include "pylith/utils/array.hh" // USES int_array, scalar_array
+#include "pylith/utils/arrayfwd.hh" // USES int_array, scalar_array
 #include <iosfwd>
 
 // GMVFileBinary --------------------------------------------------------

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/HDF5.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/HDF5.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/HDF5.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -22,7 +22,7 @@
 // Include directives ---------------------------------------------------
 #include "meshiofwd.hh" // forward declarations
 
-#include "pylith/utils/array.hh" // USES string_vector
+#include "pylith/utils/arrayfwd.hh" // USES string_vector
 
 #include <hdf5.h> // USES hid_t
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIO.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -30,9 +30,8 @@
 
 #include "pylith/topology/topologyfwd.hh" // forward declarations
 #include "spatialdata/units/unitsfwd.hh" // forward declarations
+#include "pylith/utils/arrayfwd.hh" // USES scalar_array, int_array, string_vector
 
-#include "pylith/utils/array.hh" // USES scalar_array, int_array, string_vector
-
 // MeshIO ---------------------------------------------------------------
 /// C++ abstract base class for managing mesh input/output.
 class pylith::meshio::MeshIO

Deleted: short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,293 +0,0 @@
-// -*- 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-2012 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-#include <portinfo>
-
-#include "MeshIO.hh" // MeshIOHDF5 ISA MeshIO
-#include "MeshIOHDF5.hh" // implementation of class methods
-
-#include "PetscMesh.hh"
-extern "C" {
-#include "hdf5.h" 
-}
-
-#include <stdexcept> // USES std::runtime_error
-#include <sstream> // USES std::ostringstream
-#include <cassert> // USES assert()
-
-// ----------------------------------------------------------------------
-// Constructor
-MeshIOHDF5::MeshIOHDF5(void) :
-  _filename("")
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Destructor
-MeshIOHDF5::~MeshIOHDF5(void)
-{ // destructor
-} // destructor
-
-// ----------------------------------------------------------------------
-// Read mesh from file.
-void
-MeshIOHDF5::read(ALE::Obj<ALE::PetscMesh>* pMesh)
-{ // read
-  assert(0 != pMesh);
-  const int commRank = pMesh->commRank();
-  int meshDim = 0;
-  int numDims = 0;
-  int numVertices = 0;
-  int numElements = 0;
-  int numCorners = 0;
-  PylithScalar* coordinates = 0;
-  int* elements = 0;
-
-  if (!commRank) {
-    hid_t filein = H5Fopen(_filename.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT);
-    if (filein < 0) {
-      std::ostringstream msg;
-      msg << "Could not open HDF5 mesh file '" << _filename
-          << "' for reading.\n";
-      throw std::runtime_error(msg.str());
-    } // if
-
-    _readMeshInfo(filein, pMesh);
-    _readVertices(filein, &coordinates, &numVertices, &numDims);
-    _readElements(filein, &elements, &numElements, &numCorners);
-  
-    *pMesh = ALE::PetscMesh(PETSC_COMM_WORLD, meshDim);
-    (*pMesh)->debug = true;
-    bool interpolate = false;
-
-    _buildMesh(coordinates, numVertices, spaceDim,
-               cells, numCells, numCorners, meshDim);
-    delete[] coordinates; coordinates = 0;
-    delete[] elements; elements = 0;
-
-    // loop over charts
-    // _readChart();
-
-    H5Fclose(filein);
-  } else {
-    _buildMesh(coordinates, numVertices, spaceDim,
-               cells, numCells, numCorners, meshDim);
-  }
-  //_setMaterials(materialIds);
-  //_distributeGroups();
-} // read
-
-// ----------------------------------------------------------------------
-// Write mesh to file.
-void
-MeshIOHDF5::write(const ALE::Obj<ALE::PetscMesh>& mesh) const
-{ // write
-  HDF5 fileout(_filename.c_str(), H5F_ACC_TRUNC);
-
-  try {
-    _writeMeshInfo(fileout, mesh);
-    _writeVertices(fileout, mesh);
-    _writeElements(fileout, mesh);
-
-    // LOOP OVER CHARTS
-    // _writeChart(fileout, mesh, nameIter->c_str());
-
-  } catch (std::exception& err) {
-    std::ostringstream msg;
-    msg
-      << "Error occurred while writing HDF5 file '" << _filename << "'.\n"
-      << err.what();
-    throw std::runtime_error(msg.str());
-  } catch (...) {
-    std::ostringstream msg;
-    msg
-      << "Unknown error occurred while writing HDF5 file '" 
-      << _filename << "'";
-    throw std::runtime_error(msg.str());
-  } // try/catch
-} // write
-
-// ----------------------------------------------------------------------
-// Read general mesh information.
-void
-MeshIOHDF5::_readMeshInfo(hid_t& filein,
-			  ALE::Obj<ALE::PetscMesh>* pMesh)
-{ // _readMeshInfo
-} // _readMeshInfo
-
-// ----------------------------------------------------------------------
-// Write general mesh information.
-void
-MeshIOHDF5::_writeMeshInfo(HDF5& fileout,
-			   const ALE::Obj<ALE::PetscMesh>& mesh) const
-{ // _writeMeshInfo
-  hid_t meshGroup = fileout.createGroup("/mesh");
-
-  const int dimension = mesh->getDimension();
-  fileout.createAttribute(meshGroup, "dimension", 
-			  (void*) &dimension, H5T_NATIVE_INT);
-
-  if (H5Gclose(meshGroup) < 0)
-    throw std::runtime_error("Could not close 'mesh' group. ");
-} // _writeMeshInfo
-
-// ----------------------------------------------------------------------
-// Read mesh vertices.
-void
-MeshIOHDF5::_readVertices(hid_t& filein,
-			  PylithScalar** pCoordinates,
-			  int* pNumVertices, 
-			  int* pNumDims) const
-{ // _readVertices
-  PylithScalar* coordinates = 0;
-  int numDims = 0;
-  int numVertices = 0;
-
-  // ADD STUFF HERE
-
-  if (0 != pCoordinates)
-    *pCoordinates = coordinates;
-  if (0 != pNumVertices)
-    *pNumVertices = numVertices;
-  if (0 != pNumDims)
-    *pNumDims = numDims;
-} // _readVertices
-
-// ----------------------------------------------------------------------
-// Write mesh vertices.
-void
-MeshIOHDF5::_writeVertices(HDF5& fileout,
-			   const ALE::Obj<ALE::PetscMesh>& mesh) const
-{ // _writeVertices
-  ALE::Obj<ALE::PetscMesh::field_type> coords_field = mesh->getCoordinates();
-  ALE::Obj<ALE::PetscMesh::bundle_type> vertexBundle = mesh->getBundle(0);
-  ALE::PetscMesh::field_type::patch_type patch;
-  const PylithScalar* coordinates = coords_field->restrict(patch);
-  const int numVertices = (vertexBundle->getGlobalOffsets()) ?
-    vertexBundle->getGlobalOffsets()[mesh->commSize()] :
-    mesh->getTopology()->depthStratum(0)->size();
-  const int numDims = coords_field->getFiberDimension(patch, 
-			      *mesh->getTopology()->depthStratum(0)->begin());
-
-  hid_t verticesId = fileout.createGroup("/mesh/vertices");
-  int dims[2];
-  dims[0] = numVertices;
-  dims[1] = numDims;
-  fileout.writeDataset(verticesId, "coordinates", (void*) coordinates, 
-		       dims, 2, H5T_NATIVE_DOUBLE);
-  
-  if (H5Gclose(verticesId) < 0)
-    throw std::runtime_error("Could not close 'mesh/vertices' group. ");
-} // _writeVertices
-  
-// ----------------------------------------------------------------------
-// Read mesh elements.
-void
-MeshIOHDF5::_readElements(hid_t& filein,
-			   int** pElements,
-			   int* pNumElements, 
-			   int* pNumCorners) const
-{ // _readElements
-  int* elements = 0;
-  int numElements = 0;
-  int numCorners = 0;
-  int dimension = 0;
-
-  // ADD STUFF HERE
-
-  if (0 != pElements)
-    *pElements = elements;
-  if (0 != pNumElements)
-    *pNumElements = numElements;
-  if (0 != pNumCorners)
-    *pNumCorners = numCorners;
-} // _readElements
-
-// ----------------------------------------------------------------------
-// Write mesh elements.
-void
-MeshIOHDF5::_writeElements(hid_t& fileout,
-			   const ALE::Obj<ALE::PetscMesh>& mesh) const
-{ // _writeElements
-  ALE::Obj<ALE::PetscMesh::sieve_type> topology = mesh->getTopology();
-  ALE::Obj<ALE::PetscMesh::sieve_type::traits::heightSequence> elements = 
-    topology->heightStratum(0);
-  ALE::Obj<ALE::PetscMesh::bundle_type> vertexBundle =  mesh->getBundle(0);
-  ALE::PetscMesh::bundle_type::patch_type patch;
-  std::string orderName("element");
-
-  assert(0 != topology);
-  assert(0 != elements);
-  assert(0 != vertexBundle);
-
-  int numCorners = 
-    topology->nCone(*elements->begin(), topology->depth())->size();
-  const int numElements = mesh->getTopology()->heightStratum(0)->size();
-
-  int* simplices = 
-    (numElements*numCorners > 0) ? new int[numElements*numCorners] : 0;
-  const int offset = (useIndexZero()) ? 0 : 1;
-  int index = 0;
-  for(ALE::PetscMesh::sieve_type::traits::heightSequence::iterator e_itor = 
-	elements->begin(); 
-      e_itor != elements->end();
-      ++e_itor) {
-    ALE::Obj<ALE::PetscMesh::bundle_type::order_type::coneSequence> cone = 
-      vertexBundle->getPatch(orderName, *e_itor);
-    assert(0 != cone);
-    for(ALE::PetscMesh::bundle_type::order_type::coneSequence::iterator c_itor = 
-	  cone->begin(); 
-	c_itor != cone->end(); 
-	++c_itor)
-      simplices[index++] = 
-	offset + vertexBundle->getIndex(patch, *c_itor).prefix;
-
-  hid_t elementsId = fileout.createGroup("/mesh/elements");
-  int dims[2];
-  dims[0] = numElements;
-  dims[1] = numCorners;
-  fileout.writeDataset(elementsId, "simplices", (void*) simplices, 
-		       dims, 2, H5T_NATIVE_INT);
-  
-  if (H5Gclose(elementsId) < 0)
-    throw std::runtime_error("Could not close 'mesh/vertices' group. ");
-} // _writeElements
-
-// ----------------------------------------------------------------------
-// Read mesh charts.
-void
-MeshIOHDF5::_readChart(hid_t& filein,
-		       ALE::Obj<ALE::PetscMesh>* pMesh) const
-{ // _readChart
-  std::string name = ""; // Name of chart
-  int dimension = 0; // Topology dimension associated with chart
-  int count = 0; // Number of entities in chart
-  int* indices = 0; // Indices of entities in chart
-
-} // _readChart
-
-// ----------------------------------------------------------------------
-// Write mesh chart.
-void
-MeshIOHDF5::_writeChart(hid_t& fileout,
-			 const ALE::Obj<ALE::PetscMesh>& mesh,
-			 const char* name) const
-{ // _writeChart
-} // _writeChart
-  
-// End of file 

Deleted: short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,166 +0,0 @@
-// -*- 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-2012 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-#if !defined(pylith_meshio_meshiohdf5_hh)
-#define pylith_meshio_meshiohdf5_hh
-
-#include <string> // HASA std::string
-
-namespace ALE {
-  template<typename T> class Obj;
-  class PetscMesh;
-} // ALE
-
-namespace pylith {
-  namespace meshio {
-    class MeshIO;
-    class MeshIOHDF5;
-    class HDF5; // USES HDF5
-  } // pylith
-} // meshio
-
-typedef int hid_t;
-
-class pylith::meshio::MeshIOHDF5 : public pylith::meshio::MeshIO
-{ // MeshIOHDF5
-  
-// PUBLIC METHODS -------------------------------------------------------
-public :
-
-  /// Constructor
-  MeshIOHDF5(void);
-
-  /// Destructor
-  ~MeshIOHDF5(void);
-
-  /** Set filename for HDF5 file.
-   *
-   * @param filename Name of file
-   */
-  void filename(const char* name);
-
-  /** Get filename of HDF5 file.
-   *
-   * @returns Name of file
-   */
-  const char* filename(void) const;
-
-  /** Read mesh from file.
-   *
-   * @param pMesh Pointer to PETSc mesh object
-   */
-  void read(ALE::Obj<ALE::PetscMesh>* pMesh);
-
-  /** Write mesh to file.
-   *
-   * @param mesh PETSc mesh object
-   */
-  void write(const ALE::Obj<ALE::PetscMesh>& mesh) const;
-
-// PRIVATE METHODS ------------------------------------------------------
-private :
-
-  /** Read general mesh information.
-   *
-   * @param filein HDF5 file
-   * @param pMesh Pointer to mesh
-   */
-  void _readMeshInfo(hid_t& filein,
-		     ALE::Obj<ALE::PetscMesh>* pMesh);
-
-  /** Write general mesh information.
-   *
-   * @param filein HDF5 file
-   * @param mesh PETSc mesh
-   */
-  void _writeMeshInfo(hid_t& fileout,
-		     const ALE::Obj<ALE::PetscMesh>& mesh) const;
-
-  /** Read mesh vertices.
-   *
-   * @param filein HDF5 file
-   * @param pCoordinates Pointer to array of vertex coordinates
-   * @param pNumVertices Pointer to number of vertices
-   * @param pNumDims Pointer to number of dimensions
-   */
-  void _readVertices(hid_t& filein,
-		     PylithScalar** pCoordinates,
-		     int* pNumVertices, 
-		     int* pNumDims) const;
-  
-  /** Write mesh vertices.
-   *
-   * @param fileout HDF file
-   * @param mesh PETSc mesh
-   */
-  void _writeVertices(hid_t& fileout,
-		      const ALE::Obj<ALE::PetscMesh>& mesh) const;
-  
-  /** Read mesh elements.
-   *
-   * @param filein Input stream
-   * @param pElements Pointer to array of elements (vertices in each element)
-   * @param pNumElements Pointer to number of elements
-   * @param pNumCorners Pointer to number of corners in each element
-   */
-  void _readElements(hid_t& filein,
-		     int** pElements,
-		     int* pNumElements, 
-		     int* pNumCorners) const;
-  
-  /** Write mesh elements.
-   *
-   * @param fileout HDF file
-   * @param mesh PETSc mesh
-   */
-  void _writeElements(hid_t& fileout,
-		      const ALE::Obj<ALE::PetscMesh>& mesh) const;
-
-  /** Read mesh chart.
-   *
-   * @param filein HDF5 file
-   * @param pMesh Pointer to PETSc mesh
-   */
-  void _readChart(hid_t& filein,
-		  ALE::Obj<ALE::PetscMesh>* pMesh) const;
-
-  /** Write mesh chart.
-   *
-   * @param fileout HDF5 file
-   * @param mesh PETSc mesh
-   * @param name Name of chart
-   */
-  void _writeChart(hid_t& fileout,
-		   const ALE::Obj<ALE::PetscMesh>& mesh,
-		   const char* name) const;
-
-// PRIVATE MEMBERS ------------------------------------------------------
-private :
-
-  std::string _filename; ///< Name of file
-
-}; // MeshIOHDF5
-
-#include "MeshIOHDF5.icc" // inline methods
-
-#endif // pylith_meshio_meshiohdf5_hh
-
-// version
-// $Id$
-
-// End of file 

Deleted: short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.icc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.icc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,39 +0,0 @@
-// -*- 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-2011 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-#if !defined(meshiohdf5_hh)
-#error "MeshIOHDF5.icc must be included only from MeshIOHDF5.hh"
-#else
-
-// Set filename for HDF5 file.
-inline
-void
-MeshIOHDF5::filename(const char* name) {
-  _filename = name;
-}
-
-// Get filename of HDF5 file.
-inline
-const char* 
-MeshIOHDF5::filename(void) const {
-  return _filename.c_str();
-}
-
-#endif
-
-// End of file

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputManager.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputManager.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputManager.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -256,16 +256,11 @@
       _fields = new topology::Fields<field_type>(fieldIn.mesh());
     
     if (!_fields->hasField(fieldName.c_str())) {
-      ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-      logger.stagePush("Output");
-
       _fields->add(fieldName.c_str(), fieldIn.label());
       field_type& fieldOut = _fields->get(fieldName.c_str());
       fieldOut.cloneSection(fieldIn);
       fieldOut.vectorFieldType(fieldIn.vectorFieldType());
       fieldOut.scale(fieldIn.scale());
-
-      logger.stagePop();
     } // if
     field_type& fieldOut = _fields->get(fieldName.c_str());
     fieldOut.copy(fieldIn);

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/VertexFilterVecNorm.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/VertexFilterVecNorm.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/VertexFilterVecNorm.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -91,8 +91,6 @@
   err = PetscSectionGetDof(sectionIn, vStart, &fiberDimIn);CHECK_PETSC_ERROR(err);
 
   // Allocation field if necessary
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("OutputFields");
   if (0 == _fieldVecNorm) {
     _fieldVecNorm = new field_type(fieldIn.mesh());
     _fieldVecNorm->label("vector norm");
@@ -120,7 +118,6 @@
 	throw std::logic_error("Bad vector field type in VertexFilterVecNorm.");
       } // switch
   } // if
-  logger.stagePop();
 
   PetscSection sectionNorm = _fieldVecNorm->petscSection();
   Vec          vecNorm     = _fieldVecNorm->localVector();

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/Xdmf.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/Xdmf.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/Xdmf.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -38,7 +38,7 @@
 // Include directives ---------------------------------------------------
 #include "meshiofwd.hh" // forward declarations
 
-#include "pylith/utils/array.hh" // USES scalar_array, std::vector
+#include "pylith/utils/arrayfwd.hh" // USES scalar_array, std::vector
 
 #include <vector> // USES std::vector
 #include <fstream> // HASA std::ofstream

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -261,14 +261,14 @@
 } // newSection
 
 // ----------------------------------------------------------------------
-// Create sieve section and set chart and fiber dimesion for a list of
+// Create PETSc section and set chart and fiber dimesion for a list of
 // points.
 template<typename mesh_type>
 void
 pylith::topology::Field<mesh_type>::newSection(const int_array& points,
                                                const int fiberDim)
 { // newSection
-  typedef typename mesh_type::SieveMesh::point_type point_type;
+  typedef PetscInt point_type;
   PetscErrorCode err;
 
   // Clear memory
@@ -281,8 +281,6 @@
     throw std::runtime_error(msg.str());
   } // if
   
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Field");
   const PetscInt npts = points.size();
   if (npts > 0) {
     PetscSection s = NULL;
@@ -306,11 +304,10 @@
     err = PetscSectionSetChart(s, 0, 0);CHECK_PETSC_ERROR(err);
   } // if/else
 
-  logger.stagePop();
 } // newSection
 
 // ----------------------------------------------------------------------
-// Create sieve section and set chart and fiber dimesion for a list of
+// Create PETSc section and set chart and fiber dimesion for a list of
 // points.
 template<typename mesh_type>
 void
@@ -329,8 +326,6 @@
     throw std::runtime_error(msg.str());
   } // if
   
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Field");
   if (num > 0) {
     PetscSection s = NULL;
     PetscInt pointMin = 0, pointMax = 0;
@@ -353,11 +348,10 @@
     err = PetscSectionSetChart(s, 0, 0);CHECK_PETSC_ERROR(err);
   } // if/else
 
-  logger.stagePop();
 } // newSection
 
 // ----------------------------------------------------------------------
-// Create sieve section and set chart and fiber dimesion.
+// Create PETSc section and set chart and fiber dimesion.
 template<typename mesh_type>
 void
 pylith::topology::Field<mesh_type>::newSection(const DomainEnum domain,
@@ -391,7 +385,7 @@
 } // newSection
 
 // ----------------------------------------------------------------------
-// Create sieve section and set chart and fiber dimesion.
+// Create PETSc section and set chart and fiber dimesion.
 template<typename mesh_type>
 void
 pylith::topology::Field<mesh_type>::newSection(const PetscInt pStart, const PetscInt pEnd,
@@ -422,9 +416,6 @@
   clear();
   assert(_dm);assert(src._dm);
 
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Field");
-
   if (fiberDim < 0) {
     std::ostringstream msg;
     msg << "Fiber dimension (" << fiberDim << ") for field '" << _metadata["default"].label
@@ -445,7 +436,6 @@
     err = PetscSectionSetDof(s, p, fiberDim);CHECK_PETSC_ERROR(err);
   }
 
-  logger.stagePop();
 } // newSection
 
 // ----------------------------------------------------------------------
@@ -459,9 +449,6 @@
   // Clear memory
   clear();
 
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Field");
-
   _metadata["default"] = const_cast<Field&>(src)._metadata["default"];
   label(origLabel.c_str());
 
@@ -528,7 +515,6 @@
       _scatters[s_iter->first] = sinfo;
     } // for
   } // if
-  logger.stagePop();
 } // cloneSection
 
 // ----------------------------------------------------------------------
@@ -537,25 +523,18 @@
 void
 pylith::topology::Field<mesh_type>::clear(void)
 { // clear
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Field");
-
   deallocate();
   _metadata["default"].scale = 1.0;
   _metadata["default"].vectorFieldType = OTHER;
   _metadata["default"].dimsOkay = false;
-
-  logger.stagePop();
 } // clear
 
 // ----------------------------------------------------------------------
-// Allocate Sieve section.
+// Allocate PETSc section.
 template<typename mesh_type>
 void
 pylith::topology::Field<mesh_type>::allocate(void)
 { // allocate
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Field");
   PetscSection   s = NULL;
   PetscErrorCode err;
 
@@ -570,7 +549,6 @@
   err = PetscObjectSetName((PetscObject) _globalVec, _metadata["default"].label.c_str());CHECK_PETSC_ERROR(err);
   err = PetscObjectSetName((PetscObject) _localVec,  _metadata["default"].label.c_str());CHECK_PETSC_ERROR(err);
 
-  logger.stagePop();
 } // allocate
 
 // ----------------------------------------------------------------------
@@ -618,8 +596,6 @@
 pylith::topology::Field<mesh_type>::complete(void)
 { // complete
   assert(_dm);
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Completion");
   // Not sure if DMLocalToLocal() would work
   PetscErrorCode err;
 
@@ -628,7 +604,6 @@
   err = DMLocalToGlobalEnd(_dm, _localVec, ADD_VALUES, _globalVec);CHECK_PETSC_ERROR(err);
   err = DMGlobalToLocalBegin(_dm, _globalVec, INSERT_VALUES, _localVec);CHECK_PETSC_ERROR(err);
   err = DMGlobalToLocalEnd(_dm, _globalVec, INSERT_VALUES, _localVec);CHECK_PETSC_ERROR(err);
-  logger.stagePop();
 } // complete
 
 // ----------------------------------------------------------------------
@@ -692,7 +667,7 @@
   if ((pStart != qStart) || (pEnd != qEnd)) {
     std::ostringstream msg;
 
-    msg << "Cannot copy values from Sieve section "
+    msg << "Cannot copy values from PETSc section "
 	<< _metadata["default"].label << "'. Sections are incompatible.\n"
 	<< "  Source section:\n"
     << "    chart: ["<<pStart<<","<<pEnd<<")\n"
@@ -875,7 +850,7 @@
 // ----------------------------------------------------------------------
 // Create PETSc vector scatter for field. This is used to transfer
 // information from the "global" PETSc vector view to the "local"
-// Sieve section view.
+// PETSc section view.
 template<typename mesh_type>
 template<typename scatter_mesh_type>
 void
@@ -893,8 +868,6 @@
     return;
   } // if
 
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("GlobalOrder");
   PetscInt localSize, globalSize;
 
   err = PetscObjectReference((PetscObject) _dm);CHECK_PETSC_ERROR(err);
@@ -907,13 +880,12 @@
   sinfo.vector = _globalVec;
   sinfo.dm     = _dm;
   
-  logger.stagePop();
 } // createScatter
 
 // ----------------------------------------------------------------------
 // Create PETSc vector scatter for field. This is used to transfer
 // information from the "global" PETSc vector view to the "local"
-// Sieve section view. The PETSc vector does not contain constrained
+// PETSc section view. The PETSc vector does not contain constrained
 // DOF. Use createScatterWithBC() to include the constrained DOF in
 // the PETSc vector.
 template<typename mesh_type>
@@ -937,8 +909,6 @@
     return;
   } // if
 
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("GlobalOrder");
   PetscInt localSize, globalSize;
 
   err = PetscObjectReference((PetscObject) _dm);CHECK_PETSC_ERROR(err);
@@ -961,13 +931,12 @@
 	    << std::endl;
 #endif
   
-  logger.stagePop();
 } // createScatter
 
 // ----------------------------------------------------------------------
 // Create PETSc vector scatter for field. This is used to transfer
 // information from the "global" PETSc vector view to the "local"
-// Sieve section view. The PETSc vector does not contain constrained
+// PETSc section view. The PETSc vector does not contain constrained
 // DOF. Use createScatterWithBC() to include the constrained DOF in
 // the PETSc vector.
 template<typename mesh_type>
@@ -987,9 +956,6 @@
     return;
   } // if
 
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("GlobalOrder");
-
   PetscSection section, newSection, gsection;
   PetscSF      sf;
 
@@ -1009,13 +975,12 @@
   //assert(order->getLocalSize()  == localSize);
   //assert(order->getGlobalSize() == globalSize);
 
-  logger.stagePop();
 } // createScatterWithBC
 
 // ----------------------------------------------------------------------
 // Create PETSc vector scatter for field. This is used to transfer
 // information from the "global" PETSc vector view to the "local"
-// Sieve section view. The PETSc vector includes constrained DOF. Use
+// PETSc section view. The PETSc vector includes constrained DOF. Use
 // createScatter() if constrained DOF should be omitted from the PETSc
 // vector.
 template<typename mesh_type>
@@ -1117,7 +1082,7 @@
   /* assert(order->getGlobalSize() == globalSize); */
   if (subSection) {err = PetscSectionDestroy(&subSection);CHECK_PETSC_ERROR(err);}
 #if 0
-  std::cout << "["<<sieveMesh->commRank()<<"] CONTEXT: " << context 
+  std::cout << "["<<mesh.commRank()<<"] CONTEXT: " << context 
 	    << ", orderLabel: " << orderLabel
 	    << ", section size w/BC: " << _section->sizeWithBC()
 	    << ", section size: " << _section->size()

Deleted: short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,377 +0,0 @@
-// -*- 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-2012 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-#include <portinfo>
-
-#include <sstream> // USES std::ostringstream
-#include <stdexcept> // USES std::runtime_error
-
-// ----------------------------------------------------------------------
-// Default constructor.
-template<typename mesh_type>
-pylith::topology::FieldsNew<mesh_type>::FieldsNew(const mesh_type& mesh) :
-  _mesh(mesh)
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Destructor.
-template<typename mesh_type>
-pylith::topology::FieldsNew<mesh_type>::~FieldsNew(void)
-{ // destructor
-  deallocate();
-} // destructor
-
-// ----------------------------------------------------------------------
-// Deallocate PETSc and local data structures.
-template<typename mesh_type>
-void
-pylith::topology::FieldsNew<mesh_type>::deallocate(void)
-{ // deallocate
-  if (!_section.isNull())
-    _section->clear();
-
-  const typename map_type::const_iterator fieldsEnd = _fields.end();
-  for (typename map_type::iterator f_iter = _fields.begin(); 
-       f_iter != fieldsEnd;
-       ++f_iter) {
-    delete f_iter->second.field; f_iter->second.field = 0;
-  } // for
-} // deallocate
-
-// ----------------------------------------------------------------------
-// Add field.
-template<typename mesh_type>
-void
-pylith::topology::FieldsNew<mesh_type>::add(const char* name,
-					  const char* label,
-					  const int fiberDim,
-					  const FieldBase::VectorFieldEnum vectorFieldType,
-					  const PylithScalar scale,
-					  const bool dimsOkay)
-{ // add
-  if (hasField(name)) {
-    std::ostringstream msg;
-    msg << "Could not add field '" << name
-	<< "' to fields manager, because it already exists.";
-    throw std::runtime_error(msg.str());
-  } // if
-
-  // Set metadata
-  FieldInfo info;
-  info.metadata.label = label;
-  info.metadata.vectorFieldType = vectorFieldType;
-  info.metadata.scale = scale;
-  info.metadata.dimsOkay = dimsOkay;
-  
-  // Set fibration and fiber dimension
-  info.fibration = _fields.size();
-  info.fiberDim = fiberDim;
-  int sindex = 0;
-  const typename map_type::const_iterator fieldsEnd = _fields.end();
-  for (typename map_type::iterator f_iter=_fields.begin();
-       f_iter != fieldsEnd;
-       ++f_iter)
-    sindex += f_iter->second.fiberDim;
-  info.sindex = sindex;
-
-  info.field = 0;
-
-  _fields[name] = info;
-} // add
-
-// ----------------------------------------------------------------------
-// Create and allocate Sieve section.
-template<typename mesh_type>
-void
-pylith::topology::FieldsNew<mesh_type>::allocate(const ALE::Obj<typename mesh_type::SieveMesh::label_sequence>& points)
-{ // allocate
-  typedef typename mesh_type::SieveMesh::point_type point_type;
-  typedef typename mesh_type::SieveMesh::label_sequence label_sequence;
-
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Fields");
-
-  // Set fiber dimension
-  const int dim = fiberDim();
-  assert(dim > 0);
-  _section = new section_type(_mesh.comm(), _mesh.debug());
-  assert(!_section.isNull());
-
-  assert(!points.isNull());
-  if (points->size() > 0) {
-    const point_type pointMin = 
-      *std::min_element(points->begin(), points->end());
-    const point_type pointMax = 
-      *std::max_element(points->begin(), points->end());
-    _section->setChart(typename section_type::chart_type(pointMin, pointMax+1));
-    const typename label_sequence::const_iterator pointsEnd = points->end();
-    for (typename label_sequence::const_iterator p_iter = points->begin();
-	 p_iter != pointsEnd;
-	 ++p_iter)
-      _section->setFiberDimension(*p_iter, dim);
-    
-  } else // Create empty chart
-    _section->setChart(typename section_type::chart_type(0, 0));
-
-  // Set spaces
-  const typename map_type::const_iterator fieldsEnd = _fields.end();
-  for (typename map_type::iterator f_iter=_fields.begin();
-       f_iter != fieldsEnd;
-       ++f_iter)
-    _section->addSpace();
-  for (typename map_type::iterator f_iter=_fields.begin();
-       f_iter != fieldsEnd;
-       ++f_iter)
-    _section->spaceFiberDimension(f_iter->second.fibration, 
-				  f_iter->second.fiberDim);
-  // Allocate section
-  const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = _mesh.sieveMesh();
-  assert(!sieveMesh.isNull());
-  sieveMesh->allocate(_section);
-
-  logger.stagePop();
-} // allocate
-
-// ----------------------------------------------------------------------
-// Create and allocate Sieve section.
-template<typename mesh_type>
-void
-pylith::topology::FieldsNew<mesh_type>::allocate(const int_array& points)
-{ // allocate
-  typedef typename mesh_type::SieveMesh::point_type point_type;
-
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Field");
-
-  // Set fiber dimension
-  const int dim = fiberDim();
-  assert(dim > 0);
-  _section = new section_type(_mesh.comm(), _mesh.debug());
-  assert(!_section.isNull());
-
-  const int npts = points.size();
-  if (npts > 0) {
-    const point_type pointMin = points.min();
-    const point_type pointMax = points.max();
-    _section->setChart(typename section_type::chart_type(pointMin, pointMax+1));
-    for (int i=0; i < npts; ++i)
-      _section->setFiberDimension(points[i], dim);
-
-  } else  // create empty chart
-    _section->setChart(typename section_type::chart_type(0, 0));
-
-  // Set spaces
-  const typename map_type::const_iterator fieldsEnd = _fields.end();
-  for (typename map_type::iterator f_iter=_fields.begin();
-       f_iter != fieldsEnd;
-       ++f_iter)
-    _section->addSpace();
-  for (typename map_type::iterator f_iter=_fields.begin();
-       f_iter != fieldsEnd;
-       ++f_iter)
-    _section->spaceFiberDimension(f_iter->second.fibration, 
-				  f_iter->second.fiberDim);
-
-  // Allocate section
-  const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = _mesh.sieveMesh();
-  assert(!sieveMesh.isNull());
-  sieveMesh->allocate(_section);
-
-  logger.stagePop();
-} // allocate
-
-// ----------------------------------------------------------------------
-// Create and allocate Sieve section.
-template<typename mesh_type>
-void
-pylith::topology::FieldsNew<mesh_type>::allocate(const FieldBase::DomainEnum domain,
-					       const int stratum)
-{ // allocate
-  const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = _mesh.sieveMesh();
-  assert(!sieveMesh.isNull());
-
-  ALE::Obj<typename mesh_type::SieveMesh::label_sequence> points;
-  if (FieldBase::VERTICES_FIELD == domain)
-    points = sieveMesh->depthStratum(stratum);
-  else if (FieldBase::CELLS_FIELD == domain)
-    points = sieveMesh->heightStratum(stratum);
-  else {
-    std::cerr << "Unknown value for DomainEnum: " << domain << std::endl;
-    assert(0);
-    throw std::logic_error("Bad domain enum in Field.");
-  } // else
-
-  allocate(points);
-} // allocate
-
-// ----------------------------------------------------------------------
-// Get field.
-template<typename mesh_type>
-pylith::topology::Field<mesh_type>&
-pylith::topology::FieldsNew<mesh_type>::get(const char* name)
-{ // get
-  typename map_type::iterator f_iter = _fields.find(name);
-  if (f_iter == _fields.end()) {
-    std::ostringstream msg;
-    msg << "Could not find field '" << name
-	<< "' in fields manager for retrieval.";
-    throw std::runtime_error(msg.str());
-  } // if
-  const int fibration = f_iter->second.fibration;
-  assert(fibration >= 0 && fibration < _fields.size());
-
-  if (!f_iter->second.field) {
-    delete f_iter->second.field; f_iter->second.field = 0;
-    f_iter->second.field = new Field<mesh_type>(_mesh, f_iter->second.metadata);
-      //new Field<mesh_type>(_mesh, _section->getFibration(fibration), f_iter->second.metadata);
-    assert(0 != f_iter->second.field);
-  } // if
-  return *f_iter->second.field;
-} // get
-
-// ----------------------------------------------------------------------
-// Compute total fiber dimension for section.
-template<typename mesh_type>
-int
-pylith::topology::FieldsNew<mesh_type>::fiberDim(void) const
-{ // fiberDim
-  int fiberDim = 0;
-  const typename map_type::const_iterator fieldsEnd = _fields.end();
-  for (typename map_type::const_iterator f_iter=_fields.begin();
-       f_iter != fieldsEnd;
-       ++f_iter)
-    fiberDim += f_iter->second.fiberDim;
-
-  if (fiberDim < 0) {
-    std::ostringstream msg;
-    msg << "Fiber dimension (" << fiberDim << ") for Fields object must "
-	<< "be nonnegative.";
-    throw std::runtime_error(msg.str());
-  } // if
-
-
-  return fiberDim;
-} // fiberDim
-
-// ----------------------------------------------------------------------
-// Get index of first value of field in section.
-template<typename mesh_type>
-int
-pylith::topology::FieldsNew<mesh_type>::sectionIndex(const char* name) const
-{ // sectionIndex
-  typename map_type::const_iterator f_iter = _fields.find(name);
-  if (f_iter == _fields.end()) {
-    std::ostringstream msg;
-    msg << "Could not find field '" << name
-	<< "' in fields manager for retrieval of section index.";
-    throw std::runtime_error(msg.str());
-  } // if
-
-  return f_iter->second.sindex;
-} // sectionIndex
-
-// ----------------------------------------------------------------------
-// Get fiber dimension of field in section.
-template<typename mesh_type>
-int
-pylith::topology::FieldsNew<mesh_type>::sectionFiberDim(const char* name) const
-{ // sectionFiberDim
-  typename map_type::const_iterator f_iter = _fields.find(name);
-  if (f_iter == _fields.end()) {
-    std::ostringstream msg;
-    msg << "Could not find field '" << name
-	<< "' in fields manager for retrieval of section index.";
-    throw std::runtime_error(msg.str());
-  } // if
-
-  return f_iter->second.fiberDim;
-} // sectionFiberDim
-
-// ----------------------------------------------------------------------
-// Complete section by assembling across processors.
-template<typename mesh_type>
-void
-pylith::topology::FieldsNew<mesh_type>::complete(void)
-{ // complete
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Completion");
-
-  const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = _mesh.sieveMesh();
-  assert(!sieveMesh.isNull());
-  
-  if (!_section.isNull())
-    ALE::Completion::completeSectionAdd(sieveMesh->getSendOverlap(),
-					sieveMesh->getRecvOverlap(), 
-					_section, _section);
-
-  logger.stagePop();
-} // complete
-
-// ----------------------------------------------------------------------
-// Get names of all fields
-template<typename mesh_type>
-void
-pylith::topology::FieldsNew<mesh_type>::fieldNames(int *numNames, 
-						   char*** names) const
-{ // fieldNames
-  assert(numNames);
-  assert(names);
-
-  *numNames = _fields.size();
-  *names = new char*[_fields.size()];
-  assert(*names);
-  const typename map_type::const_iterator namesEnd = _fields.end();
-  int i = 0;
-  for (typename map_type::const_iterator name = _fields.begin(); 
-       name != namesEnd;
-       ++name) {
-    const char len = name->first.length();
-    char* newName = 0;
-    if (len > 0) {
-      newName = new char[len+1];
-      strncpy(newName, name->first.c_str(), len+1);
-    } else {
-      newName = new char[1];
-      newName[0] ='\0';
-    } // if/else
-    (*names)[i++] = newName;
-  } // for
-} // fieldNames
-
-// ----------------------------------------------------------------------
-// View fields and section.
-template<typename mesh_type>
-void
-pylith::topology::FieldsNew<mesh_type>::view(const char* label)
-{ // view
-  std::cout << "Fields '" << label << "':\n";
-  const typename map_type::const_iterator fieldsEnd = _fields.end();
-  for (typename map_type::const_iterator f_iter = _fields.begin();
-       f_iter != fieldsEnd;
-       ++f_iter)
-    std::cout << "  Field: " << f_iter->first
-	      << ", fibration: " << f_iter->second.fibration
-	      << ", fiber dim: " << f_iter->second.fiberDim
-	      << ", first value index: " << f_iter->second.sindex
-	      << std::endl;
-  _section->view("Section");
-} // view
-
-
-// End of file 

Deleted: short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,208 +0,0 @@
-// -*- 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-2012 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-/**
- * @file libsrc/topology/Fields.hh
- *
- * @brief Set of real fields over a finite-element mesh. All fields are
- * associated with the same points. We use uniform sections so the
- * fiber dimension is set at compile time.
- */
-
-#if !defined(pylith_topology_fieldsnew_hh)
-#define pylith_topology_fieldsnew_hh
-
-// Include directives ---------------------------------------------------
-#include "topologyfwd.hh" // forward declarations
-
-#include "pylith/topology/FieldBase.hh" // USES FieldBase::Metadata
-
-#include <string> // USES std::string
-
-// Fields ---------------------------------------------------------------
-/// Container for managing multiple fields over a finite-element mesh.
-template<typename mesh_type>
-class pylith::topology::FieldsNew
-{ // Fields
-  friend class TestFieldsNewMesh; // unit testing
-  friend class TestFieldsNewSubMesh; // unit testing
-
-// PUBLIC TYPEDEFS //////////////////////////////////////////////////////
-public:
-
-  // Convenience typedefs
-  typedef typename mesh_type::RealUniformSection section_type;
-
-  typedef ALE::ISieveVisitor::RestrictVisitor<section_type> RestrictVisitor;
-  typedef ALE::ISieveVisitor::UpdateAddVisitor<section_type> UpdateAddVisitor;
-  typedef ALE::ISieveVisitor::UpdateAllVisitor<section_type> UpdateAllVisitor;
-
-// PUBLIC MEMBERS ///////////////////////////////////////////////////////
-public :
-
-  /** Default constructor.
-   *
-   * @param mesh Finite-element mesh.
-   */
-  FieldsNew(const mesh_type& mesh);
-
-  /// Destructor.
-  virtual
-  ~FieldsNew(void);
-
-  /// Deallocate PETSc and local data structures.
-  virtual
-  void deallocate(void);
-  
-  /** Check if fields contains a given field.
-   *
-   * @param name Name of field.
-   * @return True if fields contains field, false otherwise.
-   */
-  bool hasField(const char* name) const;
-
-  /** Add field.
-   *
-   * @param name Name of field.
-   * @param label Label for field.
-   * @param fiberDim Fiber dimension for field.
-   */
-  void add(const char* name,
-	   const char* label,
-	   const int fiberDim,
-	   FieldBase::VectorFieldEnum vectorFieldType =FieldBase::OTHER,
-	   const PylithScalar scale =1.0,
-	   const bool dimsOkay =false);
-
-  /** Create and allocate Sieve section.
-   *
-   * @param points Points over which to define section.
-   */
-  void allocate(const ALE::Obj<typename mesh_type::SieveMesh::label_sequence>& points);
-
-  /** Create and allocate Sieve section.
-   *
-   * @param points Points over which to define section.
-   */
-  void allocate(const int_array& points);
-
-  /** Create and allocate Sieve section.
-   *
-   * @param domain Type of points over which to define section.
-   * @param stratum Stratum depth (for vertices) and height (for cells).
-   */
-  void allocate(const FieldBase::DomainEnum domain,
-		const int stratum =0);
-
-  /** Get field.
-   *
-   * @param name Name of field.
-   * @returns Field.
-   */
-  Field<mesh_type>& get(const char* name);
-	   
-  /** Get mesh associated with fields.
-   *
-   * @returns Finite-element mesh.
-   */
-  const mesh_type& mesh(void) const;
-
-  /** Get section containing fields.
-   *
-   * @returns Sieve section
-   */
-  const ALE::Obj<section_type>& section(void) const;
-
-  /** Compute total fiber dimension for section.
-   *
-   * @returns Fiber dimension.
-   */
-  int fiberDim(void) const;
-
-  /** Get index of first value of field in section.
-   *
-   * @param name Name of field.
-   * @returns Index of first value of field in section.
-   */
-  int sectionIndex(const char* name) const;
-
-  /** Get fiber dimension of field in section.
-   *
-   * @param name Name of field.
-   * @returns Fiber dimension of field in section.
-   */
-  int sectionFiberDim(const char* name) const;
-
-  /// Complete section by assembling across processors.
-  void complete(void);
-
-  /** Return the names of all fields.
-   *
-   * @param numNames Number of fields,
-   * @param names Names of fields.
-   */
-  void fieldNames(int* numNames,
-		  char*** names) const;
-
-  /** View fields and section.
-   *
-   * @param label Label for fields.
-   */
-  void view(const char* label);
-
-// PROTECTED STRUCTS ////////////////////////////////////////////////////
-protected :
-
-  struct FieldInfo {
-    FieldBase::Metadata metadata; ///< Metadata for field.
-    Field<mesh_type>* field; ///< Single field.
-    int fiberDim; ///< Fiber dimension of field.
-    int fibration;  ///< Index of fibration associated with field.
-    int sindex; ///< Index of first value of field in section.
-  }; // FieldInfo
-
-// PROTECTED TYPEDEFS ///////////////////////////////////////////////////
-protected :
-
-  typedef std::map<std::string, FieldInfo> map_type;
-
-// PROTECTED METHODS ////////////////////////////////////////////////////
-protected :
-
-// PROTECTED MEMBERS ////////////////////////////////////////////////////
-protected :
-
-  map_type _fields; ///< Fields without constraints over a common set of points.
-  ALE::Obj<section_type> _section; ///< Section containing fields.
-  const mesh_type& _mesh; ///< Mesh associated with fields.
-
-// NOT IMPLEMENTED //////////////////////////////////////////////////////
-private :
-
-  FieldsNew(const FieldsNew&); ///< Not implemented
-  const FieldsNew& operator=(const FieldsNew&); ///< Not implemented
-
-}; // FieldsNew
-
-#include "FieldsNew.icc"
-#include "FieldsNew.cc"
-
-#endif // pylith_topology_fieldsnew_hh
-
-
-// End of file 

Deleted: short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.icc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/FieldsNew.icc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,49 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-//                           Brad T. Aagaard
-//                        U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_topology_fieldsnew_hh)
-#error "FieldsNew.icc must be included only from FieldsNew.hh"
-#endif
-
-// ----------------------------------------------------------------------
-// Check if fields contains a given field.
-template<typename mesh_type>
-inline
-bool
-pylith::topology::FieldsNew<mesh_type>::hasField(const char* name) const
-{ // hasField
-  typename map_type::const_iterator iter = _fields.find(name);
-  return iter != _fields.end();
-} // hasField
-
-// ----------------------------------------------------------------------
-// Get mesh associated with fields.
-template<typename mesh_type>
-inline
-const mesh_type&
-pylith::topology::FieldsNew<mesh_type>::mesh(void) const
-{ // mesh
-  return _mesh;
-} // mesh
-
-// ----------------------------------------------------------------------
-// Get section containing fields.
-template<typename mesh_type>
-inline
-const ALE::Obj<typename pylith::topology::FieldsNew<mesh_type>::section_type>& 
-pylith::topology::FieldsNew<mesh_type>::section(void) const
-{ // section
-  return _section;
-} // section
-
-
-// End of file 

Deleted: short/3D/PyLith/trunk/libsrc/pylith/topology/ISectionSpaces.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/ISectionSpaces.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/ISectionSpaces.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,204 +0,0 @@
-// -*- 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-2012 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-#include <portinfo>
-
-#include <cassert> // USES assert()
-
-// ----------------------------------------------------------------------
-// Default constructor.
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::ISectionSpaces(MPI_Comm comm,
-										     const int debug) :
-  ALE::ISection<point_type, value_type, alloc_type>(comm, debug)
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Constructor with communicator and max/min for chart.
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::ISectionSpaces(MPI_Comm comm,
-		 const point_type& min,
-		 const point_type& max,
-										     const int debug) :
-  ALE::ISection<point_type, value_type, alloc_type>(comm, min, max, debug)
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Constructor with atlas.
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::ISectionSpaces(const ALE::Obj<atlas_type>& atlas) :
-  ALE::ISection<point_type, value_type, alloc_type>(atlas)
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Destructor.
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::~ISectionSpaces(void)
-{ // destructor
-} // destructor
-
-// ----------------------------------------------------------------------
-// Return only the values associated to this point, not its closure
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-const typename pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::value_type*
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::restrictPoint(const point_type& p)
-{ // restrictPoint
-  return ALE::ISection<point_type, value_type, alloc_type>::restrictPoint(p);
-} // restrictPoint
-
-// ----------------------------------------------------------------------
-// Return only the values associated to this point, not its closure
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-void
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::restrictPoint(const point_type& p,
-		     value_type* const values,
-		     const int size)
-{ // restrictPoint
-  assert(values);
-
-  assert(this->_array);
-  if (this->hasPoint(p)) {
-    const int fiberDim = this->getFiberDimension(p);
-    assert(size == fiberDim);
-    const value_type* valuesPoint = this->restrictPoint(p);
-    for (int i=0; i < fiberDim; ++i)
-      values[i] = valuesPoint[i];
-  } // if/else
-} // restrictPoint
-
-// ----------------------------------------------------------------------
-// Get number of spaces.
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-int 
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::getNumSpaces(void) const
-{ // getNumSpaces
-  return _spaces.size();
-} // getNumSpaces
-
-// ----------------------------------------------------------------------
-// Add space.
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-void 
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::addSpace(void)
-{ // addSpace
-  _spaces.resize(getNumSpaces()+1);
-} // addSPace
-  
-// ----------------------------------------------------------------------
-// Set fiber dimension of space.
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-void
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::spaceFiberDimension(const int space,
-											const int fiberDim)
-{ // setFiberDimension
-  assert(space >= 0 && space < _spaces.size());
-  assert(fiberDim > 0);
-  _spaces[space] = fiberDim;
-} // setFiberDimension
-  
-// ----------------------------------------------------------------------
-// Get field associated with space.
-template<typename point_type, 
-	 typename value_type, 
-	 typename alloc_type>
-ALE::Obj<ALE::IGeneralSection<point_type, value_type, alloc_type> >
-pylith::topology::ISectionSpaces<point_type, value_type, alloc_type>::getFibration(const int space)
-{ // getFibration
-  assert(space >= 0 && space < _spaces.size());
-
-  typedef typename ALE::IGeneralSection<point_type, value_type, alloc_type>::chart_type IGeneralSection_chart_type;
-  typedef typename ALE::IGeneralSection<point_type, value_type, alloc_type>::atlas_type IGeneralSection_atlas_type;
-
-  ALE::Obj<ALE::IGeneralSection<point_type, value_type, alloc_type> > field =
-    new ALE::IGeneralSection<point_type, value_type, alloc_type>(this->comm(),
-							    this->debug());
-  assert(!field.isNull());
-  field->setChart(this->getChart());
-  const chart_type& chart = this->getChart();
-
-  // Copy sizes
-  const int fiberDim = _spaces[space];
-  const typename chart_type::const_iterator chartEnd = chart.end();
-  for(typename chart_type::const_iterator c_iter = chart.begin();
-      c_iter != chartEnd;
-      ++c_iter) {
-    if (this->getFiberDimension(*c_iter) > 0)
-      field->setFiberDimension(*c_iter, fiberDim);
-  } // for
-  field->allocateStorage();
-  ALE::Obj<IGeneralSection_atlas_type> newAtlas = 
-    new IGeneralSection_atlas_type(this->comm(), this->debug());
-  assert(!newAtlas.isNull());
-  const IGeneralSection_chart_type& newChart = field->getChart();
-
-  // Compute relative offset for space
-  int offsetSpace = 0;
-  for (int i=0; i < space; ++i)
-    offsetSpace += _spaces[i];
-
-  // Copy offsets
-  const ALE::Obj<atlas_type>& thisAtlas = this->getAtlas();
-  assert(!thisAtlas.isNull());
-  newAtlas->setChart(newChart);
-  newAtlas->allocatePoint();
-  const typename IGeneralSection_chart_type::const_iterator newChartEnd =
-    newChart.end();
-  typename ALE::IGeneralSection<point_type, value_type, alloc_type>::index_type idx;
-  for (typename IGeneralSection_chart_type::const_iterator c_iter=newChart.begin();
-       c_iter != newChartEnd;
-       ++c_iter) {
-    if (this->getFiberDimension(*c_iter) > 0) {
-      idx.prefix = fiberDim;
-      const int c_offset = thisAtlas->restrictPoint(*c_iter)[0].index;
-      idx.index  = c_offset + offsetSpace;
-    } else {
-      idx.prefix = 0;
-      idx.index = 0;
-    } // if/else
-    newAtlas->addPoint(*c_iter);
-    newAtlas->updatePoint(*c_iter, &idx);
-  } // for
-  field->replaceStorage(this->_array, true, this->sizeWithBC());
-  field->setAtlas(newAtlas);
-
-  return field;
-} // getFibration
-
-
-// End of file 

Deleted: short/3D/PyLith/trunk/libsrc/pylith/topology/ISectionSpaces.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/ISectionSpaces.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/ISectionSpaces.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,146 +0,0 @@
-// -*- 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-2012 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-/**
- * @file libsrc/topology/ISectionSpaces.hh
- *
- * @brief Extend ALE::ISection to include spaces.
- */
-
-#if !defined(pylith_topology_isectionspaces_hh)
-#define pylith_topology_isectionspaces_hh
-
-// Include directives ---------------------------------------------------
-#include "topologyfwd.hh" // forward declarations
-#include "pylith/utils/array.hh" // HASA int_array
-
-#include "IField.hh" // ISA ISection
-
-// ISectionSpaces -------------------------------------------------------
-/// Extend ALE::ISection to include spaces.
-template<typename Point_, 
-	 typename Value_, 
-	 typename Alloc_ =ALE::malloc_allocator<Value_> >
-class pylith::topology::ISectionSpaces : 
-  public ALE::ISection<Point_, Value_, Alloc_>
-{ // ISectionFields
-
-// PUBLIC TYPEDEFS //////////////////////////////////////////////////////
-public :
-
-  typedef ALE::ISection<Point_, Value_, Alloc_> base;
-  typedef typename base::point_type point_type;
-  typedef typename base::value_type value_type;
-  typedef typename base::alloc_type alloc_type;
-  typedef typename base::index_type index_type;
-  typedef typename base::atlas_type atlas_type;
-  typedef typename base::chart_type chart_type;
-
-// PUBLIC MEMBERS ///////////////////////////////////////////////////////
-public :
-
-  /** Default constructor.
-   *
-   * @param comm MPI communicator.
-   * @param debug Debugging flag.
-   */
-  ISectionSpaces(MPI_Comm comm,
-		 const int debug =0);
-
-  /** Constructor with communicator and max/min for chart.
-   *
-   * @param comm MPI communicator.
-   * @param min Minimum point for chart.
-   * @param max Maximum point for chart.
-   * @param debug Debugging flag.
-   */ 
-  ISectionSpaces(MPI_Comm comm,
-		 const point_type& min,
-		 const point_type& max,
-		 const int debug =0);
-
-  /** Constructor with atlas.
-   *
-   * @param atlas Atlas for section.
-   */
-  ISectionSpaces(const ALE::Obj<atlas_type>& atlas);
-
-  /// Destructor.
-  virtual
-  ~ISectionSpaces(void);
-
-  /** Return only the values associated to this point, not its closure
-   *
-   * @param p Point associated with values.
-   * @returns Values at point.
-   */
-  const value_type* restrictPoint(const point_type& p);
-
-  /** Return only the values associated to this point, not its closure
-   *
-   * @param p Point associated with values.
-   * @param values Array in which to store values.
-   * @param size Size of array.
-   */
-  void restrictPoint(const point_type& p,
-		     value_type* const values,
-		     const int size);
-
-  /** Get number of spaces.
-   *
-   * @returns Number of spaces.
-   */
-  int getNumSpaces(void) const;
-
-  /// Add space.
-  void addSpace();
-  
-  /** Set fiber dimension of space.
-   *
-   * @param space Space identifier (index).
-   * @param fiberDim Fiberdimension of space.
-   */
-  void spaceFiberDimension(const int space,
-			   const int fiberDim);
-  
-  /** Get field associated with space.
-   *
-   * @param fibration Index of space.
-   */
-  ALE::Obj<ALE::IGeneralSection<Point_, Value_, Alloc_> >
-    getFibration(const int space);
-  
-// PROTECTED MEMBERS ////////////////////////////////////////////////////
-protected :
-
-  int_array _spaces; ///< Fiber dimensions of spaces.
-
-// NOT IMPLEMENTED //////////////////////////////////////////////////////
-private :
-
-  ISectionSpaces(const ISectionSpaces&); ///< Not implemented
-  const ISectionSpaces& operator=(const ISectionSpaces&); ///< Not implemented
-
-}; // ISectionSpaces
-
-#include "ISectionSpaces.cc"
-
-#endif // pylith_topology_isectionspaces_hh
-
-
-// End of file 

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Jacobian.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Jacobian.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Jacobian.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -34,18 +34,14 @@
   _matrix(0),
   _valuesChanged(true)
 { // constructor
-  DM dmMesh = field.dmMesh();
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Jacobian");
+  PetscDM dmMesh = field.dmMesh();assert(dmMesh);
 
   // Set blockFlag to -1 if okay to set block size equal to fiber
   // dimension, otherwise use a block size of 1.
   const int blockFlag = (blockOkay) ? -1 : 1;
 
-  PetscErrorCode err = DMCreateMatrix(dmMesh, matrixType, &_matrix);
-  CHECK_PETSC_ERROR_MSG(err, "Could not create PETSc sparse matrix "
-			"associated with system Jacobian.");
-  logger.stagePop();
+  const char* msg = "Could not create PETSc sparse matrix associated with system Jacobian.";
+  PetscErrorCode err = DMCreateMatrix(dmMesh, matrixType, &_matrix);CHECK_PETSC_ERROR_MSG(err, msg);
 
   _type = matrixType;
 } // constructor
@@ -58,18 +54,14 @@
   _matrix(0),
   _valuesChanged(true)
 { // constructor
-  DM dmMesh = field.dmMesh();
-  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
-  logger.stagePush("Jacobian");
+  PetscDM dmMesh = field.dmMesh();assert(dmMesh);
 
   // Set blockFlag to -1 if okay to set block size equal to fiber
   // dimension, otherwise use a block size of 1.
   const int blockFlag = (blockOkay) ? -1 : 1;
 
-  PetscErrorCode err = DMCreateMatrix(dmMesh, matrixType, &_matrix);
-  CHECK_PETSC_ERROR_MSG(err, "Could not create PETSc sparse matrix "
-      "associated with subsystem Jacobian.");
-  logger.stagePop();
+  const char* msg = "Could not create PETSc sparse matrix associated with subsystem Jacobian.";
+  PetscErrorCode err = DMCreateMatrix(dmMesh, matrixType, &_matrix);CHECK_PETSC_ERROR_MSG(err, msg);
 
   _type = matrixType;
 } // constructor
@@ -120,10 +112,8 @@
 { // assemble
   PetscErrorCode err = 0;
   if (0 == strcmp(mode, "final_assembly")) {
-    err = MatAssemblyBegin(_matrix, MAT_FINAL_ASSEMBLY); 
-    CHECK_PETSC_ERROR(err);
-    err = MatAssemblyEnd(_matrix, MAT_FINAL_ASSEMBLY);
-    CHECK_PETSC_ERROR(err);
+    err = MatAssemblyBegin(_matrix, MAT_FINAL_ASSEMBLY);CHECK_PETSC_ERROR(err);
+    err = MatAssemblyEnd(_matrix, MAT_FINAL_ASSEMBLY);CHECK_PETSC_ERROR(err);
 
 #if 0 // DEBUGGING
     // Check for empty row
@@ -153,10 +143,8 @@
 #endif
 
   } else if (0 == strcmp(mode, "flush_assembly")) {
-    err = MatAssemblyBegin(_matrix, MAT_FLUSH_ASSEMBLY);
-    CHECK_PETSC_ERROR(err);
-    err = MatAssemblyEnd(_matrix, MAT_FLUSH_ASSEMBLY);
-    CHECK_PETSC_ERROR(err);
+    err = MatAssemblyBegin(_matrix, MAT_FLUSH_ASSEMBLY);CHECK_PETSC_ERROR(err);
+    err = MatAssemblyEnd(_matrix, MAT_FLUSH_ASSEMBLY);CHECK_PETSC_ERROR(err);
   } else
     throw std::runtime_error("Unknown mode for assembly of sparse matrix "
 			     "associated with system Jacobian.");
@@ -169,8 +157,7 @@
 void
 pylith::topology::Jacobian::zero(void)
 { // zero
-  PetscErrorCode err = MatZeroEntries(_matrix);
-  CHECK_PETSC_ERROR(err);
+  PetscErrorCode err = MatZeroEntries(_matrix);CHECK_PETSC_ERROR(err);
   _valuesChanged = true;
 } // zero
 
@@ -179,8 +166,7 @@
 void
 pylith::topology::Jacobian::view(void) const
 { // view
-  PetscErrorCode err = MatView(_matrix, PETSC_VIEWER_STDOUT_WORLD);
-  CHECK_PETSC_ERROR(err);
+  PetscErrorCode err = MatView(_matrix, PETSC_VIEWER_STDOUT_WORLD);CHECK_PETSC_ERROR(err);
 } // view
 
 // ----------------------------------------------------------------------
@@ -190,11 +176,8 @@
                                   const MPI_Comm comm)
 { // write
   PetscViewer viewer;
+  PetscErrorCode err = PetscViewerBinaryOpen(comm, filename, FILE_MODE_WRITE, &viewer);CHECK_PETSC_ERROR(err);
 
-  PetscErrorCode err = 
-    PetscViewerBinaryOpen(comm, filename, FILE_MODE_WRITE, &viewer);
-  CHECK_PETSC_ERROR(err);
-
   err = MatView(_matrix, viewer); CHECK_PETSC_ERROR(err);
   err = PetscViewerDestroy(&viewer); CHECK_PETSC_ERROR(err);
 } // write

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Makefile.am	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Makefile.am	2013-03-19 22:13:02 UTC (rev 21581)
@@ -29,9 +29,6 @@
 	Field.cc \
 	Fields.hh \
 	Fields.icc \
-	FieldsNew.hh \
-	FieldsNew.icc \
-	FieldsNew.cc \
 	Jacobian.hh \
 	Mesh.hh \
 	Mesh.icc \
@@ -48,8 +45,6 @@
 	VisitorMesh.icc \
 	VisitorSubMesh.hh \
 	VisitorSubMesh.icc \
-	ISectionSpaces.hh \
-	ISectionSpaces.cc \
 	topologyfwd.hh
 
 noinst_HEADERS =

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -30,8 +30,6 @@
 #include "spatialdata/geocoords/geocoordsfwd.hh" // forward declarations
 #include "spatialdata/units/unitsfwd.hh" // forward declarations
 
-#include "ISectionSpaces.hh" // USES ISectionSpaces
-
 #include "pylith/utils/petscfwd.h" // HASA PetscDM
 #include "pylith/utils/sievetypes.hh" // HASA pylith::SieveMesh
 
@@ -63,7 +61,6 @@
   typedef pylith::SieveSubMesh SieveSubMesh;
 
   typedef SieveMesh::real_section_type RealSection;
-  typedef ISectionSpaces<SieveMesh::point_type, PylithScalar> RealUniformSection;
   typedef SieveMesh::int_section_type IntSection;
 
   typedef ALE::ISieveVisitor::IndicesVisitor<RealSection,SieveMesh::order_type,PylithInt> IndicesVisitor;

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/SubMesh.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/SubMesh.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/SubMesh.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -54,7 +54,6 @@
 
   typedef Mesh::IntSection IntSection;
   typedef Mesh::RealSection RealSection;
-  typedef Mesh::RealUniformSection  RealUniformSection;
 
 // PUBLIC METHODS ///////////////////////////////////////////////////////
 public :

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/topologyfwd.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/topologyfwd.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/topologyfwd.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -78,9 +78,6 @@
 
     class ReverseCuthillMcKee;
 
-  template<typename point_type, 
-	   typename value_type,
-	   typename allocator> class ISectionSpaces;
   } // topology
 } // pylith
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/utils/array.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/utils/array.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/utils/array.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -28,18 +28,8 @@
 #if !defined(pylith_utils_array_hh)
 #define pylith_utils_array_hh
 
-#include "types.hh"
 #include "arrayfwd.hh"
 
-#include "sievetypes.hh" // ensure we include petscsys.h BEFORE valarray to prevent clash over isinf() and isnan().
-
-#include <vector>
-#include <valarray>
-
-namespace pylith {
-  typedef std::valarray<PylithScalar> scalar_array;
-} // namespace pylith
-
 #endif // pylith_utils_array_hh
 
 // End of file

Modified: short/3D/PyLith/trunk/libsrc/pylith/utils/arrayfwd.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/utils/arrayfwd.hh	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/libsrc/pylith/utils/arrayfwd.hh	2013-03-19 22:13:02 UTC (rev 21581)
@@ -31,6 +31,8 @@
 #if !defined(pylith_utils_arrayfwd_hh)
 #define pylith_utils_arrayfwd_hh
 
+#include "types.hh" // USES PylithScalar
+
 #include <string> // USES std::string
 
 /// Forward declaration of STL vector
@@ -48,21 +50,24 @@
   /// Alias for std::vector<int>
   typedef std::vector<int, std::allocator<int> > int_vector;
 
-  /// Alias for std::vector<PylithScalar>
+  /// Alias for std::vector<double>
   typedef std::vector<double, std::allocator<double> > double_vector;
 
   /// Alias for std::vector<std::string>
   typedef std::vector<std::string, std::allocator<std::string> > string_vector;
 
-  /// Alias for std::valarray<int>
-  typedef std::valarray<int> int_array;
-
   /// Alias for std::valarray<float>
   typedef std::valarray<float> float_array;
 
   /// Alias for std::valarray<double>
   typedef std::valarray<double> double_array;
 
+  /// Alias for std::valarray<PylithInt>
+  typedef std::valarray<PylithInt> int_array;
+
+  /// Alias for std::valarray<PylithScalar>
+  typedef std::valarray<PylithScalar> scalar_array;
+
 } // pylith
 
 

Modified: short/3D/PyLith/trunk/modulesrc/meshio/meshio.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/meshio.i	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/modulesrc/meshio/meshio.i	2013-03-19 22:13:02 UTC (rev 21581)
@@ -24,7 +24,6 @@
 #include "pylith/meshio/MeshIO.hh"
 #include "pylith/meshio/MeshIOAscii.hh"
 #include "pylith/meshio/MeshIOLagrit.hh"
-#include "pylith/meshio/MeshIOSieve.hh"
 #if defined(ENABLE_CUBIT)
 #include "pylith/meshio/MeshIOCubit.hh"
 #endif
@@ -74,7 +73,6 @@
 %include "MeshIOObj.i"
 %include "MeshIOAscii.i"
 %include "MeshIOLagrit.i"
-%include "MeshIOSieve.i"
 #if defined(ENABLE_CUBIT)
 %include "MeshIOCubit.i"
 #endif

Deleted: short/3D/PyLith/trunk/modulesrc/topology/FieldsNew.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/topology/FieldsNew.i	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/modulesrc/topology/FieldsNew.i	2013-03-19 22:13:02 UTC (rev 21581)
@@ -1,151 +0,0 @@
-// -*- 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-2012 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-/**
- * @file modulesrc/topology/FieldsNew.i
- *
- * @brief Python interface to C++ FieldsNew object.
- */
-
-namespace pylith {
-  namespace topology {
-
-    template<typename mesh_type>
-    class FieldsNew
-    { // FieldsNew
-
-      // PUBLIC MEMBERS /////////////////////////////////////////////////
-    public :
-
-      /** Default constructor.
-       *
-       * @param mesh Finite-element mesh.
-       */
-      FieldsNew(const mesh_type& mesh);
-
-      /// Destructor.
-      virtual
-      ~FieldsNew(void);
-
-      /// Deallocate PETSc and local data structures.
-      virtual
-      void deallocate(void);
-  
-      /** Check if fields contains a given field.
-       *
-       * @param name Name of field.
-       * @return True if fields contains field, false otherwise.
-       */
-      bool hasField(const char* name) const;
-
-      /** Add field.
-       *
-       * @param name Name of field.
-       * @param label Label for field.
-       * @param fiberDim Fiber dimension for field.
-       */
-      void add(const char* name,
-	       const char* label,
-	       const int fiberDim,
-	       FieldBase::VectorFieldEnum vectorFieldType =FieldBase::OTHER,
-	       const PylithScalar scale =1.0,
-	       const bool dimsOkay =false);
-
-      /** Create and allocate Sieve section.
-       *
-       * @param points Points over which to define section.
-       */
-      void allocate(const ALE::Obj<typename mesh_type::SieveMesh::label_sequence>& points);
-
-      /** Create and allocate Sieve section.
-       *
-       * @param points Points over which to define section.
-       */
-      void allocate(const pylith::int_array& points);
-
-      /** Create and allocate Sieve section.
-       *
-       * @param domain Type of points over which to define section.
-       * @param stratum Stratum depth (for vertices) and height (for cells).
-       */
-      void allocate(const FieldBase::DomainEnum domain,
-		    const int stratum =0);
-
-      /** Get field.
-       *
-       * @param name Name of field.
-       * @returns Field.
-       */
-      Field<mesh_type>& get(const char* name);
-	   
-      /** Get mesh associated with fields.
-       *
-       * @returns Finite-element mesh.
-       */
-      const mesh_type& mesh(void) const;
-
-      /** Get section containing fields.
-       *
-       * @returns Sieve section
-       */
-      const ALE::Obj<typename mesh_type::RealUniformSection>& section(void) const;
-
-      /** Compute total fiber dimension for section.
-       *
-       * @returns Fiber dimension.
-       */
-      int fiberDim(void) const;
-
-      /** Get index of first value of field in section.
-       *
-       * @param name Name of field.
-       * @returns Index of first value of field in section.
-       */
-      int sectionIndex(const char* name) const;
-
-      /** Get fiber dimension of field in section.
-       *
-       * @param name Name of field.
-       * @returns Fiber dimension of field in section.
-       */
-      int sectionFiberDim(const char* name) const;
-
-      /// Complete section by assembling across processors.
-      void complete(void);
-
-      /** Return the names of all fields.
-       *
-       * @param numValues Number of fields,
-       * @param values Names of fields.
-       */
-      void fieldNames(int* numValues,
-		      char*** values) const;
-
-      /** View fields and section.
-       *
-       * @param label Label for fields.
-       */
-      void view(const char* label);
-
-    }; // FieldsNew
-
-  } // topology
-} // pylith
-
-
-// End of file 

Modified: short/3D/PyLith/trunk/modulesrc/topology/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/modulesrc/topology/Makefile.am	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/modulesrc/topology/Makefile.am	2013-03-19 22:13:02 UTC (rev 21581)
@@ -31,7 +31,6 @@
 	FieldBase.i \
 	Field.i \
 	Fields.i \
-	FieldsNew.i \
 	SolutionFields.i \
 	Jacobian.i \
 	Distributor.i \

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc	2013-03-19 22:04:49 UTC (rev 21580)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc	2013-03-19 22:13:02 UTC (rev 21581)
@@ -41,7 +41,6 @@
 typedef pylith::topology::Mesh::SieveMesh SieveMesh;
 typedef pylith::topology::Mesh::SieveSubMesh SieveSubMesh;
 typedef pylith::topology::Mesh::RealSection RealSection;
-typedef pylith::topology::Mesh::RealUniformSection RealUniformSection;
 
 // ----------------------------------------------------------------------
 // Test constructor.



More information about the CIG-COMMITS mailing list