[cig-commits] r21509 - short/3D/PyLith/trunk/libsrc/pylith/topology

brad at geodynamics.org brad at geodynamics.org
Tue Mar 12 12:34:43 PDT 2013


Author: brad
Date: 2013-03-12 12:34:42 -0700 (Tue, 12 Mar 2013)
New Revision: 21509

Modified:
   short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc
   short/3D/PyLith/trunk/libsrc/pylith/topology/MeshVisitor.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/MeshVisitor.icc
   short/3D/PyLith/trunk/libsrc/pylith/topology/Stratum.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/Stratum.icc
   short/3D/PyLith/trunk/libsrc/pylith/topology/SubMeshVisitor.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/SubMeshVisitor.icc
   short/3D/PyLith/trunk/libsrc/pylith/topology/topologyfwd.hh
Log:
Improved visitors (no longer templates).

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.hh	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.hh	2013-03-12 19:34:42 UTC (rev 21509)
@@ -35,7 +35,6 @@
 // CoordsVisitor ----------------------------------------------------------
 /** @brief Helper class for accessing coordinates in a finite-element mesh.
  */
-template<typename mesh_type>
 class pylith::topology::CoordsVisitor
 { // CoordsVisitor
   friend class TestCoordsVisitor; // unit testing
@@ -44,7 +43,7 @@
 public :
 
   /// Default constructor (includes initialization).
-  CoordsVisitor(const mesh_type& mesh);
+  CoordsVisitor(const PetscDM& dmMesh);
 
   /// Default destructor
   ~CoordsVisitor(void);
@@ -98,9 +97,7 @@
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private :
 
-  const mesh_type& _mesh;
-
-  PetscDM _dm; ///< Cached PETSc dm for mesh.
+  const PetscDM _dm; ///< Cached PETSc dm for mesh.
   PetscVec _localVec; ///< Cached local PETSc Vec.
   PetscSection _section; ///< Cached PETSc section.
   PetscScalar* _localArray; ///< Cached local array.

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc	2013-03-12 19:34:42 UTC (rev 21509)
@@ -24,15 +24,14 @@
 
 // ----------------------------------------------------------------------
 // Default constructor.
-template<typename mesh_type>
 inline
-pylith::topology::CoordsVisitor<mesh_type>::CoordsVisitor(const mesh_type& mesh) :
-  _mesh(mesh),
+pylith::topology::CoordsVisitor::CoordsVisitor(const PetscDM& dmMesh) :
+  _dm(dmMesh),
   _section(NULL),
   _localVec(NULL),
   _localArray(NULL)
 { // constructor
-  _dm = mesh.dmMesh();assert(_dm);
+  assert(_dm);
   PetscErrorCode err;
   err = DMPlexGetCoordinateSection(_dm, &_section);CHECK_PETSC_ERROR(err);assert(_section);
   err = DMGetCoordinatesLocal(_dm, &_localVec);CHECK_PETSC_ERROR(err);assert(_localVec);
@@ -41,9 +40,8 @@
 
 // ----------------------------------------------------------------------
 // Default destructor
-template<typename mesh_type>
 inline
-pylith::topology::CoordsVisitor<mesh_type>::~CoordsVisitor(void)
+pylith::topology::CoordsVisitor::~CoordsVisitor(void)
 { // destructor
   if (_localArray) {
     assert(_localVec);
@@ -56,20 +54,18 @@
 
 // ----------------------------------------------------------------------
 // Get the local coordinates array associated with the local PETSc Vec.
-template<typename mesh_type>
 inline
 PetscScalar*
-pylith::topology::CoordsVisitor<mesh_type>::localArray(void) const
+pylith::topology::CoordsVisitor::localArray(void) const
 { // localArray
   return _localArray;
 } // localArray
 
 // ----------------------------------------------------------------------
 // Get fiber dimension of coordinates for point.
-template<typename mesh_type>
 inline
 PetscInt
-pylith::topology::CoordsVisitor<mesh_type>::sectionDof(const PetscInt point) const
+pylith::topology::CoordsVisitor::sectionDof(const PetscInt point) const
 { // sectionDof
   assert(_section);
   PetscInt dof;
@@ -79,10 +75,9 @@
 
 // ----------------------------------------------------------------------
 // Get offset into coordinates array for point.
-template<typename mesh_type>
 inline
 PetscInt
-pylith::topology::CoordsVisitor<mesh_type>::sectionOffset(const PetscInt point) const
+pylith::topology::CoordsVisitor::sectionOffset(const PetscInt point) const
 { // sectionOffset
   assert(_section);
   PetscInt offset;
@@ -92,11 +87,10 @@
 
 // ----------------------------------------------------------------------
 // Get coordinates array associated with closure.
-template<typename mesh_type>
 void
-pylith::topology::CoordsVisitor<mesh_type>::getClosure(PetscScalar** coordsCell,
-						       PetscInt* coordsSize,
-						       const PetscInt cell) const
+pylith::topology::CoordsVisitor::getClosure(PetscScalar** coordsCell,
+					    PetscInt* coordsSize,
+					    const PetscInt cell) const
 { // getClosure
   assert(_dm);
   assert(_section);
@@ -105,17 +99,11 @@
 } // getClosure
 
 // ----------------------------------------------------------------------
-  /** Restore coordinates array associated with closure.
-   *
-   * @param coordsCell Array of coordinates for cell.
-   * @param coordsSize Size of coordinates array.
-   * @param cell Finite-element cell.
-   */
-template<typename mesh_type>
+// Restore coordinates array associated with closure.
 void
-pylith::topology::CoordsVisitor<mesh_type>::restoreClosure(PetscScalar** coordsCell,
-							   PetscInt* coordsSize,
-							   const PetscInt cell) const
+pylith::topology::CoordsVisitor::restoreClosure(PetscScalar** coordsCell,
+						PetscInt* coordsSize,
+						const PetscInt cell) const
 { // restoreClosure
   assert(_dm);
   assert(_section);

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/MeshVisitor.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/MeshVisitor.hh	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/MeshVisitor.hh	2013-03-12 19:34:42 UTC (rev 21509)
@@ -37,7 +37,6 @@
 /** @brief Helper class for accessing field values at points in a
  *  finite-element mesh.
  */
-template<typename field_type>
 class pylith::topology::MeshVisitor
 { // MeshVisitor
   friend class TestMeshVisitor; // unit testing
@@ -45,14 +44,27 @@
 // PUBLIC METHODS ///////////////////////////////////////////////////////
 public :
 
-  /// Default constructor.
-  MeshVisitor(const field_type& field);
+  /** Constructor with field over a mesh.
+   *
+   * @param field Field over a mesh.
+   */
+  MeshVisitor(const Field<Mesh>& field);
 
+  /** Constructor with field over a submesh.
+   *
+   * @param field Field over a submesh.
+   */
+  MeshVisitor(const Field<SubMesh>& field);
+
   /// Default destructor
   ~MeshVisitor(void);
 
-  /// Initialize cached data.
-  void initialize(void);
+  /** Initialize using field over a mesh or submesh.
+   *
+   * @param field Field over a mesh/submesh.
+   */
+  template<typename field_type>
+  void initialize(const field_type& field);
 
   /// Clear cached data.
   void clear(void);
@@ -128,8 +140,6 @@
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private :
 
-  const field_type& _field;
-
   PetscDM _dm; ///< Cached PETSc dm for mesh.
   PetscVec _localVec; ///< Cached local PETSc Vec.
   PetscSection _section; ///< Cached PETSc section.

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/MeshVisitor.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/MeshVisitor.icc	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/MeshVisitor.icc	2013-03-12 19:34:42 UTC (rev 21509)
@@ -23,20 +23,25 @@
 #include "pylith/utils/petscerror.h" // USES CHECK_PETSC_ERROR
 
 // ----------------------------------------------------------------------
-// Default constructor.
-template<typename field_type>
+// Constructor with field over a mesh.
 inline
-pylith::topology::MeshVisitor<field_type>::MeshVisitor(const field_type& field) :
-  _field(field)
+pylith::topology::MeshVisitor::MeshVisitor(const Field<Mesh>& field)
 { // constructor
-  initialize();
+  initialize<Field<Mesh> >(field);
 } // constructor
 
 // ----------------------------------------------------------------------
+// Constructor with field over a submesh.
+inline
+pylith::topology::MeshVisitor::MeshVisitor(const Field<SubMesh>& field)
+{ // constructor
+  initialize<Field<SubMesh> >(field);
+} // constructor
+
+// ----------------------------------------------------------------------
 // Default destructor
-template<typename field_type>
 inline
-pylith::topology::MeshVisitor<field_type>::~MeshVisitor(void)
+pylith::topology::MeshVisitor::~MeshVisitor(void)
 { // destructor
   clear();
 } // destructor
@@ -46,21 +51,20 @@
 template<typename field_type>
 inline
 void
-pylith::topology::MeshVisitor<field_type>::initialize(void)
+pylith::topology::MeshVisitor::initialize(const field_type& field)
 { // initialize
-  _dm = _field.mesh().dmMesh();assert(_dm);
-  _section = _field.petscSection();assert(_section);
-  _localVec = _field.localVector();assert(_localVec);
+  _dm = field.mesh().dmMesh();assert(_dm);
+  _section = field.petscSection();assert(_section);
+  _localVec = field.localVector();assert(_localVec);
 
   PetscErrorCode err = VecGetArray(_localVec, &_localArray);CHECK_PETSC_ERROR(err);
 } // initialize
 
 // ----------------------------------------------------------------------
 // Default destructor
-template<typename field_type>
 inline
 void
-pylith::topology::MeshVisitor<field_type>::clear(void)
+pylith::topology::MeshVisitor::clear(void)
 { // clear
   assert(_localVec);
   PetscErrorCode err = VecRestoreArray(_localVec, &_localArray);CHECK_PETSC_ERROR(err);
@@ -73,20 +77,18 @@
 
 // ----------------------------------------------------------------------
 // Get the local coordinates array associated with the local PETSc Vec.
-template<typename field_type>
 inline
 PetscScalar*
-pylith::topology::MeshVisitor<field_type>::localArray(void) const
+pylith::topology::MeshVisitor::localArray(void) const
 { // localArray
   return _localArray;
 } // localArray
 
 // ----------------------------------------------------------------------
 // Get fiber dimension of coordinates for point.
-template<typename field_type>
 inline
 PetscInt
-pylith::topology::MeshVisitor<field_type>::sectionDof(const PetscInt point) const
+pylith::topology::MeshVisitor::sectionDof(const PetscInt point) const
 { // sectionDof
   assert(_section);
   PetscInt dof;
@@ -96,10 +98,9 @@
 
 // ----------------------------------------------------------------------
 // Get offset into coordinates array for point.
-template<typename field_type>
 inline
 PetscInt
-pylith::topology::MeshVisitor<field_type>::sectionOffset(const PetscInt point) const
+pylith::topology::MeshVisitor::sectionOffset(const PetscInt point) const
 { // sectionOffset
   assert(_section);
   PetscInt offset;
@@ -109,11 +110,10 @@
 
 // ----------------------------------------------------------------------
 // Get coordinates array associated with closure.
-template<typename field_type>
 void
-pylith::topology::MeshVisitor<field_type>::getClosure(PetscScalar** valuesCell,
-						      PetscInt* valuesSize,
-						      const PetscInt cell) const
+pylith::topology::MeshVisitor::getClosure(PetscScalar** valuesCell,
+					  PetscInt* valuesSize,
+					  const PetscInt cell) const
 { // getClosure
   assert(_dm);
   assert(_section);
@@ -128,11 +128,10 @@
  * @param coordsSize Size of coordinates array.
  * @param cell Finite-element cell.
  */
-template<typename field_type>
 void
-pylith::topology::MeshVisitor<field_type>::restoreClosure(PetscScalar** valuesCell,
-							  PetscInt* valuesSize,
-							  const PetscInt cell) const
+pylith::topology::MeshVisitor::restoreClosure(PetscScalar** valuesCell,
+					      PetscInt* valuesSize,
+					      const PetscInt cell) const
 { // restoreClosure
   assert(_dm);
   assert(_section);
@@ -142,12 +141,11 @@
 
 // ----------------------------------------------------------------------
 // Set values associated with closure.
-template<typename field_type>
 void
-pylith::topology::MeshVisitor<field_type>::setClosure(const PetscScalar* valuesCell,
-						      const PetscInt valuesSize,
-						      const PetscInt cell,
-						      const InsertMode mode) const
+pylith::topology::MeshVisitor::setClosure(const PetscScalar* valuesCell,
+					  const PetscInt valuesSize,
+					  const PetscInt cell,
+					  const InsertMode mode) const
 { // setClosure
   assert(_dm);
   assert(_section);

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Stratum.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Stratum.hh	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Stratum.hh	2013-03-12 19:34:42 UTC (rev 21509)
@@ -35,7 +35,6 @@
 
 // Stratum --------------------------------------------------------
 /// Height or depth stratum.
-template<typename mesh_type>
 class pylith::topology::Stratum
 { // Stratum
   friend class TestStratum; // unit testing
@@ -54,11 +53,11 @@
 
   /** Default constructor.
    *
-   * @param mesh Finite-element mesh.
+   * @param dmMesh PETSc DM for finite-element mesh.
    * @param stype Type of stratum [HEIGHT, DEPTH].
    * @param level Height of depth of stratum.
    */
-  Stratum(const mesh_type& mesh,
+  Stratum(const PetscDM dmMesh,
 	  const StratumEnum stype,
 	  const int level);
 
@@ -94,7 +93,6 @@
 
 // StratumIS ------------------------------------------------------------
 /// Index set associated with stratum (usually over label of points).
-template<typename mesh_type>
 class pylith::topology::StratumIS
 { // StratumIS
   friend class TestStratumIS; // unit testing
@@ -104,11 +102,11 @@
 
   /** Default constructor.
    *
-   * @param mesh Finite-element mesh.
+   * @param dmMesh PETSc DM for finite-element mesh.
    * @param label Label for stratum.
    * @param id Value of label defining stratum.
    */
-  StratumIS(const mesh_type& mesh,
+  StratumIS(const PetscDM dmMesh,
 	    const char* label,
 	    const int id);
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Stratum.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Stratum.icc	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Stratum.icc	2013-03-12 19:34:42 UTC (rev 21509)
@@ -24,13 +24,12 @@
 
 // ----------------------------------------------------------------------
 // Default constructor.
-template<typename mesh_type>
 inline
-pylith::topology::Stratum<mesh_type>::Stratum(const mesh_type& mesh,
-					      const StratumEnum stype,
-					      const int level)
+pylith::topology::Stratum::Stratum(const PetscDM dmMesh,
+				   const StratumEnum stype,
+				   const int level)
 { // constructor
-  PetscDM dmMesh = mesh.dmMesh();assert(dmMesh);
+  assert(dmMesh);
   PetscErrorCode err = 0;
   switch(stype) {
   case HEIGHT:
@@ -48,9 +47,8 @@
 
 // ----------------------------------------------------------------------
 // Default destructor
-template<typename mesh_type>
 inline
-pylith::topology::Stratum<mesh_type>::~Stratum(void)
+pylith::topology::Stratum::~Stratum(void)
 { // destructor
   _begin = 0;
   _end = 0;
@@ -58,30 +56,27 @@
 
 // ----------------------------------------------------------------------
 // Get starting point.
-template<typename mesh_type>
 inline
 PetscInt
-pylith::topology::Stratum<mesh_type>::begin(void) const
+pylith::topology::Stratum::begin(void) const
 { // begin
   return _begin;
 } // begin
 
 // ----------------------------------------------------------------------
 // Get ending point.
-template<typename mesh_type>
 inline
 PetscInt
-pylith::topology::Stratum<mesh_type>::end(void) const
+pylith::topology::Stratum::end(void) const
 { // end
   return _end;
 } // end
 
 // ----------------------------------------------------------------------
 // Get number of points in stratum.
-template<typename mesh_type>
 inline
 PetscInt
-pylith::topology::Stratum<mesh_type>::size(void) const
+pylith::topology::Stratum::size(void) const
 { // size
   return _end-_begin;
 } // size
@@ -89,34 +84,31 @@
 
 // ----------------------------------------------------------------------
 // Default constructor.
-template<typename mesh_type>
 inline
-pylith::topology::StratumIS<mesh_type>::StratumIS(const mesh_type& mesh,
-						  const char* label,
-						  const int id)
+pylith::topology::StratumIS::StratumIS(const PetscDM dmMesh,
+				       const char* label,
+				       const int id)
 { // constructor
-  PetscDM dmMesh = mesh.dmMesh();assert(dmMesh);
+  assert(dmMesh);
   PetscErrorCode err;
   err = DMPlexGetStratumIS(dmMesh, label, id, &_indexSet);CHECK_PETSC_ERROR(err);assert(_indexSet);
-  err = ISGetSize(_indexSet, &_size);CHECK_PETSC_ERROR(err);assert(size >= 0);
-  err = ISGetIndices(_indexSet, &_points);CHECK_PETSC_ERROR(err);assert(points);
+  err = ISGetSize(_indexSet, &_size);CHECK_PETSC_ERROR(err);assert(_size >= 0);
+  err = ISGetIndices(_indexSet, &_points);CHECK_PETSC_ERROR(err);assert(_points);
 } // constructor
 
 // ----------------------------------------------------------------------
 // Default destructor.
-template<typename mesh_type>
 inline
-pylith::topology::StratumIS<mesh_type>::~StratumIS(void)
+pylith::topology::StratumIS::~StratumIS(void)
 { // destructor
   deallocate();
 } // destructor
 
 // ----------------------------------------------------------------------
 // Deallocate PETSc data structures.
-template<typename mesh_type>
 inline
 void
-pylith::topology::StratumIS<mesh_type>::deallocate(void)
+pylith::topology::StratumIS::deallocate(void)
 { // deallocate
   PetscErrorCode err = 0;
   err = ISRestoreIndices(_indexSet, &_points);CHECK_PETSC_ERROR(err);assert(!_points);
@@ -125,26 +117,23 @@
 
 // ----------------------------------------------------------------------
 // Get array of points.
-template<typename mesh_type>
 inline
 const PetscInt*
-pylith::topology::StratumIS<mesh_type>::points(void) const
+pylith::topology::StratumIS::points(void) const
 { // points
   return _points;
 } // points
 
 // ----------------------------------------------------------------------
 // Get number of points in index set.
-template<typename mesh_type>
 inline
 PetscInt
-pylith::topology::StratumIS<mesh_type>::size(void) const
+pylith::topology::StratumIS::size(void) const
 { // size
   return _size;
 } // size
 
 
-
 #endif
 
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/SubMeshVisitor.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/SubMeshVisitor.hh	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/SubMeshVisitor.hh	2013-03-12 19:34:42 UTC (rev 21509)
@@ -45,7 +45,6 @@
 /** @brief Helper class for accessing field values at points in a
  *  finite-element mesh.
  */
-template<typename field_type>
 class pylith::topology::SubMeshVisitor
 { // SubMeshVisitor
   friend class TestSubMeshVisitor; // unit testing
@@ -58,7 +57,7 @@
    * @param field Field associated with visitor.
    * @param submeshIS Submesh index set associated with visitor.
    */
-  SubMeshVisitor(const field_type& field,
+  SubMeshVisitor(const Field<Mesh>& field,
 		 const SubMeshIS& submeshIS);
 
   /// Default destructor
@@ -140,7 +139,7 @@
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private :
 
-  const field_type& _field;
+  const Field<Mesh>& _field;
 
   PetscDM _dm; ///< Cached PETSc dm for mesh.
   PetscVec _localVec; ///< Cached local PETSc Vec.

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/SubMeshVisitor.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/SubMeshVisitor.icc	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/SubMeshVisitor.icc	2013-03-12 19:34:42 UTC (rev 21509)
@@ -24,10 +24,9 @@
 
 // ----------------------------------------------------------------------
 // Default constructor.
-template<typename field_type>
 inline
-pylith::topology::SubMeshVisitor<field_type>::SubMeshVisitor(const field_type& field,
-							     const SubMeshIS& submeshIS) :
+pylith::topology::SubMeshVisitor::SubMeshVisitor(const Field<Mesh>& field,
+						 const SubMeshIS& submeshIS) :
   _field(field),
   _dm(NULL),
   _section(NULL),
@@ -39,19 +38,17 @@
 
 // ----------------------------------------------------------------------
 // Default destructor
-template<typename field_type>
 inline
-pylith::topology::SubMeshVisitor<field_type>::~SubMeshVisitor(void)
+pylith::topology::SubMeshVisitor::~SubMeshVisitor(void)
 { // destructor
   clear();
 } // destructor
 
 // ----------------------------------------------------------------------
 // Initialized cached data members.
-template<typename field_type>
 inline
 void
-pylith::topology::SubMeshVisitor<field_type>::initialize(const SubMeshIS& submeshIS)
+pylith::topology::SubMeshVisitor::initialize(const SubMeshIS& submeshIS)
 { // initialize
   _dm = submeshIS.submesh().dmMesh();assert(_dm);
 
@@ -66,10 +63,9 @@
 
 // ----------------------------------------------------------------------
 // Default destructor
-template<typename field_type>
 inline
 void
-pylith::topology::SubMeshVisitor<field_type>::clear(void)
+pylith::topology::SubMeshVisitor::clear(void)
 { // clear
   assert(_localVec);
   PetscErrorCode err = VecRestoreArray(_localVec, &_localArray);CHECK_PETSC_ERROR(err);assert(!_localArray);
@@ -82,20 +78,18 @@
 
 // ----------------------------------------------------------------------
 // Get the local coordinates array associated with the local PETSc Vec.
-template<typename field_type>
 inline
 PetscScalar*
-pylith::topology::SubMeshVisitor<field_type>::localArray(void) const
+pylith::topology::SubMeshVisitor::localArray(void) const
 { // localArray
   return _localArray;
 } // localArray
 
 // ----------------------------------------------------------------------
 // Get fiber dimension of coordinates for point.
-template<typename field_type>
 inline
 PetscInt
-pylith::topology::SubMeshVisitor<field_type>::sectionDof(const PetscInt point) const
+pylith::topology::SubMeshVisitor::sectionDof(const PetscInt point) const
 { // sectionDof
   assert(_section);
   PetscInt dof;
@@ -105,10 +99,9 @@
 
 // ----------------------------------------------------------------------
 // Get offset into coordinates array for point.
-template<typename field_type>
 inline
 PetscInt
-pylith::topology::SubMeshVisitor<field_type>::sectionOffset(const PetscInt point) const
+pylith::topology::SubMeshVisitor::sectionOffset(const PetscInt point) const
 { // sectionOffset
   assert(_section);
   PetscInt offset;
@@ -118,11 +111,10 @@
 
 // ----------------------------------------------------------------------
 // Get coordinates array associated with closure.
-template<typename field_type>
 void
-pylith::topology::SubMeshVisitor<field_type>::getClosure(PetscScalar** valuesCell,
-							      PetscInt* valuesSize,
-							      const PetscInt cell) const
+pylith::topology::SubMeshVisitor::getClosure(PetscScalar** valuesCell,
+					     PetscInt* valuesSize,
+					     const PetscInt cell) const
 { // getClosure
   assert(_dm);
   assert(_section);
@@ -132,11 +124,10 @@
 
 // ----------------------------------------------------------------------
 // Restore coordinates array associated with closure.
-template<typename field_type>
 void
-pylith::topology::SubMeshVisitor<field_type>::restoreClosure(PetscScalar** valuesCell,
-								  PetscInt* valuesSize,
-								  const PetscInt cell) const
+pylith::topology::SubMeshVisitor::restoreClosure(PetscScalar** valuesCell,
+						 PetscInt* valuesSize,
+						 const PetscInt cell) const
 { // restoreClosure
   assert(_dm);
   assert(_section);
@@ -146,12 +137,11 @@
 
 // ----------------------------------------------------------------------
 // Set values associated with closure.
-template<typename field_type>
 void
-pylith::topology::SubMeshVisitor<field_type>::setClosure(const PetscScalar* valuesCell,
-							      const PetscInt valuesSize,
-							      const PetscInt cell,
-							      const InsertMode mode) const
+pylith::topology::SubMeshVisitor::setClosure(const PetscScalar* valuesCell,
+					     const PetscInt valuesSize,
+					     const PetscInt cell,
+					     const InsertMode mode) const
 { // setClosure
   assert(_dm);
   assert(_section);

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/topologyfwd.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/topologyfwd.hh	2013-03-12 18:37:10 UTC (rev 21508)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/topologyfwd.hh	2013-03-12 19:34:42 UTC (rev 21509)
@@ -55,12 +55,12 @@
     class Mesh;
     class SubMesh;
     class MeshOps;
-    template<typename mesh_type> class CoordsVisitor;
-    template<typename mesh_type> class MeshVisitor;
-    template<typename mesh_type> class SubMeshVisitor;
+    class CoordsVisitor;
+    class MeshVisitor;
+    class SubMeshVisitor;
     class SubMeshIS;
-    template<typename mesh_type> class Stratum;
-    template<typename mesh_type> class StratumIS;
+    class Stratum;
+    class StratumIS;
     
     class FieldBase;
     template<typename mesh_type> class Field;



More information about the CIG-COMMITS mailing list