[cig-commits] r7420 - in
short/3D/PyLith/trunk/unittests/libtests/faults: . data
brad at geodynamics.org
brad at geodynamics.org
Sat Jun 23 11:32:26 PDT 2007
Author: brad
Date: 2007-06-23 11:32:25 -0700 (Sat, 23 Jun 2007)
New Revision: 7420
Added:
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4f.mesh
short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4g.mesh
short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4h.mesh
Modified:
short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am
Log:
Added unit test exposing fault orientation bug (need consistent orientation across cohesive cells).
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am 2007-06-23 18:32:25 UTC (rev 7420)
@@ -68,12 +68,15 @@
data/CohesiveDataQuad4c.cc \
data/CohesiveDataQuad4d.cc \
data/CohesiveDataQuad4e.cc \
+ data/CohesiveDataQuad4f.cc \
data/CohesiveDataQuad4Lagrange.cc \
data/CohesiveDataTet4.cc \
data/CohesiveDataTet4b.cc \
data/CohesiveDataTet4c.cc \
data/CohesiveDataTet4d.cc \
data/CohesiveDataTet4f.cc \
+ data/CohesiveDataTet4g.cc \
+ data/CohesiveDataTet4h.cc \
data/CohesiveDataTet4Lagrange.cc \
data/CohesiveDataHex8.cc \
data/CohesiveDataHex8b.cc \
@@ -107,12 +110,15 @@
data/CohesiveDataQuad4c.hh \
data/CohesiveDataQuad4d.hh \
data/CohesiveDataQuad4e.hh \
+ data/CohesiveDataQuad4f.hh \
data/CohesiveDataQuad4Lagrange.hh \
data/CohesiveDataTet4.hh \
data/CohesiveDataTet4b.hh \
data/CohesiveDataTet4c.hh \
data/CohesiveDataTet4d.hh \
data/CohesiveDataTet4f.hh \
+ data/CohesiveDataTet4g.hh \
+ data/CohesiveDataTet4h.hh \
data/CohesiveDataTet4Lagrange.hh \
data/CohesiveDataHex8.hh \
data/CohesiveDataHex8b.hh \
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc 2007-06-23 18:32:25 UTC (rev 7420)
@@ -32,11 +32,14 @@
#include "data/CohesiveDataQuad4c.hh" // USES CohesiveDataQuad4c
#include "data/CohesiveDataQuad4d.hh" // USES CohesiveDataQuad4d
#include "data/CohesiveDataQuad4e.hh" // USES CohesiveDataQuad4e
+#include "data/CohesiveDataQuad4f.hh" // USES CohesiveDataQuad4f
#include "data/CohesiveDataTet4.hh" // USES CohesiveDataTet4
#include "data/CohesiveDataTet4b.hh" // USES CohesiveDataTet4b
#include "data/CohesiveDataTet4c.hh" // USES CohesiveDataTet4c
#include "data/CohesiveDataTet4d.hh" // USES CohesiveDataTet4d
#include "data/CohesiveDataTet4f.hh" // USES CohesiveDataTet4f
+#include "data/CohesiveDataTet4g.hh" // USES CohesiveDataTet4g
+#include "data/CohesiveDataTet4h.hh" // USES CohesiveDataTet4h
#include "data/CohesiveDataHex8.hh" // USES CohesiveDataHex8
#include "data/CohesiveDataHex8b.hh" // USES CohesiveDataHex8b
#include "data/CohesiveDataHex8c.hh" // USES CohesiveDataHex8c
@@ -154,6 +157,16 @@
} // testAdjustTopologyQuad4e
// ----------------------------------------------------------------------
+// Test adjustTopology() with 2-D quadrilateral element.
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyQuad4f(void)
+{ // testAdjustTopologyQuad4fs
+ CohesiveDataQuad4f data;
+ FaultCohesiveDyn fault;
+ _testAdjustTopology(&fault, data);
+} // testAdjustTopologyQuad4f
+
+// ----------------------------------------------------------------------
// Test adjustTopology() with 3-D tetrahedral element.
void
pylith::faults::TestFaultCohesive::testAdjustTopologyTet4(void)
@@ -204,6 +217,26 @@
} // testAdjustTopologyTet4f
// ----------------------------------------------------------------------
+// Test adjustTopology() with 3-D tetrahedral element (face g).
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyTet4g(void)
+{ // testAdjustTopologyTet4g
+ CohesiveDataTet4g data;
+ FaultCohesiveDyn fault;
+ _testAdjustTopology(&fault, data);
+} // testAdjustTopologyTet4g
+
+// ----------------------------------------------------------------------
+// Test adjustTopology() with 3-D tetrahedral element (face h).
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyTet4h(void)
+{ // testAdjustTopologyTet4h
+ CohesiveDataTet4h data;
+ FaultCohesiveDyn fault;
+ _testAdjustTopology(&fault, data);
+} // testAdjustTopologyTet4h
+
+// ----------------------------------------------------------------------
// Test adjustTopology() with 3-D hexahedral element.
void
pylith::faults::TestFaultCohesive::testAdjustTopologyHex8(void)
@@ -432,7 +465,7 @@
ALE::Obj<ALE::Mesh> mesh;
meshio::MeshIOAscii iohandler;
iohandler.filename(data.filename);
- iohandler.debug(false);
+ iohandler.debug(true);
iohandler.interpolate(false);
iohandler.read(&mesh);
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.hh 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.hh 2007-06-23 18:32:25 UTC (rev 7420)
@@ -51,11 +51,14 @@
CPPUNIT_TEST( testAdjustTopologyQuad4c );
CPPUNIT_TEST( testAdjustTopologyQuad4d );
CPPUNIT_TEST( testAdjustTopologyQuad4e );
+ CPPUNIT_TEST( testAdjustTopologyQuad4f );
CPPUNIT_TEST( testAdjustTopologyTet4 );
CPPUNIT_TEST( testAdjustTopologyTet4b );
CPPUNIT_TEST( testAdjustTopologyTet4c );
CPPUNIT_TEST( testAdjustTopologyTet4d );
CPPUNIT_TEST( testAdjustTopologyTet4f );
+ CPPUNIT_TEST( testAdjustTopologyTet4g );
+ CPPUNIT_TEST( testAdjustTopologyTet4h );
CPPUNIT_TEST( testAdjustTopologyHex8 );
CPPUNIT_TEST( testAdjustTopologyHex8b );
CPPUNIT_TEST( testAdjustTopologyHex8c );
@@ -108,6 +111,9 @@
/// Test adjustTopology() with 2-D quadrilateral element (2 cohesive cells).
void testAdjustTopologyQuad4e(void);
+ /// Test adjustTopology() with 2-D quadrilateral element (2 cohesive cells b).
+ void testAdjustTopologyQuad4f(void);
+
/// Test adjustTopology() with 3-D tetrahedral element.
void testAdjustTopologyTet4(void);
@@ -123,6 +129,12 @@
/// Test adjustTopology() with 3-D tetrahedral element (reverse cell order).
void testAdjustTopologyTet4f(void);
+ /// Test adjustTopology() with 3-D tetrahedral element (face g).
+ void testAdjustTopologyTet4g(void);
+
+ /// Test adjustTopology() with 3-D tetrahedral element (face h).
+ void testAdjustTopologyTet4h(void);
+
/// Test adjustTopology() with 3-D hexahedral element.
void testAdjustTopologyHex8(void);
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.cc 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.cc 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,153 @@
+// -*- 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--15 --------12
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * 5 -------- 7--14 -------- 9
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * 4 -------- 6--13 -------- 8
+ */
+
+#include "CohesiveDataQuad4f.hh"
+
+const int pylith::faults::CohesiveDataQuad4f::_numVertices = 12;
+
+const int pylith::faults::CohesiveDataQuad4f::_spaceDim = 2;
+
+const int pylith::faults::CohesiveDataQuad4f::_numCells = 6;
+
+const int pylith::faults::CohesiveDataQuad4f::_cellDim = 2;
+
+const double pylith::faults::CohesiveDataQuad4f::_vertices[] = {
+ -2.0, -1.0,
+ -2.0, 1.0,
+ 0.0, -1.0,
+ 0.0, 1.0,
+ 2.0, -1.0,
+ 2.0, 1.0,
+ -2.0, 3.0,
+ 0.0, 3.0,
+ 2.0, 3.0,
+ 0.0, -1.0,
+ 0.0, 1.0,
+ 0.0, 3.0,
+};
+
+const int pylith::faults::CohesiveDataQuad4f::_numCorners[] = {
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+ 4,
+};
+
+const int pylith::faults::CohesiveDataQuad4f::_cells[] = {
+ 5, 7, 11, 10,
+ 14, 9, 12, 15,
+ 13, 8, 9, 14,
+ 4, 6, 7, 5,
+ 6, 7, 13, 14,
+ 7, 11, 14, 15,
+};
+
+const int pylith::faults::CohesiveDataQuad4f::_materialIds[] = {
+ 0, 0, 0, 0,
+ 1, 1,
+};
+
+const int pylith::faults::CohesiveDataQuad4f::_numGroups = 2;
+
+const int pylith::faults::CohesiveDataQuad4f::_groupSizes[] =
+ { 6, 4 };
+
+const int pylith::faults::CohesiveDataQuad4f::_groups[] = {
+ 6, 7, 11, 13, 14, 15,
+ 5, 7, 9, 14
+};
+
+const char* pylith::faults::CohesiveDataQuad4f::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveDataQuad4f::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveDataQuad4f::_filename =
+ "data/quad4f.mesh";
+
+pylith::faults::CohesiveDataQuad4f::CohesiveDataQuad4f(void)
+{ // constructor
+ numVertices = _numVertices;
+ spaceDim = _spaceDim;
+ numCells = _numCells;
+ cellDim = _cellDim;
+ vertices = const_cast<double*>(_vertices);
+ numCorners = const_cast<int*>(_numCorners);
+ cells = const_cast<int*>(_cells);
+ materialIds = const_cast<int*>(_materialIds);
+ groups = const_cast<int*>(_groups);
+ 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::CohesiveDataQuad4f::~CohesiveDataQuad4f(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.hh 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.hh 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivedataquad4f_hh)
+#define pylith_faults_cohesivedataquad4f_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveDataQuad4f;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveDataQuad4f : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveDataQuad4f(void);
+
+ /// Destructor
+ ~CohesiveDataQuad4f(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numVertices; ///< Number of vertices
+ static const int _spaceDim; ///< Number of dimensions in vertex coordinates
+ static const int _numCells; ///< Number of cells
+ static const int _cellDim; ///< Number of dimensions associated with cell
+
+ static const double _vertices[]; ///< Pointer to coordinates of vertices
+ static const int _numCorners[]; ///< Number of vertices in cell
+ static const int _cells[]; ///< Pointer to indices of vertices in cells
+ static const int _materialIds[]; ///< Pointer to cell material identifiers
+
+ static const int _groups[]; ///< Groups of points
+ static const int _groupSizes[]; ///< Sizes of groups
+ static const char* _groupNames[]; ///< Array of group names
+ static const char* _groupTypes[]; ///< Array of group types
+ static const int _numGroups; ///< Number of groups
+
+ static const char* _filename; ///< Filename of input mesh
+};
+
+#endif // pylith_faults_cohesivedataquad4f_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.cc 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.cc 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,110 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1, vertices are 2-6.
+ *
+ * 2 3,4,5 6
+ *
+ * ^^^^^ Face in x-y plane
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1,10, vertices are 2-9.
+ *
+ * 2 3,4,5 7,8,9 6
+ *
+ * ^^^^^^^^^^^^ Cohesive element in x-y plane.
+ */
+
+#include "CohesiveDataTet4g.hh"
+
+const int pylith::faults::CohesiveDataTet4g::_numVertices = 8;
+
+const int pylith::faults::CohesiveDataTet4g::_spaceDim = 3;
+
+const int pylith::faults::CohesiveDataTet4g::_numCells = 3;
+
+const int pylith::faults::CohesiveDataTet4g::_cellDim = 3;
+
+const double pylith::faults::CohesiveDataTet4g::_vertices[] = {
+ -1.0, 0.0, 0.0,
+ 0.0, -1.0, 0.0,
+ 0.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0,
+ 1.0, 0.0, 0.0,
+ 0.0, -1.0, 0.0,
+ 0.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0
+};
+
+const int pylith::faults::CohesiveDataTet4g::_numCorners[] = {
+ 4,
+ 4,
+ 6
+};
+
+const int pylith::faults::CohesiveDataTet4g::_cells[] = {
+ 3, 5, 4, 6,
+ 7, 9, 2, 8,
+ 4, 5, 3, 8, 9, 7
+};
+
+const int pylith::faults::CohesiveDataTet4g::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveDataTet4g::_numGroups = 2;
+
+const int pylith::faults::CohesiveDataTet4g::_groupSizes[] =
+ { 6, 5 };
+
+const int pylith::faults::CohesiveDataTet4g::_groups[] = {
+ 3, 4, 5, 7, 8, 9,
+ 2, 4, 5, 8, 9
+};
+
+const char* pylith::faults::CohesiveDataTet4g::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveDataTet4g::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveDataTet4g::_filename = "data/tet4g.mesh";
+
+pylith::faults::CohesiveDataTet4g::CohesiveDataTet4g(void)
+{ // constructor
+ numVertices = _numVertices;
+ spaceDim = _spaceDim;
+ numCells = _numCells;
+ cellDim = _cellDim;
+ vertices = const_cast<double*>(_vertices);
+ numCorners = const_cast<int*>(_numCorners);
+ cells = const_cast<int*>(_cells);
+ materialIds = const_cast<int*>(_materialIds);
+ groups = const_cast<int*>(_groups);
+ 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::CohesiveDataTet4g::~CohesiveDataTet4g(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.hh 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.hh 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivedatatet4g_hh)
+#define pylith_faults_cohesivedatatet4g_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveDataTet4g;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveDataTet4g : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveDataTet4g(void);
+
+ /// Destructor
+ ~CohesiveDataTet4g(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numVertices; ///< Number of vertices
+ static const int _spaceDim; ///< Number of dimensions in vertex coordinates
+ static const int _numCells; ///< Number of cells
+ static const int _cellDim; ///< Number of dimensions associated with cell
+
+ static const double _vertices[]; ///< Pointer to coordinates of vertices
+ static const int _numCorners[]; ///< Number of vertices in cell
+ static const int _cells[]; ///< Pointer to indices of vertices in cells
+ static const int _materialIds[]; ///< Pointer to cell material identifiers
+
+ static const int _groups[]; ///< Groups of points
+ static const int _groupSizes[]; ///< Sizes of groups
+ static const char* _groupNames[]; ///< Array of group names
+ static const char* _groupTypes[]; ///< Array of group types
+ static const int _numGroups; ///< Number of groups
+
+ static const char* _filename; ///< Filename of input mesh
+};
+
+#endif // pylith_faults_cohesivedatatet4g_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.cc 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.cc 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,110 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1, vertices are 2-6.
+ *
+ * 2 3,4,5 6
+ *
+ * ^^^^^ Face in x-y plane
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1,10, vertices are 2-9.
+ *
+ * 2 3,4,5 7,8,9 6
+ *
+ * ^^^^^^^^^^^^ Cohesive element in x-y plane.
+ */
+
+#include "CohesiveDataTet4h.hh"
+
+const int pylith::faults::CohesiveDataTet4h::_numVertices = 8;
+
+const int pylith::faults::CohesiveDataTet4h::_spaceDim = 3;
+
+const int pylith::faults::CohesiveDataTet4h::_numCells = 3;
+
+const int pylith::faults::CohesiveDataTet4h::_cellDim = 3;
+
+const double pylith::faults::CohesiveDataTet4h::_vertices[] = {
+ -1.0, 0.0, 0.0,
+ 0.0, -1.0, 0.0,
+ 0.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0,
+ 1.0, 0.0, 0.0,
+ 0.0, -1.0, 0.0,
+ 0.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0
+};
+
+const int pylith::faults::CohesiveDataTet4h::_numCorners[] = {
+ 4,
+ 4,
+ 6
+};
+
+const int pylith::faults::CohesiveDataTet4h::_cells[] = {
+ 5, 4, 2, 3,
+ 9, 8, 7, 6,
+ 5, 4, 3, 9, 8, 7
+};
+
+const int pylith::faults::CohesiveDataTet4h::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveDataTet4h::_numGroups = 2;
+
+const int pylith::faults::CohesiveDataTet4h::_groupSizes[] =
+ { 6, 5 };
+
+const int pylith::faults::CohesiveDataTet4h::_groups[] = {
+ 3, 4, 5, 7, 8, 9,
+ 2, 4, 5, 8, 9
+};
+
+const char* pylith::faults::CohesiveDataTet4h::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveDataTet4h::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveDataTet4h::_filename = "data/tet4h.mesh";
+
+pylith::faults::CohesiveDataTet4h::CohesiveDataTet4h(void)
+{ // constructor
+ numVertices = _numVertices;
+ spaceDim = _spaceDim;
+ numCells = _numCells;
+ cellDim = _cellDim;
+ vertices = const_cast<double*>(_vertices);
+ numCorners = const_cast<int*>(_numCorners);
+ cells = const_cast<int*>(_cells);
+ materialIds = const_cast<int*>(_materialIds);
+ groups = const_cast<int*>(_groups);
+ 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::CohesiveDataTet4h::~CohesiveDataTet4h(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.hh 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.hh 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivedatatet4h_hh)
+#define pylith_faults_cohesivedatatet4h_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveDataTet4h;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveDataTet4h : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveDataTet4h(void);
+
+ /// Destructor
+ ~CohesiveDataTet4h(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numVertices; ///< Number of vertices
+ static const int _spaceDim; ///< Number of dimensions in vertex coordinates
+ static const int _numCells; ///< Number of cells
+ static const int _cellDim; ///< Number of dimensions associated with cell
+
+ static const double _vertices[]; ///< Pointer to coordinates of vertices
+ static const int _numCorners[]; ///< Number of vertices in cell
+ static const int _cells[]; ///< Pointer to indices of vertices in cells
+ static const int _materialIds[]; ///< Pointer to cell material identifiers
+
+ static const int _groups[]; ///< Groups of points
+ static const int _groupSizes[]; ///< Sizes of groups
+ static const char* _groupNames[]; ///< Array of group names
+ static const char* _groupTypes[]; ///< Array of group types
+ static const int _numGroups; ///< Number of groups
+
+ static const char* _filename; ///< Filename of input mesh
+};
+
+#endif // pylith_faults_cohesivedatatet4h_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-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am 2007-06-23 18:32:25 UTC (rev 7420)
@@ -33,6 +33,7 @@
quad4c.mesh \
quad4d.mesh \
quad4e.mesh \
+ quad4f.mesh \
quad4_finalslip.spatialdb \
quad4_sliptime.spatialdb \
quad4_peakrate.spatialdb \
@@ -45,6 +46,8 @@
tet4d.mesh \
tet4e.mesh \
tet4f.mesh \
+ tet4g.mesh \
+ tet4h.mesh \
tet4_finalslip.spatialdb \
tet4_sliptime.spatialdb \
tet4_peakrate.spatialdb \
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4f.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4f.mesh 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4f.mesh 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,55 @@
+mesh = {
+ dimension = 2
+ use-index-zero = true
+ vertices = {
+ dimension = 2
+ count = 9
+ coordinates = {
+ 0 -2.0 -1.0
+ 1 -2.0 1.0
+ 2 0.0 -1.0
+ 3 0.0 1.0
+ 4 2.0 -1.0
+ 5 2.0 1.0
+ 6 -2.0 3.0
+ 7 0.0 3.0
+ 8 2.0 3.0
+ }
+ }
+ cells = {
+ count = 4
+ num-corners = 4
+ simplices = {
+ 0 1 3 7 6
+ 1 3 5 8 7
+ 2 2 4 5 3
+ 3 0 2 3 1
+ }
+ material-ids = {
+ 0 0
+ 1 0
+ 2 0
+ 3 0
+ }
+ }
+ group = {
+ name = fault
+ type = vertices
+ count = 3
+ indices = {
+ 2
+ 3
+ 7
+ }
+ }
+ group = {
+ name = output
+ type = vertices
+ count = 3
+ indices = {
+ 1
+ 3
+ 5
+ }
+ }
+}
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4g.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4g.mesh 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4g.mesh 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,47 @@
+mesh = {
+ dimension = 3
+ use-index-zero = true
+ vertices = {
+ dimension = 3
+ count = 5
+ coordinates = {
+ 0 -1.0 0.0 0.0
+ 1 0.0 -1.0 0.0
+ 2 0.0 0.0 1.0
+ 3 0.0 1.0 0.0
+ 4 1.0 0.0 0.0
+ }
+ }
+ cells = {
+ count = 2
+ num-corners = 4
+ simplices = {
+ 0 1 3 2 4
+ 1 1 3 0 2
+ }
+ material-ids = {
+ 0 0
+ 1 0
+ }
+ }
+ group = {
+ name = fault
+ type = vertices
+ count = 3
+ indices = {
+ 1
+ 2
+ 3
+ }
+ }
+ group = {
+ name = output
+ type = vertices
+ count = 3
+ indices = {
+ 0
+ 2
+ 3
+ }
+ }
+}
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4h.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4h.mesh 2007-06-23 18:09:26 UTC (rev 7419)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4h.mesh 2007-06-23 18:32:25 UTC (rev 7420)
@@ -0,0 +1,47 @@
+mesh = {
+ dimension = 3
+ use-index-zero = true
+ vertices = {
+ dimension = 3
+ count = 5
+ coordinates = {
+ 0 -1.0 0.0 0.0
+ 1 0.0 -1.0 0.0
+ 2 0.0 0.0 1.0
+ 3 0.0 1.0 0.0
+ 4 1.0 0.0 0.0
+ }
+ }
+ cells = {
+ count = 2
+ num-corners = 4
+ simplices = {
+ 0 3 2 0 1
+ 1 3 2 1 4
+ }
+ material-ids = {
+ 0 0
+ 1 0
+ }
+ }
+ group = {
+ name = fault
+ type = vertices
+ count = 3
+ indices = {
+ 1
+ 2
+ 3
+ }
+ }
+ group = {
+ name = output
+ type = vertices
+ count = 3
+ indices = {
+ 0
+ 2
+ 3
+ }
+ }
+}
More information about the cig-commits
mailing list