[cig-commits] r14271 - in short/3D/PyLith/branches/pylith-swig: modulesrc/bc modulesrc/feassemble pylith pylith/feassemble unittests/pytests/feassemble

brad at geodynamics.org brad at geodynamics.org
Mon Mar 9 16:21:57 PDT 2009


Author: brad
Date: 2009-03-09 16:21:56 -0700 (Mon, 09 Mar 2009)
New Revision: 14271

Added:
   short/3D/PyLith/branches/pylith-swig/modulesrc/bc/AbsorbingDampers.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/CellGeometry.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/GeometryPoint1D.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Integrator.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Quadrature.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/QuadratureRefCell.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/feassemble.i
   short/3D/PyLith/branches/pylith-swig/pylith/feassemble/CellGeometry.py
   short/3D/PyLith/branches/pylith-swig/pylith/feassemble/Quadrature.py
Removed:
   short/3D/PyLith/branches/pylith-swig/pylith/feassemble/geometry/
   short/3D/PyLith/branches/pylith-swig/pylith/feassemble/quadrature/
Modified:
   short/3D/PyLith/branches/pylith-swig/modulesrc/bc/DirichletBC.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/bc/DirichletBoundary.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/bc/bc.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Constraint.i
   short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Makefile.am
   short/3D/PyLith/branches/pylith-swig/pylith/Makefile.am
   short/3D/PyLith/branches/pylith-swig/pylith/feassemble/__init__.py
   short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/Makefile.am
   short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/TestCellGeometry.py
   short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/testfeassemble.py
Log:
Worked on SWIG interfaces.

Added: short/3D/PyLith/branches/pylith-swig/modulesrc/bc/AbsorbingDampers.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/bc/AbsorbingDampers.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/bc/AbsorbingDampers.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,77 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file modulesrc/bc/AbsorbingDampers.i
+ *
+ * @brief Python interface to C++ AbsorbingDampers object.
+ */
+
+namespace pylith {
+  namespace bc {
+
+    class AbsorbingDampers : 
+      public BoundaryCondition, 
+      public pylith::feassemble::Integrator<pylith::feassemble::Quadrature<pylith::topology::SubMesh> >
+    { // class AbsorbingDampers
+
+      // PUBLIC METHODS /////////////////////////////////////////////////
+    public :
+
+      /// Default constructor.
+      AbsorbingDampers(void);
+
+      /// Destructor.
+      ~AbsorbingDampers(void);
+
+      /** Initialize boundary condition.
+       *
+       * @param mesh Finite-element mesh.
+       * @param upDir Direction perpendicular to horizontal surface tangent 
+       *   direction that is not collinear with surface normal.
+       */
+      void initialize(const pylith::topology::Mesh& mesh,
+		      const double upDir[3]);
+      
+      /** Integrate contributions to residual term (r) for operator.
+       *
+       * @param residual Field containing values for residual
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      void integrateResidual(const pylith::topology::Field<pylith::topology::Mesh>& residual,
+			     const double t,
+			     pylith::topology::SolutionFields* const fields);
+      
+      /** Integrate contributions to Jacobian matrix (A) associated with
+       * operator.
+       *
+       * @param mat Sparse matrix
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      void integrateJacobian(PetscMat* mat,
+			     const double t,
+			     pylith::topology::SolutionFields* const fields);
+      
+      /** Verify configuration is acceptable.
+       *
+       * @param mesh Finite-element mesh
+       */
+      void verifyConfiguration(const pylith::topology::Mesh& mesh) const;
+
+    }; // class AbsorbingDampers
+
+  } // bc
+} //pylith
+
+
+// End of file 

Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/bc/DirichletBC.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/bc/DirichletBC.i	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/bc/DirichletBC.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -16,10 +16,6 @@
  */
 
 namespace pylith {
-  namespace feassemble {
-    class Constraint;
-  } // feassemble
-
   namespace bc {
 
     class DirichletBC : public BoundaryCondition, 
@@ -78,13 +74,13 @@
        *
        * @param field Solution field
        */
-      void setConstraintSizes(const pylith::topology::Field& field);
+      void setConstraintSizes(const pylith::topology::Field<pylith::topology::Mesh>& field);
       
       /** Set which degrees of freedom are constrained at points in field.
        *
        * @param field Solution field
        */
-      void setConstraints(const pylith::topology::Field& field);
+      void setConstraints(const pylith::topology::Field<pylith::topology::Mesh>& field);
       
       /** Set values in field.
        *
@@ -92,7 +88,7 @@
        * @param field Solution field
        */
       void setField(const double t,
-		    const pylith::topology::Field& field);
+		    const pylith::topology::Field<pylith::topology::Mesh>& field);
       
     }; // class DirichletBC
     

Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/bc/DirichletBoundary.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/bc/DirichletBoundary.i	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/bc/DirichletBoundary.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -51,7 +51,7 @@
        *
        * @returns Field over vertices.
        */
-      const pylith::topology::FieldSubMesh&
+      const pylith::topology::Field<pylith::topology::SubMesh>&
       vertexField(const char* name,
 		  const pylith::topology::SolutionFields& fields);
       

Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/bc/bc.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/bc/bc.i	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/bc/bc.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -44,12 +44,14 @@
 %}
 
 // Interfaces
-%include "../feassemble/Constraint.i" // DirichletBC isa Constraint
+%include "../feassemble/Constraint.i" // ISA Constraint
+%include "../feassemble/Quadrature.i" // ISA Quadrature
+%include "../feassemble/Integrator.i" // ISA Integrator
 
 %include "BoundaryCondition.i"
 %include "DirichletBC.i"
 %include "DirichletBoundary.i"
+%include "AbsorbingDampers.i"
 
-
 // End of file
 

Added: short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/CellGeometry.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/CellGeometry.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/CellGeometry.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,160 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/** @file modulesrc/feassemble/CellGeometry.i
+ *
+ * @brief Python interface to C++ CellGeometry object.
+ */
+
+namespace pylith {
+  namespace feassemble {
+
+    class CellGeometry
+    { // CellGeometry
+
+      // PUBLIC ENUMS ///////////////////////////////////////////////////
+    public :
+      
+      enum ShapeEnum { 
+	POINT=0, // 0-D point cell
+	LINE=2, // 1-D line cell (2 points)
+	TRIANGLE=4, // 2-D triangular cell (3 edges)
+	QUADRILATERAL=5, // 2-D quadrilateral cell (4 edges)
+	TETRAHEDRON=16, // 3-D tetrahedral cell (4 faces)
+	HEXAHEDRON=17 // 3-D hexahedral cell (6 faces)
+      };
+
+      // PUBLIC METHODS /////////////////////////////////////////////////
+    public :
+      
+      /** Default constructor.
+       *
+       * @param shape String identifying shape of cell
+       * @param spaceDim Dimension of coordinate space.
+       */
+      CellGeometry(const ShapeEnum shape,
+		   const int spaceDim);
+      
+      /// Default destructor.
+      virtual
+      ~CellGeometry(void);
+      
+      /** Create a copy of geometry.
+       *
+       * @returns Copy of geometry.
+       */
+      virtual
+      CellGeometry* clone(void) const = 0;
+      
+      /** Get dimension of cell.
+       *
+       * @returns Spatial dimension of cell.
+       */
+      int cellDim(void) const;
+      
+      /** Get dimension of coordinate space.
+       *
+       * @returns Dimension of coordinate space.
+       */
+      int spaceDim(void) const;
+      
+      /** Get number of vertices in cell.
+       *
+       * @returns Number of vertices in cell.
+       */
+      int numCorners(void) const;
+      
+      /** Get coordinates of vertices in reference cell (dual basis).
+       *
+       * @returns Array of coordinates of vertices in reference cell
+       */
+      const pylith::double_array& vertices(void) const;
+      
+      /** Get cell geometry for lower dimension cell.
+       *
+       * @returns Pointer to cell geometry object corresponding to next
+       * lower dimension, NULL if there is no lower dimension object.
+       */
+      virtual
+      CellGeometry* geometryLowerDim(void) const = 0;
+      
+      /** Transform coordinates in reference cell to global coordinates.
+       *
+       * @param ptsGlobal Array of points in global coordinate system.
+       * @param ptsRef Array of points in reference cell.
+       * @param vertices Array of cell vertices in global coordinates.
+       * @param dim Dimension of global coordinate system.
+       * @param npts Number of points to transform.
+       */
+      virtual
+      void ptsRefToGlobal(double* ptsGlobal,
+			  const double* ptsRef,
+			  const double* vertices,
+			  const int dim,
+			  const int npts) const = 0;
+      
+      /** Compute Jacobian at location in cell.
+       *
+       * @param jacobian Jacobian at location.
+       * @param det Determinant of Jacobian at location.
+       * @param vertices Coordinates of vertices of cell.
+       * @param location Location in reference cell at which to compute Jacobian.
+       */
+      virtual
+      void jacobian(pylith::double_array* jacobian,
+		    double* det,
+		    const pylith::double_array& vertices,
+		    const pylith::double_array& location) const = 0;
+      
+      /** Compute Jacobian at location in cell.
+       *
+       * @param jacobian Jacobian at location.
+       * @param det Determinant of Jacobian at location.
+       * @param vertices Coordinates of vertices of cell.
+       * @param ptsRef Points in reference cell at which to compute Jacobian.
+       * @param dim Dimension of coordinate system.
+       * @param npts Number of points to transform.
+       */
+      virtual
+      void jacobian(double* jacobian,
+		    double* det,
+		    const double* vertices,
+		    const double* ptsRef,
+		    const int dim,
+		    const int npts) const = 0;
+      
+      /** Compute orientation of cell at location.
+       *
+       * The orientation is returned as an array of direction cosines
+       * weighted by the determinant of the Jacobian.
+       *
+       * size = spaceDim*spaceDim
+       * index = iDir*spaceDim + iComponent
+       *
+       * @param orientation Array of direction cosines (weighted by Jacobian).
+       * @param jacobian Jacobian matrix at point.
+       * @param jacobianDet Determinant of Jacobian matrix at point.
+       * @param upDir Direction perpendicular to horizontal direction that is 
+       *   not collinear with cell normal (usually "up" direction).
+       */
+      void orientation(pylith::double_array* orientation,
+		       const pylith::double_array& jacobian,
+		       const double jacobianDet,
+		       const pylith::double_array& upDir) const;
+
+    }; // CellGeometry
+
+  } // feassemble
+} // pylith
+
+
+// End of file

Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Constraint.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Constraint.i	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Constraint.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -43,14 +43,14 @@
        * @param field Solution field
        */
       virtual
-      void setConstraintSizes(const pylith::topology::Field& field) = 0;
+      void setConstraintSizes(const pylith::topology::Field<pylith::topology::Mesh>& field) = 0;
 
       /** Set which degrees of freedom are constrained at points in field.
        *
        * @param field Solution field
        */
       virtual
-      void setConstraints(const pylith::topology::Field& field) = 0;
+      void setConstraints(const pylith::topology::Field<pylith::topology::Mesh>& field) = 0;
 
       /** Set flag for setting constraints for total field solution or
        *  incremental field solution.
@@ -67,7 +67,7 @@
        */
       virtual
       void setField(const double t,
-		    const pylith::topology::Field& field) = 0;
+		    const pylith::topology::Field<pylith::topology::Mesh>& field) = 0;
       
     }; // class Constraint
 

Added: short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/GeometryPoint1D.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/GeometryPoint1D.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/GeometryPoint1D.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,94 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/** @file modulesrc/feassemble/GeometryPoint1D.i
+ *
+ * @brief Python interface to C++ GeometryPoint1D object.
+ */
+
+namespace pylith {
+  namespace feassemble {
+
+    class GeometryPoint1D : public CellGeometry
+    { // GeometryPoint1D
+
+      // PUBLIC METHODS /////////////////////////////////////////////////
+    public :
+  
+      /// Default constructor.
+      GeometryPoint1D(void);
+
+      /// Default destructor.
+      ~GeometryPoint1D(void);
+      
+      /** Create a copy of geometry.
+       *
+       * @returns Copy of geometry.
+       */
+      CellGeometry* clone(void) const;
+      
+      /** Get cell geometry for lower dimension cell.
+       *
+       * @returns Pointer to cell geometry object corresponding to next
+       * lower dimension, NULL if there is no lower dimension object.
+       */
+      CellGeometry* geometryLowerDim(void) const;
+      
+      /** Transform coordinates in reference cell to global coordinates.
+       *
+       * @param ptsGlobal Array of points in global coordinate system.
+       * @param ptsRef Array of points in reference cell.
+       * @param vertices Array of cell vertices in global coordinates.
+       * @param dim Dimension of global coordinate system.
+       * @param npts Number of points to transform.
+       */
+      void ptsRefToGlobal(double* ptsGlobal,
+			  const double* ptsRef,
+			  const double* vertices,
+			  const int dim,
+			  const int npts =1) const;
+      
+      /** Compute Jacobian at location in cell.
+       *
+       * @param jacobian Jacobian at location.
+       * @param det Determinant of Jacobian at location.
+       * @param vertices Coordinates of vertices of cell.
+       * @param location Location in reference cell at which to compute Jacobian.
+       */
+      void jacobian(pylith::double_array* jacobian,
+		    double* det,
+		    const pylith::double_array& vertices,
+		    const pylith::double_array& location) const;
+      
+      /** Compute Jacobian at location in cell.
+       *
+       * @param jacobian Jacobian at location.
+       * @param det Determinant of Jacobian at location.
+       * @param vertices Coordinates of vertices of cell.
+       * @param ptsRef Points in reference cell at which to compute Jacobian.
+       * @param dim Dimension of coordinate system.
+       * @param npts Number of points to transform.
+       */
+      void jacobian(double* jacobian,
+		    double* det,
+		    const double* vertices,
+		    const double* ptsRef,
+		    const int dim,
+		    const int npts =1) const;
+
+    }; // GeometryPoint1D
+
+  } // feassemble
+} // pylith
+
+
+// End of file

Added: short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Integrator.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Integrator.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Integrator.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,164 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file modulesrc/feassemble/Integrator.i
+ *
+ * @brief Python interface to C++ abstract Integrator object.
+ */
+
+namespace pylith {
+  namespace feassemble {
+
+    template<typename quadrature_type>
+    class Integrator
+    { // Integrator
+
+      // PUBLIC MEMBERS /////////////////////////////////////////////////
+    public :
+
+      /// Constructor
+      Integrator(void);
+      
+      /// Destructor
+      virtual
+      ~Integrator(void);
+      
+      /** Set quadrature for integrating finite-element
+       * quantities. Quadrature should already be initialized.
+       *
+       * @param q Quadrature for integrating.
+       */
+      void quadrature(const quadrature_type* q);
+      
+      /** Set manager of scales used to nondimensionalize problem.
+       *
+       * @param dim Nondimensionalizer.
+       */
+      void normalizer(const spatialdata::units::Nondimensional& dim);
+      
+      /** Set gravity field.
+       *
+       * @param g Gravity field.
+       */
+      void gravityField(spatialdata::spatialdb::GravityField* const gravityField);
+      
+      /** Set time step for advancing from time t to time t+dt.
+       *
+       * @param dt Time step
+       */
+      virtual
+      void timeStep(const double dt);
+      
+      /** Get stable time step for advancing from time t to time t+dt.
+       *
+       * Default is MAXFLOAT (or 1.0e+30 if MAXFLOAT is not defined in math.h).
+       *
+       * @returns Time step
+       */
+      virtual
+      double stableTimeStep(void) const;
+      
+      /** Check whether Jacobian needs to be recomputed.
+       *
+       * @returns True if Jacobian needs to be recomputed, false otherwise.
+       */
+      virtual
+      bool needNewJacobian(void) const;
+      
+      /** Set flag for setting constraints for total field solution or
+       *  incremental field solution.
+       *
+       * @param flag True if using incremental solution, false otherwise.
+       */
+      virtual
+      void useSolnIncr(const bool flag);
+      
+      /** Initialize integrator.
+       *
+       * @param mesh Finite-element mesh.
+       */
+      virtual
+      void initialize(const pylith::topology::Mesh& mesh);
+      
+      /** Integrate contributions to residual term (r) for operator.
+       *
+       * @param residual Field containing values for residual
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      virtual 
+      void integrateResidual(const pylith::topology::Field<pylith::topology::Mesh>& residual,
+			     const double t,
+			     pylith::topology::SolutionFields* const fields);
+
+      /** Integrate contributions to Jacobian matrix (A) associated with
+       * operator.
+       *
+       * @param jacobian Sparse matrix for Jacobian of system.
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      virtual
+      void integrateJacobian(PetscMat* jacobian,
+			     const double t,
+			     pylith::topology::SolutionFields* const fields);
+
+      /** Integrate contributions to residual term (r) for operator that
+       * do not require assembly over cells, vertices, or processors.
+       *
+       * @param residual Field containing values for residual
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      virtual 
+      void integrateResidualAssembled(const pylith::topology::Field<pylith::topology::Mesh>& residual,
+				      const double t,
+				      pylith::topology::SolutionFields* const fields);
+
+      /** Integrate contributions to Jacobian matrix (A) associated with
+       * operator that do not require assembly over cells, vertices, or
+       * processors
+       *
+       * @param jacobian Sparse matrix for Jacobian of system.
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      virtual
+      void integrateJacobianAssembled(PetscMat* jacobian,
+				      const double t,
+				      pylith::topology::SolutionFields* const fields);
+
+      /** Update state variables as needed.
+       *
+       * @param t Current time
+       * @param fields Solution fields
+       * @param mesh Finite-element mesh
+       */
+      virtual
+      void updateState(const double t,
+		       pylith::topology::SolutionFields* const fields);
+
+      /** Verify configuration is acceptable.
+       *
+       * @param mesh Finite-element mesh
+       */
+      virtual
+      void verifyConfiguration(const pylith::topology::Mesh& mesh) const = 0;
+
+
+    }; // Integrator
+
+  } // feassemble
+} // pylith
+
+
+// End of file 

Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Makefile.am	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Makefile.am	2009-03-09 23:21:56 UTC (rev 14271)
@@ -13,40 +13,45 @@
 subpackage = feassemble
 include $(top_srcdir)/subpackage.am
 
-subpkgpyexec_LTLIBRARIES = feassemblemodule.la
+subpkgpyexec_LTLIBRARIES = _feassemblemodule.la
 
-feassemblemodule_la_LDFLAGS = -module -avoid-version \
+subpkgpyexec_PYTHON = feassemble.py
+
+swig_sources = \
+	feassemble.i \
+	CellGeometry.i \
+	GeometryPoint1D.i
+
+swig_generated = \
+	feassemble_wrap.cxx \
+	feassemble.py
+
+_feassemblemodule_la_LDFLAGS = -module -avoid-version \
 	$(AM_LDFLAGS) $(PYTHON_LA_LDFLAGS)
 
-dist_feassemblemodule_la_SOURCES = feassemble.pyxe.src
-nodist_feassemblemodule_la_SOURCES = \
-	feassemble.pyxe \
-	feassemble.c feassemble_embed.cpp feassemble_embed.h
+dist__feassemblemodule_la_SOURCES = $(swig_sources) $(swig_generated)
 
-feassemblemodule_la_LIBADD = \
+_feassemblemodule_la_LIBADD = \
 	$(top_builddir)/libsrc/libpylith.la \
 	-lspatialdata \
-	$(PETSC_LIB)
-
+	$(PETSC_LIBS)
 if ENABLE_CUBIT
-  feassemblemodule_la_LIBADD += -lnetcdf_c++ -lnetcdf
+  _feassemblemodule_la_LIBADD += -lnetcdf_c++ -lnetcdf
 endif
 if NO_UNDEFINED
-  feassemblemodule_la_LIBADD += $(PYTHON_BLDLIBRARY) $(PYTHON_LIBS) $(PYTHON_SYSLIBS)
+_feassemblemodule_la_LIBADD += \
+	$(PYTHON_BLDLIBRARY) $(PYTHON_LIBS) $(PYTHON_SYSLIBS)
 endif
 
-INCLUDES += -I$(PYTHON_INCDIR) $(PETSC_INCLUDE)
+INCLUDES += $(PYTHON_EGG_CPPFLAGS) -I$(NUMPY_INCDIR) -I$(PYTHON_INCDIR) $(PETSC_INCLUDE)
 
-feassemble.pyx feassemble_embed.cpp  feassemble_embed.h: feassemble.pyxe
-	pyrexembed feassemble.pyxe
-feassemble.pyxe: $(srcdir)/feassemble.pyxe.src
-	cp $(srcdir)/feassemble.pyxe.src $@
-feassemble_embed.cpp: feassemble_embed.h
-feassemble_embed.h: feassemble.pyx
+$(srcdir)/feassemble_wrap.cxx $(srcdir)/feassemble.py: $(swig_sources)
+	$(SWIG) -Wall -c++ -python $<
 
-.pyx.c:
-	pyrexc $<
 
-CLEANFILES = feassemble.pyxe feassemble.pyx feassemble.c *_embed.*
+MAINTAINERCLEANFILES = \
+	$(srcdir)/feassemble_wrap.cxx \
+	$(srcdir)/feassemble.py
 
+
 # End of file 

Added: short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Quadrature.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Quadrature.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/Quadrature.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,151 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/**
+ * @file pylith/feassemble/Quadrature.hh
+ *
+ * @brief Abstract base class for integrating over finite-elements
+ * using quadrature.
+ *
+ * This object contains the informatio needed to perform numerical
+ * quadrature over a finite-element cell. It inherits quadrature
+ * information over the reference cell from the QuadratureRefCell object.
+
+ * Given a cell this object will compute the cell's Jacobian, the
+ * determinant of the Jacobian, the inverse of the Jacobian, and the
+ * coordinates in the domain of the cell's quadrature points. The
+ * Jacobian and its inverse are computed at the quadrature points.
+ */
+
+#if !defined(pylith_feassemble_quadrature_hh)
+#define pylith_feassemble_quadrature_hh
+
+// Include directives ---------------------------------------------------
+#include "QuadratureRefCell.hh" // ISA QuadratureRefCell
+
+#include "pylith/topology/topologyfwd.hh" // forward declarations
+
+#include "pylith/utils/array.hh" // HASA double_array
+
+// Quadrature -----------------------------------------------------------
+template<typename mesh_type>
+class pylith::feassemble::Quadrature : public QuadratureRefCell
+{ // Quadrature
+  friend class TestQuadrature; // unit testing
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+
+  /// Constructor
+  Quadrature(void);
+
+  /// Destructor
+  ~Quadrature(void);
+
+  /** Copy constructor.
+   *
+   * @param q Quadrature to copy
+   */
+  Quadrature(const Quadrature& q);
+
+  /** Set flag for checking ill-conditioning.
+   *
+   * @param flag True to check for ill-conditioning, false otherwise.
+   */
+  void checkConditioning(const bool flag);
+
+  /** Get flag for checking ill-conditioning.
+   *
+   * @returns True if checking for ill-conditioning, false otherwise.
+   */
+  bool checkConditioning(void) const;
+
+  /** Get coordinates of quadrature points in cell (NOT reference cell).
+   *
+   * @returns Array of coordinates of quadrature points in cell
+   */
+  const double_array& quadPts(void) const;
+
+  /** Get derivatives of basis fns evaluated at quadrature points.
+   *
+   * @returns Array of derivatives of basis fns evaluated at
+   * quadrature points
+   */
+  const double_array& basisDeriv(void) const;
+
+  /** Get Jacobians evaluated at quadrature points.
+   *
+   * @returns Array of Jacobian inverses evaluated at quadrature points.
+   */
+  const double_array& jacobian(void) const;
+
+  /** Get determinants of Jacobian evaluated at quadrature points.
+   *
+   * @returns Array of determinants of Jacobian evaluated at quadrature pts
+   */
+  const double_array& jacobianDet(void) const;
+
+  /** Precompute geometric quantities for each cell.
+   *
+   * @param mesh Finite-element mesh
+   * @param cells Finite-element cells for geometry.
+   */
+  void computeGeometry(const mesh_type& mesh,
+             const ALE::Obj<typename mesh_type::SieveMesh::label_sequence>& cells);
+
+  /** Retrieve precomputed geometric quantities for a cell.
+   *
+   * @param mesh Finite-element mesh
+   * @param cell Finite-element cell
+   */
+  void retrieveGeometry(const typename mesh_type::SieveMesh::point_type& cell);
+
+  /// Deallocate temporary storage.
+  void clear(void);
+
+// PRIVATE METHODS //////////////////////////////////////////////////////
+private :
+
+  /// Setup quadrature engine.
+  void _setupEngine(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private :
+
+  QuadratureEngine* _engine; ///< Quadrature geometry engine.
+
+  /** Fields and visitors for precomputing geometry information for
+   * cells associated with this quadrature.
+   */
+  topology::Field<mesh_type>* _quadPtsField; ///< Coordinates of quad pts.
+  topology::Field<mesh_type>* _jacobianField; ///< Jacobian at quad pts.
+  topology::Field<mesh_type>* _jacobianDetField; ///< |J| at quad pts.
+
+  /// Derivatives of basis fns at quad pts.
+  topology::Field<mesh_type>* _basisDerivField;
+
+  bool _checkConditioning; ///< True if checking for ill-conditioning.
+
+// NOT IMPLEMENTED //////////////////////////////////////////////////////
+private :
+
+  const Quadrature& operator=(const Quadrature&); ///< Not implemented
+
+}; // Quadrature
+
+#include "Quadrature.icc" // inline methods
+#include "Quadrature.cc" // template methods
+
+#endif // pylith_feassemble_quadrature_hh
+
+
+// End of file 

Added: short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/QuadratureRefCell.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/QuadratureRefCell.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/QuadratureRefCell.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,156 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/** @file modulesrc/feassemble/Quadrature.i
+ *
+ * @brief Python interface to C++ Quadrature object.
+ */
+
+namespace pylith {
+  namespace feassemble {
+
+    class QuadratureRefCell
+    { // Quadrature
+
+      // PUBLIC METHODS /////////////////////////////////////////////////
+    public :
+
+      /// Constructor
+      QuadratureRefCell(void);
+
+      /// Destructor
+      ~QuadratureRefCell(void);
+
+      /** Set basis functions and their derivatives, and coordinates and
+       *  weights of the quadrature points.
+       *
+       * @param basis Array of basis functions evaluated at quadrature pts
+       *   N0Qp0, N1Qp0, ...
+       *   N0Qp1, N1Qp1, ...
+       *   ...
+       *   size = numQuadPts * numBasis
+       *   index = iQuadPt*numBasis + iBasis
+       *
+       * @param basisDerivRef Array of basis function derivaties evaluated at
+       * quadrature pts, where derivatives are with respect to cell's
+       * local coordinates.
+       *   N0pQp0, N0qQp0, N0rQp0, N1pQp0, N1qQp0, N1rQp0, ... 
+       *   N0pQp1, N0qQp1, N0rQp1, N1pQp1, N1qQp1, N1rQp1, ...
+       *   ...
+       *   size = numQuadPts * numBasis * cellDim
+       *   index = iQuadPt*numBasis*cellDim + iBasis*cellDim + iDim
+       *
+       * @param quadPts Array of coordinates of quadrature points in 
+       *   reference cell
+       *   Qp0p, Qp0q, Qp0r
+       *   Qp1p, Qp1q, Qp1r
+       *   size = numQuadPts * numDims
+       *   index = iQuadPt*numDims + iDim
+       *
+       * @param quadWts Array of weights of quadrature points
+       *   WtQp0, WtQp1, ...
+       *   index = iQuadPt
+       *
+       * @param cellDim Number of dimensions in reference cell
+       * @param numBasis Number of basis functions for a cell
+       * @param numQuadPts Number of quadrature points
+       * @param spaceDim Number of dimensions in coordinates of cell vertices
+       */
+      void initialize(const double* basis,
+		      const double* basisDerivRef,
+		      const double* quadPtsRef,
+		      const double* quadWts,
+		      const int cellDim,
+		      const int numBasis,
+		      const int numQuadPts,
+		      const int spaceDim);
+      
+      /** Set geometry associated with reference cell.
+       *
+       * @param geometry Geometry of reference cell.
+       */
+      void refGeometry(CellGeometry* const geometry);
+      
+      /** Get geometry associated with reference cell.
+       *
+       * @returns Geometry of reference cell.
+       */
+      const CellGeometry& refGeometry(void) const;
+      
+      /** Set minimum allowable determinant of Jacobian.
+       *
+       * @param tolerance Minimum allowable value for Jacobian
+       */
+      void minJacobian(const double min);
+      
+      /** Get minimum allowable determinant of Jacobian.
+       *
+       * @returns Minimum allowable value for Jacobian
+       */
+      double minJacobian(void) const;
+      
+      /** Get coordinates of quadrature points in reference cell.
+       *
+       * @returns Array of coordinates of quadrature points in reference cell.
+       */
+      const double_array& quadPtsRef(void) const;
+      
+      /** Get weights of quadrature points.
+       *
+       * @returns Weights of quadrature points
+       */
+      const double_array& quadWts(void) const;
+      
+      /** Get basis fns evaluated at quadrature points.
+       *
+       * @returns Array of basis fns evaluated at quadrature points
+       */
+      const double_array& basis(void) const;
+      
+      /** Get derivates of basis fns evaluated at quadrature points.
+       *
+       * @returns Array of derivates of basis fns evaluated at
+       * quadrature points
+       */
+      const double_array& basisDerivRef(void) const;
+      
+      /** Get number of dimensions in reference cell.
+       *
+       * @returns Number of dimensions in reference cell
+       */
+      int cellDim(void) const;
+      
+      /** Get number of basis functions for cell.
+       *
+       * @returns Number of basis functions for cell
+       */
+      int numBasis(void) const;
+      
+      /** Get number of quadrature points.
+       *
+       * @returns Number of quadrature points
+       */
+      int numQuadPts(void) const;
+      
+      /** Get number of dimensions in coordinates of cell vertices.
+       *
+       * @returns Number of dimensions in coordinates of cell vertices
+       */
+      int spaceDim(void) const;
+      
+    }; // QuadratureRefCell
+
+  } // feassemble
+} // pylith
+
+
+// End of file 

Added: short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/feassemble.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/feassemble.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/feassemble/feassemble.i	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+// SWIG interface
+%module feassemble
+
+// Header files for module C++ code
+%{
+#include "pylith/feassemble/CellGeometry.hh"
+#include "pylith/feassemble/GeometryPoint1D.hh"
+
+#include "pylith/utils/arrayfwd.hh"
+%}
+
+%include "exception.i"
+%exception {
+  try {
+    $action
+  } catch (const std::exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.what());
+  } // try/catch
+ } // exception
+
+%include "typemaps.i"
+%include "../include/doublearray.i"
+
+// Numpy interface stuff
+%{
+#define SWIG_FILE_WITH_INIT
+%}
+%include "../include/numpy.i"
+%init %{
+import_array();
+%}
+
+%include "CellGeometry.i"
+%include "GeometryPoint1D.i"
+
+
+// End of file
+

Modified: short/3D/PyLith/branches/pylith-swig/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/Makefile.am	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/pylith/Makefile.am	2009-03-09 23:21:56 UTC (rev 14271)
@@ -40,29 +40,8 @@
 	feassemble/Integrator.py \
 	feassemble/IntegratorElasticity.py \
 	feassemble/ReferenceCell.py \
-	feassemble/quadrature/__init__.py \
-	feassemble/quadrature/Quadrature.py \
-	feassemble/quadrature/Quadrature0D.py \
-	feassemble/quadrature/Quadrature1D.py \
-	feassemble/quadrature/Quadrature1Din2D.py \
-	feassemble/quadrature/Quadrature1Din3D.py \
-	feassemble/quadrature/Quadrature2D.py \
-	feassemble/quadrature/Quadrature2Din3D.py \
-	feassemble/quadrature/Quadrature3D.py \
-	feassemble/geometry/__init__.py \
-	feassemble/geometry/CellGeometry.py \
-	feassemble/geometry/GeometryPoint1D.py \
-	feassemble/geometry/GeometryPoint2D.py \
-	feassemble/geometry/GeometryPoint3D.py \
-	feassemble/geometry/GeometryLine1D.py \
-	feassemble/geometry/GeometryLine2D.py \
-	feassemble/geometry/GeometryLine3D.py \
-	feassemble/geometry/GeometryTri2D.py \
-	feassemble/geometry/GeometryTri3D.py \
-	feassemble/geometry/GeometryQuad2D.py \
-	feassemble/geometry/GeometryQuad3D.py \
-	feassemble/geometry/GeometryTet3D.py \
-	feassemble/geometry/GeometryHex3D.py \
+	feassemble/Quadrature.py \
+	feassemble/CellGeometry.py \
 	materials/__init__.py \
 	materials/ElasticMaterial.py \
 	materials/ElasticIsotropic3D.py \

Copied: short/3D/PyLith/branches/pylith-swig/pylith/feassemble/CellGeometry.py (from rev 14267, short/3D/PyLith/branches/pylith-swig/pylith/feassemble/geometry/CellGeometry.py)
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/feassemble/CellGeometry.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/pylith/feassemble/CellGeometry.py	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pylith/feassemble/geometry/CellGeometry.py
+##
+## @brief Python abstract base class for geometry of a finite-element cell.
+
+# ----------------------------------------------------------------------
+# CellGeometry class
+class CellGeometry(object):
+  """
+  Python abstract base class for geometry of a finite-element cell.
+  """
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self):
+    """
+    Constructor.
+    """
+    return
+
+
+# ----------------------------------------------------------------------
+from feassemble import GeometryPoint1D as ModuleGeometryPoint1D
+
+# GeometryPoint1D class
+class GeometryPoint1D(ModuleGeometryPoint1D):
+  """
+  Python object for geometry of a 0-D finite-element cell in 1-D.
+  """
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self):
+    """
+    Constructor.
+    """
+    ModuleGeometryPoint1D.__init__(self)
+    return
+
+
+# End of file 

Copied: short/3D/PyLith/branches/pylith-swig/pylith/feassemble/Quadrature.py (from rev 14267, short/3D/PyLith/branches/pylith-swig/pylith/feassemble/quadrature/Quadrature.py)
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/feassemble/Quadrature.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-swig/pylith/feassemble/Quadrature.py	2009-03-09 23:21:56 UTC (rev 14271)
@@ -0,0 +1,133 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pylith/feassemble/quadrature/Qudrature.py
+##
+## @brief Python abstract base class for integrating over
+## finite-elements using quadrature.
+##
+## Factory: quadrature.
+
+from pyre.components.Component import Component
+
+# ----------------------------------------------------------------------
+# Quadrature class
+class Quadrature(Component):
+  """
+  Python abstract base class for integrating over finite-elements
+  using quadrature.
+
+  Factory: quadrature.
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  class Inventory(Component.Inventory):
+    """Python object for managing Quadrature facilities and properties."""
+
+    ## @class Inventory
+    ## Python object for managing Quadrature facilities and properties.
+    ##
+    ## \b Properties
+    ## @li \b min_jacobian Minimum allowable determinant of Jacobian.
+    ## @li \b check_conditoning Check element matrices for 
+    ##   ill-conditioning.
+    ##
+    ## \b Facilities
+    ## @li \b cell Reference cell with basis functions and quadrature rules
+
+    import pyre.inventory
+
+    minJacobian = pyre.inventory.float("min_jacobian", default=1.0e-06)
+    minJacobian.meta['tip'] = "Minimum allowable determinant of Jacobian."
+
+    checkConditioning = pyre.inventory.bool("check_conditioning",
+                                            default=False)
+    checkConditioning.meta['tip'] = \
+        "Check element matrices for ill-conditioning."
+
+    from pylith.feassemble.FIATSimplex import FIATSimplex
+    cell = pyre.inventory.facility("cell", family="reference_cell",
+                                   factory=FIATSimplex)
+    cell.meta['tip'] = "Reference cell with basis fns and quadrature rules."
+
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="quadrature"):
+    """
+    Constructor.
+    """
+    Component.__init__(self, name, facility="quadrature")
+    self.minJacobian = 1.0e-06
+    self.cppHandle = None
+    self.spaceDim = None
+    return
+
+
+  def preinitialize(self):
+    """
+    Setup quadrature object.
+    """
+    self._createCppHandle()
+    
+    self.cppHandle.minJacobian = self.minJacobian
+    self.cppHandle.checkConditioning = self.checkConditioning
+
+    self._info.log("Initializing reference cell.")
+    cell = self.cell
+    cell.initialize(self.spaceDim)
+
+    if cell.cellDim != self.cellDim:
+      raise TypeError("Dimension of reference cell '%d' does not match "
+                      "dimension of quadrature implementation '%d'." % \
+                      (cell.cellDim, self.cellDim))
+
+
+    self._info.log("Initializing C++ quadrature.")
+    self.cppHandle.initialize(cell.basis, cell.basisDeriv,
+                              cell.quadPts, cell.quadWts,
+                              cell.cellDim, cell.numCorners, cell.numQuadPts,
+                              self.spaceDim)
+    self.cppHandle.refGeometry = cell.geometry.cppHandle
+    return
+
+
+  def initialize(self):
+    """
+    Initialize quadrature object.
+    """
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set members based using inventory.
+    """
+    Component._configure(self)
+    self.minJacobian = self.inventory.minJacobian
+    self.checkConditioning = self.inventory.checkConditioning
+    self.cell = self.inventory.cell
+    return
+
+
+  def _createCppHandle(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    raise NotImplementedError("Please implement _createCppHandle() in " \
+                              "derived class.")
+  
+  
+# End of file 

Modified: short/3D/PyLith/branches/pylith-swig/pylith/feassemble/__init__.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/feassemble/__init__.py	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/pylith/feassemble/__init__.py	2009-03-09 23:21:56 UTC (rev 14271)
@@ -14,15 +14,16 @@
 ##
 ## @brief Python PyLith finite-element assembler module initialization
 
-__all__ = ['Constraint',
+__all__ = ['CellGeometry',
+           'Constraint',
            'ElasticityExplicit',
            'ElasticityImplicit',
            'FIATLagrange',
            'FIATSimplex',
            'IntegratorElasticity',
            'Integrator',
+           'Quadrature',
            'ReferenceCell',
-           'quadrature'
            ]
 
 

Modified: short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/Makefile.am	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/Makefile.am	2009-03-09 23:21:56 UTC (rev 14271)
@@ -29,43 +29,5 @@
 	TestElasticityExplicit.py \
 	TestElasticityImplicit.py
 
-# module
-subpkgpyexec_LTLIBRARIES = testfeassemblemodule.la
 
-testfeassemblemodule_la_LDFLAGS = -module -avoid-version \
-	$(AM_LDFLAGS) $(PYTHON_LA_LDFLAGS)
-
-dist_testfeassemblemodule_la_SOURCES = \
-	testfeassemble.pyxe.src \
-	TestQuadrature.hh \
-	TestQuadrature.icc
-
-nodist_testfeassemblemodule_la_SOURCES = \
-	testfeassemble.pyxe \
-	testfeassemble.c testfeassemble_embed.cpp testfeassemble_embed.h
-
-testfeassemblemodule_la_LIBADD = \
-	$(PETSC_LIB)
-if NO_UNDEFINED
-testfeassemblemodule_la_LIBADD += \
-	$(PYTHON_BLDLIBRARY) $(PYTHON_LIBS) $(PYTHON_SYSLIBS)
-endif
-
-INCLUDES += -I$(PYTHON_INCDIR) $(PETSC_INCLUDE)
-
-testfeassemble.pyx testfeassemble_embed.cpp  testfeassemble_embed.h: testfeassemble.pyxe
-	pyrexembed testfeassemble.pyxe
-testfeassemble.pyxe: $(srcdir)/testfeassemble.pyxe.src
-	cp $(srcdir)/testfeassemble.pyxe.src $@
-testfeassemble_embed.cpp: testfeassemble_embed.h
-testfeassemble_embed.h: testfeassemble.pyx
-
-.pyx.c:
-	pyrexc $<
-
-CLEANFILES = \
-	testfeassemble.pyxe testfeassemble.pyx testfeassemble.c *_embed.* \
-	$(am__installdirs)/testfeassemblemodule.*
-
-
 # End of file 

Modified: short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/TestCellGeometry.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/TestCellGeometry.py	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/TestCellGeometry.py	2009-03-09 23:21:56 UTC (rev 14271)
@@ -17,18 +17,7 @@
 import unittest
 import numpy
 
-from pylith.feassemble.geometry.GeometryPoint1D import GeometryPoint1D
-from pylith.feassemble.geometry.GeometryPoint2D import GeometryPoint2D
-from pylith.feassemble.geometry.GeometryPoint3D import GeometryPoint3D
-from pylith.feassemble.geometry.GeometryLine1D import GeometryLine1D
-from pylith.feassemble.geometry.GeometryLine2D import GeometryLine2D
-from pylith.feassemble.geometry.GeometryLine3D import GeometryLine3D
-from pylith.feassemble.geometry.GeometryTri2D import GeometryTri2D
-from pylith.feassemble.geometry.GeometryTri3D import GeometryTri3D
-from pylith.feassemble.geometry.GeometryQuad2D import GeometryQuad2D
-from pylith.feassemble.geometry.GeometryQuad3D import GeometryQuad3D
-from pylith.feassemble.geometry.GeometryTet3D import GeometryTet3D
-from pylith.feassemble.geometry.GeometryHex3D import GeometryHex3D
+from pylith.feassemble.CellGeometry import GeometryPoint1D
 
 
 # ----------------------------------------------------------------------
@@ -43,41 +32,9 @@
     """
     
     geometry = GeometryPoint1D()
-    self.failIfEqual(None, geometry.cppHandle)
+    self.assertEqual(0, geometry.cellDim())
+    self.assertEqual(1, geometry.spaceDim())
 
-    geometry = GeometryPoint2D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryPoint3D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryLine1D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryLine2D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryLine3D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryTri2D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryTri3D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryQuad2D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryQuad3D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryTet3D()
-    self.failIfEqual(None, geometry.cppHandle)
-
-    geometry = GeometryHex3D()
-    self.failIfEqual(None, geometry.cppHandle)
-
     return
     
 

Modified: short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/testfeassemble.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/testfeassemble.py	2009-03-09 22:45:09 UTC (rev 14270)
+++ short/3D/PyLith/branches/pylith-swig/unittests/pytests/feassemble/testfeassemble.py	2009-03-09 23:21:56 UTC (rev 14271)
@@ -63,17 +63,17 @@
     from TestFIATLagrange import TestFIATLagrange
     suite.addTest(unittest.makeSuite(TestFIATLagrange))
 
-    from TestQuadrature import TestQuadrature
-    suite.addTest(unittest.makeSuite(TestQuadrature))
+    #from TestQuadrature import TestQuadrature
+    #suite.addTest(unittest.makeSuite(TestQuadrature))
 
-    from TestIntegrator import TestIntegrator
-    suite.addTest(unittest.makeSuite(TestIntegrator))
+    #from TestIntegrator import TestIntegrator
+    #suite.addTest(unittest.makeSuite(TestIntegrator))
 
-    from TestElasticityExplicit import TestElasticityExplicit
-    suite.addTest(unittest.makeSuite(TestElasticityExplicit))
+    #from TestElasticityExplicit import TestElasticityExplicit
+    #suite.addTest(unittest.makeSuite(TestElasticityExplicit))
 
-    from TestElasticityImplicit import TestElasticityImplicit
-    suite.addTest(unittest.makeSuite(TestElasticityImplicit))
+    #from TestElasticityImplicit import TestElasticityImplicit
+    #suite.addTest(unittest.makeSuite(TestElasticityImplicit))
 
     return suite
 



More information about the CIG-COMMITS mailing list