[cig-commits] r7136 - in short/3D/PyLith/trunk: .
unittests/libtests/faults unittests/libtests/faults/data
brad at geodynamics.org
brad at geodynamics.org
Mon Jun 11 16:37:10 PDT 2007
Author: brad
Date: 2007-06-11 16:37:10 -0700 (Mon, 11 Jun 2007)
New Revision: 7136
Added:
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4b.mesh
short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4c.mesh
short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4d.mesh
Modified:
short/3D/PyLith/trunk/TODO
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 more C++ unit tests to check ordering of cohesive cells for tet4 meshes.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/TODO 2007-06-11 23:37:10 UTC (rev 7136)
@@ -26,7 +26,6 @@
3. Implement faults for kinematic source
a. Creation of cohesive cells
Add tests for each possible face as fault (CohesiveDataXXX).
- Tet
Hex
3. Allow use of all elasticity constants (9 for 2-D, 36 for 3-D).
@@ -69,48 +68,10 @@
UNRESOLVED ISSUES
======================================================================
-0. Basis functions for Lagrange elements (quad4, hex8, plus quadratic cells)
- [Matt]
-
-1. How to get orientation of faces at vertices? [discuss with Matt]
-
-2. Integration of nemesis (pylithic.py as mpi/python application) [Leif?]
-
======================================================================
THINGS WE NEED SIEVE TO DO (Matt)
======================================================================
-1. Create PETSc mesh with associated boundary condition meshes.
-
- In general we can only rely on mesh generators to provide vertices,
- cells, attributes for vertices and cells (i.e., one value for each
- vertex or cell), and groups of vertices and cells. As a result,
- boundary conditions would be associated with groups of
- vertices. This is nonunique if we require users to not allow
- multiple surfaces be associated with a single group of vertices. In
- other words, there is a unique set of faces for a group of
- vertices. For our boundary conditions we will want the N-1 dimension
- (where the mesh is N dimensions) representation of a subset of the
- mesh (i.e., 2-D mesh of fault surface).
-
- Inputs:
- * PETSc mesh
- * Group of vertices
- Outputs:
- * PETSc mesh with bc mesh
-
- Note: Above would be repeated for each group of vertices.
-
-2. Create cohesive cells.
-
- Inputs:
- * PETSc mesh
- * Surface meshes defining faults
- Output:
- * PETSc mesh with cohesive cells.
-
- Note: Not sure whether this would be done with global or distributed mesh.
-
3. Distribute mesh/bc in scalable manner.
Inputs:
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am 2007-06-11 23:37:10 UTC (rev 7136)
@@ -64,6 +64,9 @@
data/CohesiveDataHex8.cc \
data/CohesiveDataHex8Lagrange.cc \
data/CohesiveDataTet4.cc \
+ data/CohesiveDataTet4b.cc \
+ data/CohesiveDataTet4c.cc \
+ data/CohesiveDataTet4d.cc \
data/CohesiveDataTet4Lagrange.cc \
data/CohesiveKinData.cc \
data/CohesiveKinDataLine2.cc \
@@ -90,6 +93,9 @@
data/CohesiveDataHex8.hh \
data/CohesiveDataHex8Lagrange.hh \
data/CohesiveDataTet4.hh \
+ data/CohesiveDataTet4b.hh \
+ data/CohesiveDataTet4c.hh \
+ data/CohesiveDataTet4d.hh \
data/CohesiveDataTet4Lagrange.hh \
data/CohesiveKinData.hh \
data/CohesiveKinDataLine2.hh \
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc 2007-06-11 23:37:10 UTC (rev 7136)
@@ -33,6 +33,9 @@
#include "data/CohesiveDataQuad4d.hh" // USES CohesiveDataQuad4d
#include "data/CohesiveDataQuad4e.hh" // USES CohesiveDataQuad4e
#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/CohesiveDataHex8.hh" // USES CohesiveDataHex8
#include "data/CohesiveDataLine2Lagrange.hh" // USES CohesiveDataLine2Lagrange
@@ -155,6 +158,36 @@
} // testAdjustTopologyTet4
// ----------------------------------------------------------------------
+// Test adjustTopology() with 3-D tetrahedral element (face b).
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyTet4b(void)
+{ // testAdjustTopologyTet4b
+ CohesiveDataTet4b data;
+ FaultCohesiveDyn fault;
+ _testAdjustTopology(&fault, data);
+} // testAdjustTopologyTet4b
+
+// ----------------------------------------------------------------------
+// Test adjustTopology() with 3-D tetrahedral element (face b).
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyTet4c(void)
+{ // testAdjustTopologyTet4c
+ CohesiveDataTet4c data;
+ FaultCohesiveDyn fault;
+ _testAdjustTopology(&fault, data);
+} // testAdjustTopologyTet4c
+
+// ----------------------------------------------------------------------
+// Test adjustTopology() with 3-D tetrahedral element (face b).
+void
+pylith::faults::TestFaultCohesive::testAdjustTopologyTet4d(void)
+{ // testAdjustTopologyTet4d
+ CohesiveDataTet4d data;
+ FaultCohesiveDyn fault;
+ _testAdjustTopology(&fault, data);
+} // testAdjustTopologyTet4d
+
+// ----------------------------------------------------------------------
// Test adjustTopology() with 3-D hexahedral element.
void
pylith::faults::TestFaultCohesive::testAdjustTopologyHex8(void)
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.hh 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.hh 2007-06-11 23:37:10 UTC (rev 7136)
@@ -52,6 +52,9 @@
CPPUNIT_TEST( testAdjustTopologyQuad4d );
CPPUNIT_TEST( testAdjustTopologyQuad4e );
CPPUNIT_TEST( testAdjustTopologyTet4 );
+ CPPUNIT_TEST( testAdjustTopologyTet4b );
+ CPPUNIT_TEST( testAdjustTopologyTet4c );
+ CPPUNIT_TEST( testAdjustTopologyTet4d );
CPPUNIT_TEST( testAdjustTopologyHex8 );
CPPUNIT_TEST( testAdjustTopologyLine2Lagrange );
@@ -102,6 +105,15 @@
/// Test adjustTopology() with 3-D tetrahedral element.
void testAdjustTopologyTet4(void);
+ /// Test adjustTopology() with 3-D tetrahedral element (face b).
+ void testAdjustTopologyTet4b(void);
+
+ /// Test adjustTopology() with 3-D tetrahedral element (face c).
+ void testAdjustTopologyTet4c(void);
+
+ /// Test adjustTopology() with 3-D tetrahedral element (face d).
+ void testAdjustTopologyTet4d(void);
+
/// Test adjustTopology() with 3-D hexahedral element.
void testAdjustTopologyHex8(void);
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.cc 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.cc 2007-06-11 23:37:10 UTC (rev 7136)
@@ -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 "CohesiveDataTet4b.hh"
+
+const int pylith::faults::CohesiveDataTet4b::_numVertices = 8;
+
+const int pylith::faults::CohesiveDataTet4b::_spaceDim = 3;
+
+const int pylith::faults::CohesiveDataTet4b::_numCells = 3;
+
+const int pylith::faults::CohesiveDataTet4b::_cellDim = 3;
+
+const double pylith::faults::CohesiveDataTet4b::_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::CohesiveDataTet4b::_numCorners[] = {
+ 4,
+ 4,
+ 6
+};
+
+const int pylith::faults::CohesiveDataTet4b::_cells[] = {
+ 2, 3, 5, 4,
+ 7, 6, 9, 8,
+ 3, 5, 4, 7, 9, 8
+};
+
+const int pylith::faults::CohesiveDataTet4b::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveDataTet4b::_numGroups = 2;
+
+const int pylith::faults::CohesiveDataTet4b::_groupSizes[] =
+ { 6, 5 };
+
+const int pylith::faults::CohesiveDataTet4b::_groups[] = {
+ 3, 4, 5, 7, 8, 9,
+ 2, 4, 5, 8, 9
+};
+
+const char* pylith::faults::CohesiveDataTet4b::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveDataTet4b::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveDataTet4b::_filename = "data/tet4b.mesh";
+
+pylith::faults::CohesiveDataTet4b::CohesiveDataTet4b(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::CohesiveDataTet4b::~CohesiveDataTet4b(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.hh 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.hh 2007-06-11 23:37:10 UTC (rev 7136)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivedatatet4b_hh)
+#define pylith_faults_cohesivedatatet4b_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveDataTet4b;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveDataTet4b : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveDataTet4b(void);
+
+ /// Destructor
+ ~CohesiveDataTet4b(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_cohesivedatatet4b_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.cc 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.cc 2007-06-11 23:37:10 UTC (rev 7136)
@@ -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 "CohesiveDataTet4c.hh"
+
+const int pylith::faults::CohesiveDataTet4c::_numVertices = 8;
+
+const int pylith::faults::CohesiveDataTet4c::_spaceDim = 3;
+
+const int pylith::faults::CohesiveDataTet4c::_numCells = 3;
+
+const int pylith::faults::CohesiveDataTet4c::_cellDim = 3;
+
+const double pylith::faults::CohesiveDataTet4c::_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::CohesiveDataTet4c::_numCorners[] = {
+ 4,
+ 4,
+ 6
+};
+
+const int pylith::faults::CohesiveDataTet4c::_cells[] = {
+ 5, 4, 2, 3,
+ 6, 8, 9, 7,
+ 5, 4, 3, 9, 8, 7
+};
+
+const int pylith::faults::CohesiveDataTet4c::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveDataTet4c::_numGroups = 2;
+
+const int pylith::faults::CohesiveDataTet4c::_groupSizes[] =
+ { 6, 5 };
+
+const int pylith::faults::CohesiveDataTet4c::_groups[] = {
+ 3, 4, 5, 7, 8, 9,
+ 2, 4, 5, 8, 9
+};
+
+const char* pylith::faults::CohesiveDataTet4c::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveDataTet4c::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveDataTet4c::_filename = "data/tet4c.mesh";
+
+pylith::faults::CohesiveDataTet4c::CohesiveDataTet4c(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::CohesiveDataTet4c::~CohesiveDataTet4c(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.hh 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.hh 2007-06-11 23:37:10 UTC (rev 7136)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivedatatet4c_hh)
+#define pylith_faults_cohesivedatatet4c_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveDataTet4c;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveDataTet4c : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveDataTet4c(void);
+
+ /// Destructor
+ ~CohesiveDataTet4c(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_cohesivedatatet4c_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.cc 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.cc 2007-06-11 23:37:10 UTC (rev 7136)
@@ -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 "CohesiveDataTet4d.hh"
+
+const int pylith::faults::CohesiveDataTet4d::_numVertices = 8;
+
+const int pylith::faults::CohesiveDataTet4d::_spaceDim = 3;
+
+const int pylith::faults::CohesiveDataTet4d::_numCells = 3;
+
+const int pylith::faults::CohesiveDataTet4d::_cellDim = 3;
+
+const double pylith::faults::CohesiveDataTet4d::_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::CohesiveDataTet4d::_numCorners[] = {
+ 4,
+ 4,
+ 6
+};
+
+const int pylith::faults::CohesiveDataTet4d::_cells[] = {
+ 3, 2, 4, 5,
+ 7, 8, 6, 9,
+ 3, 5, 4, 7, 9, 8
+};
+
+const int pylith::faults::CohesiveDataTet4d::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveDataTet4d::_numGroups = 2;
+
+const int pylith::faults::CohesiveDataTet4d::_groupSizes[] =
+ { 6, 5 };
+
+const int pylith::faults::CohesiveDataTet4d::_groups[] = {
+ 3, 4, 5, 7, 8, 9,
+ 2, 4, 5, 8, 9
+};
+
+const char* pylith::faults::CohesiveDataTet4d::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveDataTet4d::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveDataTet4d::_filename = "data/tet4d.mesh";
+
+pylith::faults::CohesiveDataTet4d::CohesiveDataTet4d(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::CohesiveDataTet4d::~CohesiveDataTet4d(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.hh 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.hh 2007-06-11 23:37:10 UTC (rev 7136)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivedatatet4d_hh)
+#define pylith_faults_cohesivedatatet4d_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveDataTet4d;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveDataTet4d : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveDataTet4d(void);
+
+ /// Destructor
+ ~CohesiveDataTet4d(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_cohesivedatatet4d_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-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am 2007-06-11 23:37:10 UTC (rev 7136)
@@ -31,6 +31,9 @@
quad4_sliptime.spatialdb \
quad4_peakrate.spatialdb \
tet4.mesh \
+ tet4b.mesh \
+ tet4c.mesh \
+ tet4d.mesh \
tet4_finalslip.spatialdb \
tet4_sliptime.spatialdb \
tet4_peakrate.spatialdb \
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4b.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4b.mesh 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4b.mesh 2007-06-11 23:37:10 UTC (rev 7136)
@@ -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 0 1 3 2
+ 1 1 4 3 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/tet4c.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4c.mesh 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4c.mesh 2007-06-11 23:37:10 UTC (rev 7136)
@@ -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 4 2 3 1
+ }
+ 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/tet4d.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4d.mesh 2007-06-11 22:51:06 UTC (rev 7135)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4d.mesh 2007-06-11 23:37:10 UTC (rev 7136)
@@ -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 0 2 3
+ 1 1 2 4 3
+ }
+ 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