[cig-commits] r8375 - in short/3D/PyLith/trunk: . libsrc/feassemble unittests/libtests/bc/data

brad at geodynamics.org brad at geodynamics.org
Mon Dec 3 22:53:12 PST 2007


Author: brad
Date: 2007-12-03 22:53:11 -0800 (Mon, 03 Dec 2007)
New Revision: 8375

Modified:
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/libsrc/feassemble/CellGeometry.hh
   short/3D/PyLith/trunk/libsrc/feassemble/CellGeometry.icc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryHex3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryHex3D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine1D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine1D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine2D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine2D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine3D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint1D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint1D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint2D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint2D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint3D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad2D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad2D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad3D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryTet3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryTet3D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri2D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri2D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri3D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc
Log:
More work on setting up CellGeometry for non-isoparametric stuff. Added switch that reverts Quadrature calcs back to isoparametric, which is the default.

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/TODO	2007-12-04 06:53:11 UTC (rev 8375)
@@ -30,9 +30,11 @@
      c. Neumann BC
 
   3. Nonisoparametric cells
-     Need routine to transform coordinates in reference cell to coordinates
-       in actual cell (given vertices of actual cell)
-     Clean up CellGeometry::jacobian
+     Dirichlet and fault constraints?
+     Fix Quadrature2DLinear.py (wrong quad pts and wts)?
+     Cleanup CellGeometry
+       Allow multiple locations for ptRefToGlobal() and jacobian() for 
+         better efficiency
        Switch from double_array to double* (used by faults)
 
   4. Finish Neumann BC.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/CellGeometry.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/CellGeometry.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/CellGeometry.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -99,6 +99,19 @@
   virtual
   CellGeometry* geometryLowerDim(void) const = 0;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  virtual
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const = 0;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.
@@ -254,7 +267,7 @@
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private :
 
-  /** Array of coordinates of vertices in reference cell (dual basis).
+  /** Array of coordinates of vertices in reference cell.
    *
    * Reference coordinates: (p,q,r)
    *

Modified: short/3D/PyLith/trunk/libsrc/feassemble/CellGeometry.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/CellGeometry.icc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/CellGeometry.icc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -41,18 +41,7 @@
     _orientFn(orientation, jacobian, jacobianDet, upDir);
 } // orientation
 
-// TEMPORARY
-// Compute Jacobian at location in cell.
-inline
-void
-pylith::feassemble::CellGeometry::jacobian(double* jacobian,
-					   double* det,
-					   const double* vertices,
-					   const double* location,
-					   const int dim) const {
-}
 
-
 #endif
 
 // End of file

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryHex3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryHex3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryHex3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -63,6 +63,85 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryHex3D::coordsRefToGlobal(double* coordsGlobal,
+						     const double* coordsRef,
+						     const double* vertices,
+						     const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(3 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double y0 = vertices[1];
+  const double z0 = vertices[2];
+
+  const double x1 = vertices[3];
+  const double y1 = vertices[4];
+  const double z1 = vertices[5];
+
+  const double x2 = vertices[6];
+  const double y2 = vertices[7];
+  const double z2 = vertices[8];
+
+  const double x3 = vertices[9];
+  const double y3 = vertices[10];
+  const double z3 = vertices[11];
+
+  const double x4 = vertices[12];
+  const double y4 = vertices[13];
+  const double z4 = vertices[14];
+
+  const double x5 = vertices[15];
+  const double y5 = vertices[16];
+  const double z5 = vertices[17];
+
+  const double x6 = vertices[18];
+  const double y6 = vertices[19];
+  const double z6 = vertices[20];
+
+  const double x7 = vertices[21];
+  const double y7 = vertices[22];
+  const double z7 = vertices[23];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  const double p1 = 0.5*(1.0+coordsRef[1]);
+  const double p2 = 0.5*(1.0+coordsRef[2]);
+  assert(0 <= p0 && p0 <= 1.0);
+  assert(0 <= p1 && p1 <= 1.0);
+  assert(0 <= p2 && p2 <= 1.0);
+
+  const double f_01 = x2 - x1 - x3 + x0;
+  const double g_01 = y2 - y1 - y3 + y0;
+  const double h_01 = z2 - z1 - z3 + z0;
+
+  const double f_12 = x7 - x3 - x4 + x0;
+  const double g_12 = y7 - y3 - y4 + y0;
+  const double h_12 = z7 - z3 - z4 + z0;
+
+  const double f_02 = x5 - x1 - x4 + x0;
+  const double g_02 = y5 - y1 - y4 + y0;
+  const double h_02 = z5 - z1 - z4 + z0;
+
+  const double f_012 = x6 - x0 + x1 - x2 + x3 + x4 - x5 - x7;
+  const double g_012 = y6 - y0 + y1 - y2 + y3 + y4 - y5 - y7;
+  const double h_012 = z6 - z0 + z1 - z2 + z3 + z4 - z5 - z7;
+
+  coordsGlobal[0] = x0 + (x1-x0) * p0 + (x3-x0) * p1 + (x4-x0) * p2
+    + f_01*p0*p1 + f_12*p1*p2 + f_02*p0*p2 + f_012*p0*p1*p2;
+  coordsGlobal[1] = y0 + (y1-y0) * p0 + (y3-y0) * p1 + (y4-y0) * p2
+    + g_01*p0*p1 + g_12*p1*p2 + g_02*p0*p2 + g_012*p0*p1*p2;
+  coordsGlobal[2] = z0 + (z1-z0) * p0 + (z3-z0) * p1 + (z4-z0) * p2
+    + h_01*p0*p1 + h_12*p1*p2 + h_02*p0*p2 + h_012*p0*p1*p2;
+
+  PetscLogFlopsNoCheck(120);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryHex3D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryHex3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryHex3D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryHex3D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -65,6 +65,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine1D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine1D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -57,6 +57,29 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryLine1D::coordsRefToGlobal(double* coordsGlobal,
+						      const double* coordsRef,
+						      const double* vertices,
+						      const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(1 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double x1 = vertices[1];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  coordsGlobal[0] = x0 + (x1-x0) * p0;
+
+  PetscLogFlopsNoCheck(5);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryLine1D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine1D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine1D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine1D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -53,6 +53,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine2D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine2D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -57,6 +57,33 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryLine2D::coordsRefToGlobal(double* coordsGlobal,
+						      const double* coordsRef,
+						      const double* vertices,
+						      const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(2 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double y0 = vertices[1];
+
+  const double x1 = vertices[2];
+  const double y1 = vertices[3];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  coordsGlobal[0] = x0 + (x1-x0) * p0;
+  coordsGlobal[1] = y0 + (y1-y0) * p0;
+
+  PetscLogFlopsNoCheck(8);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryLine2D::jacobian(double_array* jacobian,
@@ -80,6 +107,7 @@
   (*jacobian)[1] = (y1 - y0)/2.0;
   *det = sqrt(pow((*jacobian)[0], 2) +
 	      pow((*jacobian)[1], 2));
+
   PetscLogFlopsNoCheck(8);
 } // jacobian
 

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine2D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine2D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine2D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -53,6 +53,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -57,6 +57,36 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryLine3D::coordsRefToGlobal(double* coordsGlobal,
+						      const double* coordsRef,
+						      const double* vertices,
+						      const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(3 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double y0 = vertices[1];
+  const double z0 = vertices[2];
+
+  const double x1 = vertices[3];
+  const double y1 = vertices[4];
+  const double z1 = vertices[5];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  coordsGlobal[0] = x0 + (x1-x0) * p0;
+  coordsGlobal[1] = y0 + (y1-y0) * p0;
+  coordsGlobal[2] = z0 + (z1-z0) * p0;
+
+  PetscLogFlopsNoCheck(11);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryLine3D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine3D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryLine3D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -53,6 +53,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint1D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint1D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -50,6 +50,23 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryPoint1D::coordsRefToGlobal(double* coordsGlobal,
+						       const double* coordsRef,
+						       const double* vertices,
+						       const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(1 == dim);
+  assert(spaceDim() == dim);
+
+  coordsGlobal[0] = vertices[0];
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryPoint1D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint1D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint1D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint1D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -53,6 +53,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint2D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint2D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -50,6 +50,24 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryPoint2D::coordsRefToGlobal(double* coordsGlobal,
+						       const double* coordsRef,
+						       const double* vertices,
+						       const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(2 == dim);
+  assert(spaceDim() == dim);
+
+  coordsGlobal[0] = vertices[0];
+  coordsGlobal[1] = vertices[1];
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryPoint2D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint2D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint2D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint2D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -53,6 +53,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -50,6 +50,25 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryPoint3D::coordsRefToGlobal(double* coordsGlobal,
+						       const double* coordsRef,
+						       const double* vertices,
+						       const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(3 == dim);
+  assert(spaceDim() == dim);
+
+  coordsGlobal[0] = vertices[0];
+  coordsGlobal[1] = vertices[1];
+  coordsGlobal[2] = vertices[2];
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryPoint3D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint3D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryPoint3D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -53,6 +53,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad2D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad2D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -59,6 +59,42 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryQuad2D::coordsRefToGlobal(double* coordsGlobal,
+						      const double* coordsRef,
+						      const double* vertices,
+						      const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(2 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double y0 = vertices[1];
+
+  const double x1 = vertices[2];
+  const double y1 = vertices[3];
+
+  const double x2 = vertices[4];
+  const double y2 = vertices[5];
+
+  const double x3 = vertices[6];
+  const double y3 = vertices[7];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  const double p1 = 0.5*(1.0+coordsRef[1]);
+  const double f_01 = x2 - x1 - x3 + x0;
+  const double g_01 = y2 - y1 - y3 + y0;
+  coordsGlobal[0] = x0 + (x1-x0) * p0 + (x2-x0) * p1 + f_01 * p0 * p1;
+  coordsGlobal[1] = y0 + (y1-y0) * p0 + (y2-y0) * p1 + g_01 * p0 * p1;
+
+  PetscLogFlopsNoCheck(28);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryQuad2D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad2D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad2D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad2D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -66,6 +66,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -59,6 +59,51 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryQuad3D::coordsRefToGlobal(double* coordsGlobal,
+						      const double* coordsRef,
+						      const double* vertices,
+						      const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(3 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double y0 = vertices[1];
+  const double z0 = vertices[2];
+
+  const double x1 = vertices[3];
+  const double y1 = vertices[4];
+  const double z1 = vertices[5];
+
+  const double x2 = vertices[6];
+  const double y2 = vertices[7];
+  const double z2 = vertices[8];
+
+  const double x3 = vertices[9];
+  const double y3 = vertices[10];
+  const double z3 = vertices[11];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  const double p1 = 0.5*(1.0+coordsRef[1]);
+  const double f_01 = x2 - x1 - x3 + x0;
+  const double g_01 = y2 - y1 - y3 + y0;
+  const double h_01 = z2 - z1 - z3 + z0;
+  assert(0 <= p0 && p0 <= 1.0);
+  assert(0 <= p1 && p1 <= 1.0);
+
+  coordsGlobal[0] = x0 + (x1-x0) * p0 + (x2-x0) * p1 + f_01 * p0 * p1;
+  coordsGlobal[1] = y0 + (y1-y0) * p0 + (y2-y0) * p1 + g_01 * p0 * p1;
+  coordsGlobal[2] = z0 + (z1-z0) * p0 + (z2-z0) * p1 + h_01 * p0 * p1;
+
+  PetscLogFlopsNoCheck(40);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryQuad3D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad3D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryQuad3D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -66,6 +66,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryTet3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryTet3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryTet3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -59,6 +59,50 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryTet3D::coordsRefToGlobal(double* coordsGlobal,
+						     const double* coordsRef,
+						     const double* vertices,
+						     const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(3 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double y0 = vertices[1];
+  const double z0 = vertices[2];
+
+  const double x1 = vertices[3];
+  const double y1 = vertices[4];
+  const double z1 = vertices[5];
+
+  const double x2 = vertices[6];
+  const double y2 = vertices[7];
+  const double z2 = vertices[8];
+
+  const double x3 = vertices[9];
+  const double y3 = vertices[10];
+  const double z3 = vertices[11];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  const double p1 = 0.5*(1.0+coordsRef[1]);
+  const double p2 = 0.5*(1.0+coordsRef[2]);
+  assert(0 <= p0 && p0 <= 1.0);
+  assert(0 <= p1 && p1 <= 1.0);
+  assert(0 <= p2 && p2 <= 1.0);
+
+  coordsGlobal[0] = x0 + (x1-x0) * p0 + (x2-x0) * p1 + (x3-x0) * p2;
+  coordsGlobal[1] = y0 + (y1-y0) * p0 + (y2-y0) * p1 + (y3-y0) * p2;
+  coordsGlobal[2] = z0 + (z1-z0) * p0 + (z2-z0) * p1 + (z3-z0) * p2;
+
+  PetscLogFlopsNoCheck(33);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryTet3D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryTet3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryTet3D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryTet3D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -61,6 +61,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri2D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri2D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -58,6 +58,37 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryTri2D::coordsRefToGlobal(double* coordsGlobal,
+						     const double* coordsRef,
+						     const double* vertices,
+						     const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(2 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double y0 = vertices[1];
+
+  const double x1 = vertices[2];
+  const double y1 = vertices[3];
+
+  const double x2 = vertices[4];
+  const double y2 = vertices[5];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  const double p1 = 0.5*(1.0+coordsRef[1]);
+  coordsGlobal[0] = x0 + (x1-x0) * p0 + (x2-x0) * p1;
+  coordsGlobal[1] = y0 + (y1-y0) * p0 + (y2-y0) * p1;
+
+  PetscLogFlopsNoCheck(16);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryTri2D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri2D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri2D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri2D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -60,6 +60,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -58,6 +58,41 @@
 } // geometryLowerDim
 
 // ----------------------------------------------------------------------
+// Transform coordinates in reference cell to global coordinates.
+void
+pylith::feassemble::GeometryTri3D::coordsRefToGlobal(double* coordsGlobal,
+						     const double* coordsRef,
+						     const double* vertices,
+						     const int dim) const
+{ // coordsRefToGlobal
+  assert(0 != coordsGlobal);
+  assert(0 != coordsRef);
+  assert(0 != vertices);
+  assert(3 == dim);
+  assert(spaceDim() == dim);
+
+  const double x0 = vertices[0];
+  const double y0 = vertices[1];
+  const double z0 = vertices[2];
+
+  const double x1 = vertices[3];
+  const double y1 = vertices[4];
+  const double z1 = vertices[5];
+
+  const double x2 = vertices[6];
+  const double y2 = vertices[7];
+  const double z2 = vertices[8];
+
+  const double p0 = 0.5*(1.0+coordsRef[0]);
+  const double p1 = 0.5*(1.0+coordsRef[1]);
+  coordsGlobal[0] = x0 + (x1-x0) * p0 + (x2-x0) * p1;
+  coordsGlobal[1] = y0 + (y1-y0) * p0 + (y2-y0) * p1;
+  coordsGlobal[2] = z0 + (z1-z0) * p0 + (z2-z0) * p1;
+
+  PetscLogFlopsNoCheck(22);
+} // coordsRefToGlobal
+
+// ----------------------------------------------------------------------
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryTri3D::jacobian(double_array* jacobian,

Modified: short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri3D.hh	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/GeometryTri3D.hh	2007-12-04 06:53:11 UTC (rev 8375)
@@ -60,6 +60,18 @@
    */
   CellGeometry* geometryLowerDim(void) const;
 
+  /** Transform coordinates in reference cell to global coordinates.
+   *
+   * @param coordsGlobal Coordinates in global coordinate system.
+   * @param coordsRef Coordinates in reference cell.
+   * @param vertices Array of cell vertices in global coordinates.
+   * @param dim Dimension of global coordinate system.
+   */
+  void coordsRefToGlobal(double* coordsGlobal,
+			 const double* coordsRef,
+			 const double* vertices,
+			 const int dim) const;
+
   /** Compute Jacobian at location in cell.
    *
    * @param jacobian Jacobian at location.

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -21,6 +21,8 @@
 
 #include <assert.h> // USES assert()
 
+#define ISOPARAMETRIC
+
 // ----------------------------------------------------------------------
 // Constructor
 pylith::feassemble::Quadrature1D::Quadrature1D(void) : Quadrature()
@@ -60,14 +62,20 @@
   
   // Loop over quadrature points
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
-    
+
     // Compute coordinates of quadrature point in cell
+#if defined(ISOPARAMETRIC)
     // x = sum[i=0,n-1] (Ni * xi)
     for (int iBasis=0; iBasis < _numBasis; ++iBasis)
       _quadPts[iQuadPt] += 
 	_basis[iQuadPt*_numBasis+iBasis]*vertCoords[iBasis];
+#else
+    assert(0 != _geometry);
+    _geometry->coordsRefToGlobal(&_quadPts[iQuadPt], &_quadPtsRef[iQuadPt],
+				 vertCoords, _spaceDim);
+#endif
 
-#if 0
+#if defined(ISOPARAMETRIC)
     // Compute Jacobian at quadrature point
     // J = dx/dp = sum[i=0,n-1] (dNi/dp * xi)
     for (int iBasis=0; iBasis < _numBasis; ++iBasis)

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -20,6 +20,8 @@
 
 #include <assert.h> // USES assert()
 
+#define ISOPARAMETRIC
+
 // ----------------------------------------------------------------------
 // Constructor
 pylith::feassemble::Quadrature1Din2D::Quadrature1Din2D(void) : Quadrature()
@@ -61,6 +63,7 @@
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     
     // Compute coordinates of quadrature point in cell
+#if defined(ISOPARAMETRIC)
     // x = sum[i=0,n-1] (Ni * xi)
     // y = sum[i=0,n-1] (Ni * yi)
     for (int iBasis=0; iBasis < _numBasis; ++iBasis) {
@@ -69,8 +72,14 @@
 	_quadPts[iQuadPt*_spaceDim+iDim] +=
 	  basis * vertCoords[iBasis*_spaceDim+iDim];
     } // for
+#else
+    assert(0 != _geometry);
+    _geometry->coordsRefToGlobal(&_quadPts[iQuadPt*_spaceDim],
+				 &_quadPtsRef[iQuadPt*_cellDim],
+				 vertCoords, _spaceDim);
+#endif
 
-#if 0    
+#if defined(ISOPARAMETRIC)
     // Compute Jacobian at quadrature point
     // J = [dx/dp
     //      dy/dp]

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -20,6 +20,8 @@
 
 #include <assert.h> // USES assert()
 
+#define ISOPARAMETRIC
+
 // ----------------------------------------------------------------------
 // Constructor
 pylith::feassemble::Quadrature1Din3D::Quadrature1Din3D(void) : Quadrature()
@@ -61,6 +63,7 @@
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     
     // Compute coordinates of quadrature point in cell
+#if defined(ISOPARAMETRIC)
     // x = sum[i=0,n-1] (Ni * xi)
     // y = sum[i=0,n-1] (Ni * yi)
     // z = sum[i=0,n-1] (Ni * zi)
@@ -70,8 +73,14 @@
 	_quadPts[iQuadPt*_spaceDim+iDim] += 
 	  basis * vertCoords[iBasis*_spaceDim+iDim];
     } // for
+#else
+    assert(0 != _geometry);
+    _geometry->coordsRefToGlobal(&_quadPts[iQuadPt*_spaceDim],
+				 &_quadPtsRef[iQuadPt*_cellDim],
+				 vertCoords, _spaceDim);
+#endif
     
-#if 0
+#if defined(ISOPARAMETRIC)
     // Compute Jacobian at quadrature point
     // J = [dx/dp
     //      dy/dp

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -20,6 +20,8 @@
 
 #include <assert.h> // USES assert()
 
+#define ISOPARAMETRIC
+
 // ----------------------------------------------------------------------
 // Constructor
 pylith::feassemble::Quadrature2D::Quadrature2D(void) : Quadrature()
@@ -61,6 +63,7 @@
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     
     // Compute coordinates of quadrature point in cell
+#if defined(ISOPARAMETRIC)
     // x = sum[i=0,n-1] (Ni * xi)
     // y = sum[i=0,n-1] (Ni * yi)
     for (int iBasis=0; iBasis < _numBasis; ++iBasis) {
@@ -69,8 +72,14 @@
 	_quadPts[iQuadPt*_spaceDim+iDim] += 
 	  basis * vertCoords[iBasis*_spaceDim+iDim];
     } // for
+#else
+    assert(0 != _geometry);
+    _geometry->coordsRefToGlobal(&_quadPts[iQuadPt*_spaceDim],
+				 &_quadPtsRef[iQuadPt*_cellDim],
+				 vertCoords, _spaceDim);
+#endif
 
-#if 0
+#if defined(ISOPARAMETRIC)
     // Compute Jacobian at quadrature point
     // J = [dx/dp dx/dq]
     //     [dy/dp dy/dq]

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -22,6 +22,8 @@
 #include <assert.h> // USES assert()
 #include <stdexcept> // USES internal_error
 
+#define ISOPARAMETRIC
+
 // ----------------------------------------------------------------------
 // Constructor
 pylith::feassemble::Quadrature2Din3D::Quadrature2Din3D(void) : Quadrature()
@@ -63,6 +65,7 @@
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     
     // Compute coordinates of quadrature point in cell
+#if defined(ISOPARAMETRIC)
     // x = sum[i=0,n-1] (Ni * xi)
     // y = sum[i=0,n-1] (Ni * yi)
     // z = sum[i=0,n-1] (Ni * zi)
@@ -72,8 +75,14 @@
 	_quadPts[iQuadPt*_spaceDim+iDim] += 
 	  basis * vertCoords[iBasis*_spaceDim+iDim];
     } // for
-    
-#if 0
+#else
+    assert(0 != _geometry);
+    _geometry->coordsRefToGlobal(&_quadPts[iQuadPt*_spaceDim],
+				 &_quadPtsRef[iQuadPt*_cellDim],
+				 vertCoords, _spaceDim);
+#endif
+
+#if defined(ISOPARAMETRIC)
     // Compute Jacobian at quadrature point
     // J = [dx/dp dx/dq]
     //     [dy/dp dy/dq]

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -20,6 +20,8 @@
 
 #include <assert.h> // USES assert()
 
+#define ISOPARAMETRIC
+
 // ----------------------------------------------------------------------
 // Constructor
 pylith::feassemble::Quadrature3D::Quadrature3D(void) : pylith::feassemble::Quadrature::Quadrature()
@@ -61,6 +63,7 @@
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     
     // Compute coordinates of quadrature point in cell
+#if defined(ISOPARAMETRIC)
     // x = sum[i=0,n-1] (Ni * xi)
     // y = sum[i=0,n-1] (Ni * yi)
     // z = sum[i=0,n-1] (Ni * zi)
@@ -70,8 +73,14 @@
 	_quadPts[iQuadPt*_spaceDim+iDim] += 
 	  basis * vertCoords[iBasis*_spaceDim+iDim];
     } // for
+#else
+    assert(0 != _geometry);
+    _geometry->coordsRefToGlobal(&_quadPts[iQuadPt*_spaceDim],
+				 &_quadPtsRef[iQuadPt*_cellDim],
+				 vertCoords, _spaceDim);
+#endif
     
-#if 0
+#if defined(ISOPARAMETRIC)
     // Compute Jacobian at quadrature point
     // J = [dx/dp dx/dq dx/dr]
     //     [dy/dp dy/dq dy/dr]

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersDataTet4.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersDataTet4.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -21,7 +21,7 @@
   0.3333333333333333, 0.3333333333333333
 };
 const double pylith::bc::AbsorbingDampersDataTet4::_quadWts[] = {
-  2.0,
+  0.5,
 };
 const double pylith::bc::AbsorbingDampersDataTet4::_basis[] = {
   0.3333333333333333,

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc	2007-12-04 00:53:23 UTC (rev 8374)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc	2007-12-04 06:53:11 UTC (rev 8375)
@@ -39,7 +39,7 @@
   0.3333333333333333, 0.3333333333333333
 };
 const double pylith::bc::NeumannDataTet4::_quadWts[] = {
-  2.0,
+  0.5,
 };
 const double pylith::bc::NeumannDataTet4::_basis[] = {
   0.3333333333333333,



More information about the cig-commits mailing list