[cig-commits] r7258 - in short/3D/PyLith/trunk: . unittests/libtests/faults unittests/libtests/faults/data

brad at geodynamics.org brad at geodynamics.org
Fri Jun 15 09:54:57 PDT 2007


Author: brad
Date: 2007-06-15 09:54:56 -0700 (Fri, 15 Jun 2007)
New Revision: 7258

Added:
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKinQuad4e.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKinQuad4e.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_finalslip.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_peakrate.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_sliptime.spatialdb
Modified:
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am
   short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am
Log:
Added testing of constaint vertex and cohesive cell pairing for FaultCohesiveKin. Added unit tests for testing quad4 meshes with multiple cohesive cells.

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/TODO	2007-06-15 16:54:56 UTC (rev 7258)
@@ -5,7 +5,9 @@
   tests/1d/line3/dislocation.cfg [CHACO]
   tests/3d/tet4/shearelasticstrain.cfg [SIEVE INDEXING AND CONSTRAINTS]
 
-  remove data at Lagrange constraint vertices from VTK output.
+  VTK output
+    zero out values at Lagrange constraint vertices
+    make 3-component displacements default even for 1-D and 2-D meshes
 
 ======================================================================
 MAIN PRIORITIES (Brad)
@@ -14,14 +16,11 @@
 1. Additional unit tests
 
   Unit tests with multiple cohesive cells.
-    quad4
     tet4
     hex8
 
     normal okay with rollover of fault dip?
 
-    check _constraintCell in testing of FaultCohesiveKin::initialize().
-
   b. ElasticityExplicit and ElasticityImplicit
     i. multiple materials
     ii. constrained DOF

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am	2007-06-15 16:54:56 UTC (rev 7258)
@@ -30,6 +30,7 @@
 	TestFaultCohesiveKinTri3.cc \
 	TestFaultCohesiveKinTri3d.cc \
 	TestFaultCohesiveKinQuad4.cc \
+	TestFaultCohesiveKinQuad4e.cc \
 	TestFaultCohesiveKinTet4.cc \
 	TestFaultCohesiveKinHex8.cc \
 	test_faults.cc
@@ -44,6 +45,7 @@
 	TestFaultCohesiveKinTri3.hh \
 	TestFaultCohesiveKinTri3d.hh \
 	TestFaultCohesiveKinQuad4.hh \
+	TestFaultCohesiveKinQuad4e.hh \
 	TestFaultCohesiveKinTet4.hh \
 	TestFaultCohesiveKinHex8.hh
 
@@ -80,6 +82,7 @@
 	data/CohesiveKinDataTri3.cc \
 	data/CohesiveKinDataTri3d.cc \
 	data/CohesiveKinDataQuad4.cc \
+	data/CohesiveKinDataQuad4e.cc \
 	data/CohesiveKinDataTet4.cc \
 	data/CohesiveKinDataHex8.cc
 
@@ -115,6 +118,7 @@
 	data/CohesiveKinDataTri3.hh \
 	data/CohesiveKinDataTri3d.hh \
 	data/CohesiveKinDataQuad4.hh \
+	data/CohesiveKinDataQuad4e.hh \
 	data/CohesiveKinDataTet4.hh \
 	data/CohesiveKinDataHex8.hh
 

Added: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKinQuad4e.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKinQuad4e.cc	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKinQuad4e.cc	2007-06-15 16:54:56 UTC (rev 7258)
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestFaultCohesiveKinQuad4e.hh" // Implementation of class methods
+
+#include "data/CohesiveKinDataQuad4e.hh" // USES CohesiveKinDataQuad4e
+
+#include "pylith/feassemble/Quadrature1Din2D.hh" // USES Quadrature1Din2D
+#include "pylith/feassemble/GeometryLine2D.hh" // USES GeometryLine2D
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestFaultCohesiveKinQuad4e );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::faults::TestFaultCohesiveKinQuad4e::setUp(void)
+{ // setUp
+  TestFaultCohesiveKin::setUp();
+  _data = new CohesiveKinDataQuad4e();
+  _quadrature = new feassemble::Quadrature1Din2D();
+  CPPUNIT_ASSERT(0 != _quadrature);
+  feassemble::GeometryLine2D geometry;
+  _quadrature->refGeometry(&geometry);
+} // setUp
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKinQuad4e.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKinQuad4e.hh	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKinQuad4e.hh	2007-06-15 16:54:56 UTC (rev 7258)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/faults/TestFaultCohesiveKinQuad4e.hh
+ *
+ * @brief C++ TestFaultCohesiveKinQuad4e object.
+ *
+ * C++ unit testing for FaultCohesiveKin for mesh with 2-D quadrilateral cells.
+ */
+
+#if !defined(pylith_faults_testfaultcohesivekinquad4e_hh)
+#define pylith_faults_testfaultcohesivekinquad4e_hh
+
+#include "TestFaultCohesiveKin.hh" // ISA TestFaultCohesiveKin
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace faults {
+    class TestFaultCohesiveKinQuad4e;
+  } // bc
+} // pylith
+
+/// C++ unit testing for FaultCohesiveKin for mesh with 2-D quadrilateral cells.
+class pylith::faults::TestFaultCohesiveKinQuad4e : public TestFaultCohesiveKin
+{ // class TestFaultCohesiveKinQuad4e
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestFaultCohesiveKinQuad4e );
+
+  CPPUNIT_TEST( testInitialize );
+  CPPUNIT_TEST( testIntegrateResidual );
+  CPPUNIT_TEST( testIntegrateJacobian );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+}; // class TestFaultCohesiveKinQuad4e
+
+#endif // pylith_faults_testfaultcohesivequad4e_hh
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.cc	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.cc	2007-06-15 16:54:56 UTC (rev 7258)
@@ -0,0 +1,647 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-3, vertices are 4-12.
+ *
+ *      10 --------11 --------12
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       5 -------- 7 -------- 9
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       4 -------- 6 -------- 8
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-3,16-17 vertices are 4-15.
+ *
+ *      10 --------11-18-17 --------12
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       5 -------- 7-16-15 -------- 9
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       |          |     |          |
+ *       4 -------- 6-14-13 -------- 8
+ */
+
+
+#include "CohesiveKinDataQuad4e.hh"
+
+const char* pylith::faults::CohesiveKinDataQuad4e::_meshFilename =
+  "data/quad4e.mesh";
+
+const int pylith::faults::CohesiveKinDataQuad4e::_spaceDim = 2;
+
+const int pylith::faults::CohesiveKinDataQuad4e::_cellDim = 1;
+
+const int pylith::faults::CohesiveKinDataQuad4e::_numBasis = 2;
+
+const int pylith::faults::CohesiveKinDataQuad4e::_numQuadPts = 1;
+
+const double pylith::faults::CohesiveKinDataQuad4e::_quadPts[] = {
+  0.0,
+};
+
+const double pylith::faults::CohesiveKinDataQuad4e::_quadWts[] = {
+  2.0,
+};
+
+const double pylith::faults::CohesiveKinDataQuad4e::_basis[] = {
+  0.5,
+  0.5
+};
+
+const double pylith::faults::CohesiveKinDataQuad4e::_basisDeriv[] = {
+  -0.5,
+   0.5
+};
+
+const double pylith::faults::CohesiveKinDataQuad4e::_verticesRef[] = {
+  -1.0, 1.0
+};
+
+const int pylith::faults::CohesiveKinDataQuad4e::_id = 10;
+
+const char* pylith::faults::CohesiveKinDataQuad4e::_label = "fault";
+
+const char* pylith::faults::CohesiveKinDataQuad4e::_finalSlipFilename = 
+  "data/quad4e_finalslip.spatialdb";
+
+const char* pylith::faults::CohesiveKinDataQuad4e::_slipTimeFilename = 
+  "data/quad4e_sliptime.spatialdb";
+
+const char* pylith::faults::CohesiveKinDataQuad4e::_peakRateFilename = 
+  "data/quad4e_peakrate.spatialdb";
+
+const double pylith::faults::CohesiveKinDataQuad4e::_fieldT[] = {
+  3.1, 5.1,
+  3.2, 5.2,
+  3.3, 5.3,
+  3.4, 5.4,
+  3.5, 5.5,
+  3.6, 5.6,
+  3.7, 5.7,
+  3.8, 5.8,
+  3.9, 5.9,
+  3.0, 5.0,
+  4.1, 6.1,
+  4.2, 6.2,
+  4.3, 6.3,
+  4.4, 6.4,
+  4.5, 6.5,
+};
+
+
+const int pylith::faults::CohesiveKinDataQuad4e::_numConstraintVert = 3;
+
+const double pylith::faults::CohesiveKinDataQuad4e::_orientation[] = {
+  0.0, +1.0,  +1.0, 0.0,
+  0.0, +1.0,  +1.0, 0.0,
+  0.0, +1.0,  +1.0, 0.0,
+};
+
+const int pylith::faults::CohesiveKinDataQuad4e::_constraintVertices[] = {
+  14, 16, 18
+};
+
+const int pylith::faults::CohesiveKinDataQuad4e::_constraintCells[] = {
+  19, 19, 20
+};
+
+const double pylith::faults::CohesiveKinDataQuad4e::_valsResidual[] = {
+  0.0,  0.0,
+  0.0,  0.0,
+  0.0,  0.0,
+  0.0,  0.0,
+  0.0,  0.0,
+  0.0,  0.0,
+  0.0,  0.0,
+  0.0,  0.0,
+  0.0,  0.0,
+  0.0,  0.0,
+  0.989535448086, 0.0824612873405, // 14
+  0.0,  0.0,
+  1.05057813143, 0.0456773100622, // 16
+  0.0,  0.0,
+  0.90435792846,  0.10852295130, // 18
+};
+
+const double pylith::faults::CohesiveKinDataQuad4e::_valsJacobian[] = {
+  0.0, 0.0, // 4x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0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.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 10x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 10y
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 11x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,-1.0, // 18
+  0.0, 0.0, // 11y
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+ -1.0, 0.0, // 18
+  0.0, 0.0, // 12x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 12y
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 13x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,+1.0, // 14
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 13y
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+ +1.0, 0.0, // 14
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 14x
+  0.0, 0.0,
+  0.0,-1.0, // 6
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,+1.0, // 13
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 14y
+  0.0, 0.0,
+ -1.0, 0.0, // 6
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+ +1.0, 0.0, // 13
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 15x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,+1.0, // 16
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 15y
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+ +1.0, 0.0, // 16
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 16x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,-1.0, // 7
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,+1.0, // 15
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 16y
+  0.0, 0.0,
+  0.0, 0.0,
+ -1.0, 0.0, // 7
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+ +1.0, 0.0, // 15
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0, // 17x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,+1.0, // 18
+  0.0, 0.0, // 17y
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+ +1.0, 0.0, // 18
+  0.0, 0.0, // 18x
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,-1.0, // 11
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0,+1.0, // 17
+  0.0, 0.0,
+  0.0, 0.0, // 18y
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+ -1.0, 0.0, // 11
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+  0.0, 0.0,
+ +1.0, 0.0, // 17
+  0.0, 0.0,
+};
+
+pylith::faults::CohesiveKinDataQuad4e::CohesiveKinDataQuad4e(void)
+{ // constructor
+  meshFilename = const_cast<char*>(_meshFilename);
+  spaceDim = _spaceDim;
+  cellDim = _cellDim;
+  numBasis = _numBasis;
+  numQuadPts = _numQuadPts;
+  quadPts = const_cast<double*>(_quadPts);
+  quadWts = const_cast<double*>(_quadWts);
+  basis = const_cast<double*>(_basis);
+  basisDeriv = const_cast<double*>(_basisDeriv);
+  verticesRef = const_cast<double*>(_verticesRef);
+  id = _id;
+  label = const_cast<char*>(_label);
+  finalSlipFilename = const_cast<char*>(_finalSlipFilename);
+  slipTimeFilename = const_cast<char*>(_slipTimeFilename);
+  peakRateFilename = const_cast<char*>(_peakRateFilename);
+  fieldT = const_cast<double*>(_fieldT);
+  orientation = const_cast<double*>(_orientation);
+  constraintVertices = const_cast<int*>(_constraintVertices);
+  constraintCells = const_cast<int*>(_constraintCells);
+  valsResidual = const_cast<double*>(_valsResidual);
+  valsJacobian = const_cast<double*>(_valsJacobian);
+  numConstraintVert = _numConstraintVert;  
+} // constructor
+
+pylith::faults::CohesiveKinDataQuad4e::~CohesiveKinDataQuad4e(void)
+{}
+
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.hh	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.hh	2007-06-15 16:54:56 UTC (rev 7258)
@@ -0,0 +1,73 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivekindataquad4e_hh)
+#define pylith_faults_cohesivekindataquad4e_hh
+
+#include "CohesiveKinData.hh"
+
+namespace pylith {
+  namespace faults {
+     class CohesiveKinDataQuad4e;
+  } // pylith
+} // faults
+
+class pylith::faults::CohesiveKinDataQuad4e : public CohesiveKinData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public: 
+
+  /// Constructor
+  CohesiveKinDataQuad4e(void);
+
+  /// Destructor
+  ~CohesiveKinDataQuad4e(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+  static const char* _meshFilename; ///< Filename of input mesh
+
+  static const int _spaceDim; ///< Number of dimensions in vertex coordinates
+  static const int _cellDim; ///< Number of dimensions associated with cell
+
+  static const int _numBasis; ///< Number of vertices in cell
+  static const int _numQuadPts; ///< Number of quadrature points
+  static const double _quadPts[]; ///< Coordinates of quad pts in ref cell
+  static const double _quadWts[]; ///< Weights of quadrature points
+  static const double _basis[]; ///< Basis fns at quadrature points
+  static const double _basisDeriv[]; ///< Derivatives of basis fns at quad pts
+  static const double _verticesRef[]; ///< Coordinates of vertices in ref cell (dual basis)
+
+  static const int _id; ///< Fault material identifier
+  static const char* _label; ///< Label for fault
+  static const char* _finalSlipFilename; ///< Name of db for final slip
+  static const char* _slipTimeFilename; ///< Name of db for slip time
+  static const char* _peakRateFilename; ///< Name of db for peak rate
+  //@}
+
+  static const double _fieldT[]; ///< Solution field at time t.
+
+  static const double _orientation[]; ///< Expected values for fault orientation.
+  static const int _constraintVertices[]; ///< Expected points for constraint vertices
+  static const int _constraintCells[]; ///< Expected cells for constraint vertices
+  static const double _valsResidual[]; ///< Expected values from residual calculation.
+  static const double _valsJacobian[]; ///< Expected values from Jacobian calculation.
+  static const int _numConstraintVert; ///< Number of constraint vertices
+
+};
+
+#endif // pylith_faults_cohesivekindataquad4e_hh
+
+
+// End of file

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am	2007-06-15 16:54:56 UTC (rev 7258)
@@ -33,6 +33,9 @@
 	quad4_finalslip.spatialdb \
 	quad4_sliptime.spatialdb \
 	quad4_peakrate.spatialdb \
+	quad4e_finalslip.spatialdb \
+	quad4e_sliptime.spatialdb \
+	quad4e_peakrate.spatialdb \
 	tet4.mesh \
 	tet4b.mesh \
 	tet4c.mesh \

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_finalslip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_finalslip.spatialdb	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_finalslip.spatialdb	2007-06-15 16:54:56 UTC (rev 7258)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  left-lateral-slip fault-opening
+  value-units =  m   m
+  num-locs = 3
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   2.3   0.1
+0.0  -1.0   2.4   0.2
+0.0  +3.0   2.5   0.3

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_peakrate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_peakrate.spatialdb	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_peakrate.spatialdb	2007-06-15 16:54:56 UTC (rev 7258)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-rate
+  value-units =  m/s
+  num-locs = 3
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   1.4
+0.0  -1.0   1.5
+0.0  +3.0   1.6

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_sliptime.spatialdb	2007-06-15 07:01:38 UTC (rev 7257)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4e_sliptime.spatialdb	2007-06-15 16:54:56 UTC (rev 7258)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-time
+  value-units =  s
+  num-locs = 3
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0    1.2
+0.0  -1.0    1.3
+0.0  +3.0    1.4



More information about the cig-commits mailing list