[cig-commits] [commit] knepley/upgrade-petsc-interface: Added some adjusting topology unit tests for embedded faults in 2-D. (0f9aecd)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Mar 4 13:21:37 PST 2014


Repository : ssh://geoshell/pylith

On branch  : knepley/upgrade-petsc-interface
Link       : https://github.com/geodynamics/pylith/compare/896a7cf29dd1b4577c562427c001a8ae224e7eae...0f9aecd785548d16270e843761de6f709bb4d3ab

>---------------------------------------------------------------

commit 0f9aecd785548d16270e843761de6f709bb4d3ab
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Tue Mar 4 13:18:13 2014 -0800

    Added some adjusting topology unit tests for embedded faults in 2-D.


>---------------------------------------------------------------

0f9aecd785548d16270e843761de6f709bb4d3ab
 unittests/libtests/faults/Makefile.am              |   6 ++
 unittests/libtests/faults/TestFaultCohesive.cc     |  48 +++++++++
 unittests/libtests/faults/TestFaultCohesive.hh     |  12 +++
 .../libtests/faults/data/CohesiveDataQuad4i.cc     | 120 +++++++++++++++++++++
 .../{CohesiveDataHex8.hh => CohesiveDataQuad4i.hh} |  14 +--
 .../{CohesiveDataTet4j.cc => CohesiveDataTri3g.cc} |  45 ++++----
 .../{CohesiveDataHex8.hh => CohesiveDataTri3g.hh}  |  14 +--
 .../{CohesiveDataTet4j.cc => CohesiveDataTri3h.cc} |  46 ++++----
 .../{CohesiveDataHex8.hh => CohesiveDataTri3h.hh}  |  14 +--
 unittests/libtests/faults/data/Makefile.am         |   3 +
 unittests/libtests/faults/data/quad4i.mesh         |  72 +++++++++++++
 unittests/libtests/faults/data/tri3g.mesh          |  73 +++++++++++++
 unittests/libtests/faults/data/tri3h.mesh          |  70 ++++++++++++
 13 files changed, 464 insertions(+), 73 deletions(-)

diff --git a/unittests/libtests/faults/Makefile.am b/unittests/libtests/faults/Makefile.am
index d72d37f..bacb340 100644
--- a/unittests/libtests/faults/Makefile.am
+++ b/unittests/libtests/faults/Makefile.am
@@ -79,6 +79,8 @@ testfaults_SOURCES += \
 	data/CohesiveDataTri3d.cc \
 	data/CohesiveDataTri3e.cc \
 	data/CohesiveDataTri3f.cc \
+	data/CohesiveDataTri3g.cc \
+	data/CohesiveDataTri3h.cc \
 	data/CohesiveDataTri3Lagrange.cc \
 	data/CohesiveDataQuad4.cc \
 	data/CohesiveDataQuad4b.cc \
@@ -88,6 +90,7 @@ testfaults_SOURCES += \
 	data/CohesiveDataQuad4f.cc \
 	data/CohesiveDataQuad4g.cc \
 	data/CohesiveDataQuad4h.cc \
+	data/CohesiveDataQuad4i.cc \
 	data/CohesiveDataQuad4Lagrange.cc \
 	data/CohesiveDataTet4.cc \
 	data/CohesiveDataTet4b.cc \
@@ -142,6 +145,8 @@ noinst_HEADERS += \
 	data/CohesiveDataTri3d.hh \
 	data/CohesiveDataTri3e.hh \
 	data/CohesiveDataTri3f.hh \
+	data/CohesiveDataTri3g.hh \
+	data/CohesiveDataTri3h.hh \
 	data/CohesiveDataTri3Lagrange.hh \
 	data/CohesiveDataQuad4.hh \
 	data/CohesiveDataQuad4b.hh \
@@ -151,6 +156,7 @@ noinst_HEADERS += \
 	data/CohesiveDataQuad4f.hh \
 	data/CohesiveDataQuad4g.hh \
 	data/CohesiveDataQuad4h.hh \
+	data/CohesiveDataQuad4i.hh \
 	data/CohesiveDataQuad4Lagrange.hh \
 	data/CohesiveDataTet4.hh \
 	data/CohesiveDataTet4b.hh \
diff --git a/unittests/libtests/faults/TestFaultCohesive.cc b/unittests/libtests/faults/TestFaultCohesive.cc
index 577d5ab..13583d5 100644
--- a/unittests/libtests/faults/TestFaultCohesive.cc
+++ b/unittests/libtests/faults/TestFaultCohesive.cc
@@ -149,6 +149,38 @@ pylith::faults::TestFaultCohesive::testAdjustTopologyTri3f(void)
 } // testAdjustTopologyTri3f
 
 // ----------------------------------------------------------------------
+#include "data/CohesiveDataTri3g.hh" // USES CohesiveDataTri3g
+
+// Test adjustTopology() with 2-D triangular element (vertex on fault).
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyTri3g(void)
+{ // testAdjustTopologyTri3g
+  PYLITH_METHOD_BEGIN;
+
+  CohesiveDataTri3g data;
+  FaultCohesiveTract fault;
+  _testAdjustTopology(&fault, data);
+
+  PYLITH_METHOD_END;
+} // testAdjustTopologyTri3g
+
+// ----------------------------------------------------------------------
+#include "data/CohesiveDataTri3h.hh" // USES CohesiveDataTri3h
+
+// Test adjustTopology() with 2-D triangular element (vertex on fault).
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyTri3h(void)
+{ // testAdjustTopologyTri3h
+  PYLITH_METHOD_BEGIN;
+
+  CohesiveDataTri3h data;
+  FaultCohesiveTract fault;
+  _testAdjustTopology(&fault, data);
+
+  PYLITH_METHOD_END;
+} // testAdjustTopologyTri3h
+
+// ----------------------------------------------------------------------
 #include "data/CohesiveDataQuad4.hh" // USES CohesiveDataQuad4
 
 // Test adjustTopology() with 2-D quadrilateral element.
@@ -278,6 +310,22 @@ pylith::faults::TestFaultCohesive::testAdjustTopologyQuad4h(void)
 } // testAdjustTopologyQuad4h
 
 // ----------------------------------------------------------------------
+#include "data/CohesiveDataQuad4i.hh" // USES CohesiveDataQuad4i
+
+// Test adjustTopology() with 2-D quadrilateral element.
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyQuad4i(void)
+{ // testAdjustTopologyQuad4i
+  PYLITH_METHOD_BEGIN;
+
+  CohesiveDataQuad4i data;
+  FaultCohesiveTract fault;
+  _testAdjustTopology(&fault, data);
+
+  PYLITH_METHOD_END;
+} // testAdjustTopologyQuad4i
+
+// ----------------------------------------------------------------------
 #include "data/CohesiveDataTet4.hh" // USES CohesiveDataTet4
 
 // Test adjustTopology() with 3-D tetrahedral element.
diff --git a/unittests/libtests/faults/TestFaultCohesive.hh b/unittests/libtests/faults/TestFaultCohesive.hh
index c341217..c24ee31 100644
--- a/unittests/libtests/faults/TestFaultCohesive.hh
+++ b/unittests/libtests/faults/TestFaultCohesive.hh
@@ -54,6 +54,8 @@ class pylith::faults::TestFaultCohesive : public CppUnit::TestFixture
   CPPUNIT_TEST( testAdjustTopologyTri3d );
   CPPUNIT_TEST( testAdjustTopologyTri3e );
   CPPUNIT_TEST( testAdjustTopologyTri3f );
+  CPPUNIT_TEST( testAdjustTopologyTri3g );
+  CPPUNIT_TEST( testAdjustTopologyTri3h );
   CPPUNIT_TEST( testAdjustTopologyQuad4 );
   CPPUNIT_TEST( testAdjustTopologyQuad4b );
   CPPUNIT_TEST( testAdjustTopologyQuad4c );
@@ -62,6 +64,7 @@ class pylith::faults::TestFaultCohesive : public CppUnit::TestFixture
   CPPUNIT_TEST( testAdjustTopologyQuad4f );
   CPPUNIT_TEST( testAdjustTopologyQuad4g );
   CPPUNIT_TEST( testAdjustTopologyQuad4h );
+  CPPUNIT_TEST( testAdjustTopologyQuad4i );
   CPPUNIT_TEST( testAdjustTopologyTet4 );
   CPPUNIT_TEST( testAdjustTopologyTet4b );
   CPPUNIT_TEST( testAdjustTopologyTet4c );
@@ -112,6 +115,12 @@ public :
   /// Test adjustTopology() with 2-D triangular element (vertex on fault).
   void testAdjustTopologyTri3f(void);
 
+  /// Test adjustTopology() with 2-D triangular element (embedded fault).
+  void testAdjustTopologyTri3g(void);
+
+  /// Test adjustTopology() with 2-D triangular element (embedded fault, 2 cohesive cells).
+  void testAdjustTopologyTri3h(void);
+
   /// Test adjustTopology() with 2-D quadrilateral element.
   void testAdjustTopologyQuad4(void);
 
@@ -136,6 +145,9 @@ public :
   /// Test adjustTopology() with 2-D quadrilateral element (2 faults).
   void testAdjustTopologyQuad4h(void);
 
+  /// Test adjustTopology() with 2-D quadrilateral element (embedded fault).
+  void testAdjustTopologyQuad4i(void);
+
   /// Test adjustTopology() with 3-D tetrahedral element.
   void testAdjustTopologyTet4(void);
 
diff --git a/unittests/libtests/faults/data/CohesiveDataQuad4i.cc b/unittests/libtests/faults/data/CohesiveDataQuad4i.cc
new file mode 100644
index 0000000..3c57d96
--- /dev/null
+++ b/unittests/libtests/faults/data/CohesiveDataQuad4i.cc
@@ -0,0 +1,120 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2014 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-5, vertices are 6-17.
+ *
+ * 6 ---- 7 ---- 8
+ * |      |      |
+ * |      |      |
+ * |      |      |
+ * |      |      |
+ * 9 ----10 ----11
+ * |      |      |
+ * |      |      |
+ * |      |      |
+ * |      |      |
+ *12 ----13 ----14
+ * |      |      |
+ * |      |      |
+ * |      |      |
+ * |      |      |
+ *15 ----16 ----17
+ *
+ * After adding fault.
+ *
+ *
+ * Cells are 0-8, vertices are 9-23, edges are 24-47.
+ *
+ * 9 ----10 ------11
+ * |      |       |
+ * |  0   |   1   |
+ * |      |       |
+ * |      |  6    |
+ *12 ----13-21----14
+ * |      |  |      |
+ * |      |7 |      |
+ * |  2   |  |  3   |
+ * |      |  |      |
+ *15 ----16-22----17
+ * |      |  |      |
+ * |  4   |  |  5   |
+ * |      |8 |      |
+ * |      |  |      |
+ *18 ----19-23 ----20
+ *
+ */
+
+#include "CohesiveDataQuad4i.hh"
+
+const int pylith::faults::CohesiveDataQuad4i::_numVertices = 15;
+
+const int pylith::faults::CohesiveDataQuad4i::_spaceDim = 2;
+
+const int pylith::faults::CohesiveDataQuad4i::_numCells = 9;
+
+const int pylith::faults::CohesiveDataQuad4i::_cellDim = 2;
+
+const int pylith::faults::CohesiveDataQuad4i::_numCorners[9] = {
+  4, 4, 4, 4, 4, 4,
+  3, 4, 4,
+};
+
+const int pylith::faults::CohesiveDataQuad4i::_materialIds[9] = {
+  10, 10, 10, 11, 10, 11,
+  1, 1, 1,
+};
+
+const int pylith::faults::CohesiveDataQuad4i::_numGroups = 3;
+
+const int pylith::faults::CohesiveDataQuad4i::_groupSizes[3] = {
+  3+2, 4+2, 6+4, // vertices+edges
+};
+
+const char* pylith::faults::CohesiveDataQuad4i::_groupNames[3] = {
+  "output2", "output1", "fault",
+};
+
+const char* pylith::faults::CohesiveDataQuad4i::_groupTypes[3] = {
+  "vertex", "vertex", "vertex",
+};
+
+const char* pylith::faults::CohesiveDataQuad4i::_filename = 
+  "data/quad4i.mesh";
+
+pylith::faults::CohesiveDataQuad4i::CohesiveDataQuad4i(void)
+{ // constructor
+  numVertices = _numVertices;
+  spaceDim = _spaceDim;
+  numCells = _numCells;
+  cellDim = _cellDim;
+  numCorners = const_cast<int*>(_numCorners);
+  materialIds = const_cast<int*>(_materialIds);
+  groupSizes = const_cast<int*>(_groupSizes);
+  groupNames = const_cast<char**>(_groupNames);
+  groupTypes = const_cast<char**>(_groupTypes);
+  numGroups = _numGroups;
+  filename = const_cast<char*>(_filename);
+} // constructor
+
+pylith::faults::CohesiveDataQuad4i::~CohesiveDataQuad4i(void)
+{}
+
+
+// End of file
diff --git a/unittests/libtests/faults/data/CohesiveDataHex8.hh b/unittests/libtests/faults/data/CohesiveDataQuad4i.hh
similarity index 84%
copy from unittests/libtests/faults/data/CohesiveDataHex8.hh
copy to unittests/libtests/faults/data/CohesiveDataQuad4i.hh
index 125287d..9a773ac 100644
--- a/unittests/libtests/faults/data/CohesiveDataHex8.hh
+++ b/unittests/libtests/faults/data/CohesiveDataQuad4i.hh
@@ -16,28 +16,28 @@
 // ======================================================================
 //
 
-#if !defined(pylith_faults_cohesivedatahex8_hh)
-#define pylith_faults_cohesivedatahex8_hh
+#if !defined(pylith_faults_cohesivedataquad4i_hh)
+#define pylith_faults_cohesivedataquad4i_hh
 
 #include "CohesiveData.hh"
 
 namespace pylith {
   namespace faults {
-     class CohesiveDataHex8;
+     class CohesiveDataQuad4i;
   } // pylith
 } // faults
 
-class pylith::faults::CohesiveDataHex8 : public CohesiveData
+class pylith::faults::CohesiveDataQuad4i : public CohesiveData
 {
 
 // PUBLIC METHODS ///////////////////////////////////////////////////////
 public: 
 
   /// Constructor
-  CohesiveDataHex8(void);
+  CohesiveDataQuad4i(void);
 
   /// Destructor
-  ~CohesiveDataHex8(void);
+  ~CohesiveDataQuad4i(void);
 
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private:
@@ -58,6 +58,6 @@ private:
   static const char* _filename; ///< Filename of input mesh
 };
 
-#endif // pylith_faults_cohesivedatahex8_hh
+#endif // pylith_faults_cohesivedataquad4i_hh
 
 // End of file
diff --git a/unittests/libtests/faults/data/CohesiveDataTet4j.cc b/unittests/libtests/faults/data/CohesiveDataTri3g.cc
similarity index 52%
copy from unittests/libtests/faults/data/CohesiveDataTet4j.cc
copy to unittests/libtests/faults/data/CohesiveDataTri3g.cc
index 136ed71..4877cf4 100644
--- a/unittests/libtests/faults/data/CohesiveDataTet4j.cc
+++ b/unittests/libtests/faults/data/CohesiveDataTri3g.cc
@@ -18,51 +18,44 @@
 
 /* Original mesh
  *
- * Cells are 0-5,6 vertices are 7-18.
  */
 
-#include "CohesiveDataTet4j.hh"
+#include "CohesiveDataTri3g.hh"
 
-const int pylith::faults::CohesiveDataTet4j::_numVertices = 12;
+const int pylith::faults::CohesiveDataTri3g::_numVertices = 9;
 
-const int pylith::faults::CohesiveDataTet4j::_spaceDim = 3;
+const int pylith::faults::CohesiveDataTri3g::_spaceDim = 2;
 
-const int pylith::faults::CohesiveDataTet4j::_numCells = 7;
+const int pylith::faults::CohesiveDataTri3g::_numCells = 8;
 
-const int pylith::faults::CohesiveDataTet4j::_cellDim = 3;
+const int pylith::faults::CohesiveDataTri3g::_cellDim = 2;
 
-const int pylith::faults::CohesiveDataTet4j::_numCorners[7] = {
-  4,
-  4,
-  4,
-  4,
-  4,
-  4,
-  6,
+const int pylith::faults::CohesiveDataTri3g::_numCorners[8] = {
+  3, 3, 3, 3, 3, 3,
+  3, 4,
 };
 
-const int pylith::faults::CohesiveDataTet4j::_materialIds[7] = {
-  0, 2, 2, 0, 2, 0,
-  1,
+const int pylith::faults::CohesiveDataTri3g::_materialIds[8] = {
+  0,  2,  0,  2,  0,  2,
+  1, 1,
 };
 
-const int pylith::faults::CohesiveDataTet4j::_numGroups = 2;
+const int pylith::faults::CohesiveDataTri3g::_numGroups = 2;
 
-const int pylith::faults::CohesiveDataTet4j::_groupSizes[2] = {
-  8+10+4, 6+6+2 // vertices+edges+faces
-};
+const int pylith::faults::CohesiveDataTri3g::_groupSizes[2] = 
+  { 5+3, 4+2 }; // vertices+edges
 
-const char* pylith::faults::CohesiveDataTet4j::_groupNames[2] = {
+const char* pylith::faults::CohesiveDataTri3g::_groupNames[2] = {
   "output", "fault"
 };
 
-const char* pylith::faults::CohesiveDataTet4j::_groupTypes[2] = {
+const char* pylith::faults::CohesiveDataTri3g::_groupTypes[2] = {
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataTet4j::_filename = "data/tet4j.mesh";
+const char* pylith::faults::CohesiveDataTri3g::_filename = "data/tri3g.mesh";
 
-pylith::faults::CohesiveDataTet4j::CohesiveDataTet4j(void)
+pylith::faults::CohesiveDataTri3g::CohesiveDataTri3g(void)
 { // constructor
   numVertices = _numVertices;
   spaceDim = _spaceDim;
@@ -77,7 +70,7 @@ pylith::faults::CohesiveDataTet4j::CohesiveDataTet4j(void)
   filename = const_cast<char*>(_filename);
 } // constructor
 
-pylith::faults::CohesiveDataTet4j::~CohesiveDataTet4j(void)
+pylith::faults::CohesiveDataTri3g::~CohesiveDataTri3g(void)
 {}
 
 
diff --git a/unittests/libtests/faults/data/CohesiveDataHex8.hh b/unittests/libtests/faults/data/CohesiveDataTri3g.hh
similarity index 84%
copy from unittests/libtests/faults/data/CohesiveDataHex8.hh
copy to unittests/libtests/faults/data/CohesiveDataTri3g.hh
index 125287d..18d36f8 100644
--- a/unittests/libtests/faults/data/CohesiveDataHex8.hh
+++ b/unittests/libtests/faults/data/CohesiveDataTri3g.hh
@@ -16,28 +16,28 @@
 // ======================================================================
 //
 
-#if !defined(pylith_faults_cohesivedatahex8_hh)
-#define pylith_faults_cohesivedatahex8_hh
+#if !defined(pylith_faults_cohesivedatatri3g_hh)
+#define pylith_faults_cohesivedatatri3g_hh
 
 #include "CohesiveData.hh"
 
 namespace pylith {
   namespace faults {
-     class CohesiveDataHex8;
+     class CohesiveDataTri3g;
   } // pylith
 } // faults
 
-class pylith::faults::CohesiveDataHex8 : public CohesiveData
+class pylith::faults::CohesiveDataTri3g : public CohesiveData
 {
 
 // PUBLIC METHODS ///////////////////////////////////////////////////////
 public: 
 
   /// Constructor
-  CohesiveDataHex8(void);
+  CohesiveDataTri3g(void);
 
   /// Destructor
-  ~CohesiveDataHex8(void);
+  ~CohesiveDataTri3g(void);
 
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private:
@@ -58,6 +58,6 @@ private:
   static const char* _filename; ///< Filename of input mesh
 };
 
-#endif // pylith_faults_cohesivedatahex8_hh
+#endif // pylith_faults_cohesivedatatri3g_hh
 
 // End of file
diff --git a/unittests/libtests/faults/data/CohesiveDataTet4j.cc b/unittests/libtests/faults/data/CohesiveDataTri3h.cc
similarity index 52%
copy from unittests/libtests/faults/data/CohesiveDataTet4j.cc
copy to unittests/libtests/faults/data/CohesiveDataTri3h.cc
index 136ed71..0cfe476 100644
--- a/unittests/libtests/faults/data/CohesiveDataTet4j.cc
+++ b/unittests/libtests/faults/data/CohesiveDataTri3h.cc
@@ -18,51 +18,45 @@
 
 /* Original mesh
  *
- * Cells are 0-5,6 vertices are 7-18.
  */
 
-#include "CohesiveDataTet4j.hh"
+#include "CohesiveDataTri3h.hh"
 
-const int pylith::faults::CohesiveDataTet4j::_numVertices = 12;
+const int pylith::faults::CohesiveDataTri3h::_numVertices = 13;
 
-const int pylith::faults::CohesiveDataTet4j::_spaceDim = 3;
+const int pylith::faults::CohesiveDataTri3h::_spaceDim = 2;
 
-const int pylith::faults::CohesiveDataTet4j::_numCells = 7;
+const int pylith::faults::CohesiveDataTri3h::_numCells = 15;
 
-const int pylith::faults::CohesiveDataTet4j::_cellDim = 3;
+const int pylith::faults::CohesiveDataTri3h::_cellDim = 2;
 
-const int pylith::faults::CohesiveDataTet4j::_numCorners[7] = {
-  4,
-  4,
-  4,
-  4,
-  4,
-  4,
-  6,
+const int pylith::faults::CohesiveDataTri3h::_numCorners[15] = {
+  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,  3,
+  4, 3, 4, 3,
 };
 
-const int pylith::faults::CohesiveDataTet4j::_materialIds[7] = {
-  0, 2, 2, 0, 2, 0,
-  1,
+const int pylith::faults::CohesiveDataTri3h::_materialIds[15] = {
+  0, 0, 0, 0, 
+  2, 2, 3, 3, 3, 2, 3,
+  1, 1, 1, 1,
 };
 
-const int pylith::faults::CohesiveDataTet4j::_numGroups = 2;
+const int pylith::faults::CohesiveDataTri3h::_numGroups = 2;
 
-const int pylith::faults::CohesiveDataTet4j::_groupSizes[2] = {
-  8+10+4, 6+6+2 // vertices+edges+faces
-};
+const int pylith::faults::CohesiveDataTri3h::_groupSizes[2] = 
+  { 3+2, 6+4 }; // vertices+edges
 
-const char* pylith::faults::CohesiveDataTet4j::_groupNames[2] = {
+const char* pylith::faults::CohesiveDataTri3h::_groupNames[2] = {
   "output", "fault"
 };
 
-const char* pylith::faults::CohesiveDataTet4j::_groupTypes[2] = {
+const char* pylith::faults::CohesiveDataTri3h::_groupTypes[2] = {
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataTet4j::_filename = "data/tet4j.mesh";
+const char* pylith::faults::CohesiveDataTri3h::_filename = "data/tri3h.mesh";
 
-pylith::faults::CohesiveDataTet4j::CohesiveDataTet4j(void)
+pylith::faults::CohesiveDataTri3h::CohesiveDataTri3h(void)
 { // constructor
   numVertices = _numVertices;
   spaceDim = _spaceDim;
@@ -77,7 +71,7 @@ pylith::faults::CohesiveDataTet4j::CohesiveDataTet4j(void)
   filename = const_cast<char*>(_filename);
 } // constructor
 
-pylith::faults::CohesiveDataTet4j::~CohesiveDataTet4j(void)
+pylith::faults::CohesiveDataTri3h::~CohesiveDataTri3h(void)
 {}
 
 
diff --git a/unittests/libtests/faults/data/CohesiveDataHex8.hh b/unittests/libtests/faults/data/CohesiveDataTri3h.hh
similarity index 84%
copy from unittests/libtests/faults/data/CohesiveDataHex8.hh
copy to unittests/libtests/faults/data/CohesiveDataTri3h.hh
index 125287d..9b08327 100644
--- a/unittests/libtests/faults/data/CohesiveDataHex8.hh
+++ b/unittests/libtests/faults/data/CohesiveDataTri3h.hh
@@ -16,28 +16,28 @@
 // ======================================================================
 //
 
-#if !defined(pylith_faults_cohesivedatahex8_hh)
-#define pylith_faults_cohesivedatahex8_hh
+#if !defined(pylith_faults_cohesivedatatri3h_hh)
+#define pylith_faults_cohesivedatatri3h_hh
 
 #include "CohesiveData.hh"
 
 namespace pylith {
   namespace faults {
-     class CohesiveDataHex8;
+     class CohesiveDataTri3h;
   } // pylith
 } // faults
 
-class pylith::faults::CohesiveDataHex8 : public CohesiveData
+class pylith::faults::CohesiveDataTri3h : public CohesiveData
 {
 
 // PUBLIC METHODS ///////////////////////////////////////////////////////
 public: 
 
   /// Constructor
-  CohesiveDataHex8(void);
+  CohesiveDataTri3h(void);
 
   /// Destructor
-  ~CohesiveDataHex8(void);
+  ~CohesiveDataTri3h(void);
 
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private:
@@ -58,6 +58,6 @@ private:
   static const char* _filename; ///< Filename of input mesh
 };
 
-#endif // pylith_faults_cohesivedatahex8_hh
+#endif // pylith_faults_cohesivedatatri3h_hh
 
 // End of file
diff --git a/unittests/libtests/faults/data/Makefile.am b/unittests/libtests/faults/data/Makefile.am
index 7606fba..f5e16be 100644
--- a/unittests/libtests/faults/data/Makefile.am
+++ b/unittests/libtests/faults/data/Makefile.am
@@ -26,6 +26,8 @@ dist_noinst_DATA = \
 	tri3d.mesh \
 	tri3e.mesh \
 	tri3f.mesh \
+	tri3g.mesh \
+	tri3h.mesh \
 	tri3_finalslip.spatialdb \
 	tri3_finalslipB.spatialdb \
 	tri3_sliptime.spatialdb \
@@ -46,6 +48,7 @@ dist_noinst_DATA = \
 	quad4f.mesh \
 	quad4g.mesh \
 	quad4h.mesh \
+	quad4i.mesh \
 	quad4_finalslip.spatialdb \
 	quad4_sliptime.spatialdb \
 	quad4_risetime.spatialdb \
diff --git a/unittests/libtests/faults/data/quad4i.mesh b/unittests/libtests/faults/data/quad4i.mesh
new file mode 100644
index 0000000..a38bd83
--- /dev/null
+++ b/unittests/libtests/faults/data/quad4i.mesh
@@ -0,0 +1,72 @@
+mesh = {
+  dimension = 2
+  use-index-zero = true
+  vertices = {
+    dimension = 2
+    count = 12
+    coordinates = {
+             0     -10.0   10.0
+             1       0.0   10.0
+             2     +10.0   10.0
+             3     -10.0    0.0
+             4       0.0    0.0
+             5     +10.0    0.0
+             6     -10.0  -10.0
+             7       0.0  -10.0
+             8     +10.0  -10.0
+             9     -10.0  -20.0
+            10       0.0  -20.0
+            11     +10.0  -20.0
+    }
+  }
+  cells = {
+    count = 6
+    num-corners = 4
+    simplices = {
+             0       0  3  4  1
+             1       1  4  5  2
+             2       7  4  3  6
+             3       5  4  7  8
+             4       6  9 10  7
+             5       8  7 10 11
+    }
+    material-ids = {
+             0   10
+             1   10
+             2   10
+             3   11
+             4   10
+             5   11
+    }
+  }
+  group = {
+    name = fault
+    type = vertices
+    count = 3
+    indices = {
+      4
+      7
+     10
+    }
+  }
+  group = {
+    name = output1
+    type = vertices
+    count = 3
+    indices = {
+      9
+     10
+     11
+    }
+  }
+  group = {
+    name = output2
+    type = vertices
+    count = 3
+    indices = {
+      0
+      1
+      2
+    }
+  }
+}
diff --git a/unittests/libtests/faults/data/tri3g.mesh b/unittests/libtests/faults/data/tri3g.mesh
new file mode 100644
index 0000000..5d803f3
--- /dev/null
+++ b/unittests/libtests/faults/data/tri3g.mesh
@@ -0,0 +1,73 @@
+// Original mesh
+//
+//       0
+//     / | \
+//   /   |  \
+//  1  0 | 1  3
+//  |\   |   /|
+//  |  \ | /  |
+//  | 2  2  3 |
+//  |  / | \  |
+//  |/   |   \|
+//  4  4 | 5  6
+//   \   |   /
+//     \ | /
+//       5
+//
+mesh = {
+  dimension = 2
+  use-index-zero = true
+  vertices = {
+    dimension = 2
+    count = 7
+    coordinates = {
+             0      0.0  +2.0
+             1     -1.0  +1.0
+             2      0.0   0.0
+             3     +1.0  +1.0
+             4     -1.0  -1.0
+             5      0.0  -2.0
+             6     +1.0  -1.0
+    }
+  }
+  cells = {
+    count = 6
+    num-corners = 3
+    simplices = {
+             0       0  1  2
+             1       2  3  0
+             2       1  4  2
+             3       3  2  6
+             4       2  4  5
+             5       5  6  2
+    }
+    material-ids = {
+             0   0
+             1   2
+             2   0
+             3   2
+             4   0
+             5   2
+    }
+  }
+  group = {
+    name = fault
+    type = vertices
+    count = 2
+    indices = {
+      2
+      5
+    }
+  }
+  group = {
+    name = output
+    type = vertices
+    count = 4
+    indices = {
+      0
+      3
+      5
+      6
+    }
+  }
+}
diff --git a/unittests/libtests/faults/data/tri3h.mesh b/unittests/libtests/faults/data/tri3h.mesh
new file mode 100644
index 0000000..60df063
--- /dev/null
+++ b/unittests/libtests/faults/data/tri3h.mesh
@@ -0,0 +1,70 @@
+mesh = {
+  dimension = 2
+  use-index-zero = true
+  vertices = {
+    dimension = 2
+    count = 10
+    coordinates = {
+             0     -1.0  +1.0
+             1     +1.0  +1.0
+             2     -1.0   0.0
+             3      0.0   0.0
+             4     +1.0   0.0
+             5     +2.0   0.0
+             6     -1.0  -1.0
+             7      0.0  -1.0
+             8     +1.0  -1.0
+             9      0.0  -2.0
+    }
+  }
+  cells = {
+    count = 11
+    num-corners = 3
+    simplices = {
+             0       0  2  3
+             1       3  1  0
+             2       4  1  3
+             3       4  5  1
+             4       2  6  7
+             5       3  2  7
+             6       7  8  3
+             7       3  8  4
+             8       4  8  5
+             9       6  9  7
+            10       7  9  8
+    }
+    material-ids = {
+             0   0
+             1   0
+             2   0
+             3   0
+             4   2
+             5   2
+             6   3
+             7   3
+             8   3
+             9   2
+            10   3
+    }
+  }
+  group = {
+    name = fault
+    type = vertices
+    count = 3
+    indices = {
+      3
+      4
+      7
+    }
+  }
+  group = {
+    name = output
+    type = vertices
+    count = 3
+    indices = {
+      0
+      2
+      6
+    }
+  }
+}



More information about the CIG-COMMITS mailing list