[cig-commits] r6708 -
short/3D/PyLith/trunk/unittests/libtests/faults/data
knepley at geodynamics.org
knepley at geodynamics.org
Fri Apr 27 05:23:35 PDT 2007
Author: knepley
Date: 2007-04-27 05:23:34 -0700 (Fri, 27 Apr 2007)
New Revision: 6708
Added:
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataHex8.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataHex8.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataLine2.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataLine2.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTet4.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTet4.hh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTri3.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTri3.hh
Log:
Adding tests
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataHex8.cc 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataHex8.cc 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,123 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1 and vertices are 2-13.
+ *
+ * 2,3,4,5 -------- 6,7,8,9 -------- 10,11,12,13
+ *
+ * ^^^^^^^ Vertices forming fault
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1,16 and vertices are 4-15.
+ *
+ * 2,3,4,5 -------- 6,7,8,9 -- 14,16,18,20 -------- 10,11,12,13
+ * 15,17,19,21
+ * ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
+ *
+ */
+
+#include "CohesiveLagrangeDataHex8.hh"
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_numVertices = 20;
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_spaceDim = 3;
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_numCells = 3;
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_cellDim = 3;
+
+const double pylith::faults::CohesiveLagrangeDataHex8::_vertices[] = {
+ -2.0, -1.0, -1.0,
+ -2.0, 1.0, -1.0,
+ -2.0, -1.0, 1.0,
+ -2.0, 1.0, 1.0,
+ 0.0, -1.0, -1.0,
+ 0.0, 1.0, -1.0,
+ 0.0, -1.0, 1.0,
+ 0.0, 1.0, 1.0,
+ 2.0, -1.0, -1.0,
+ 2.0, 1.0, -1.0,
+ 2.0, -1.0, 1.0,
+ 2.0, 1.0, 1.0,
+ 0.0, -1.0, -1.0,
+ 0.0, -1.0, -1.0,
+ 0.0, 1.0, -1.0,
+ 0.0, 1.0, -1.0,
+ 0.0, -1.0, 1.0,
+ 0.0, -1.0, 1.0,
+ 0.0, 1.0, 1.0,
+ 0.0, 1.0, 1.0
+};
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_numCorners[] = {
+ 8,
+ 8,
+ 12
+};
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_cells[] = {
+ 2, 4, 5, 3, 6, 8, 9, 7,
+ 14, 18, 20, 16, 10, 12, 13, 11,
+ 6, 8, 9, 7, 14, 18, 20, 16, 15, 19, 21, 17
+};
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_numGroups = 2;
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_groupSizes[] =
+ { 12, 10 };
+
+const int pylith::faults::CohesiveLagrangeDataHex8::_groups[] = {
+ 6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20, 21,
+ 4, 5, 8, 9, 12, 13, 18, 19, 20, 21
+};
+
+const char* pylith::faults::CohesiveLagrangeDataHex8::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataHex8::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataHex8::_filename = "data/meshHex8A.txt";
+
+pylith::faults::CohesiveLagrangeDataHex8::CohesiveLagrangeDataHex8(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::CohesiveLagrangeDataHex8::~CohesiveLagrangeDataHex8(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataHex8.hh 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataHex8.hh 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivelagrangedatahex8_hh)
+#define pylith_faults_cohesivelagrangedatahex8_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveLagrangeDataHex8;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveLagrangeDataHex8 : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveLagrangeDataHex8(void);
+
+ /// Destructor
+ ~CohesiveLagrangeDataHex8(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_cohesivelagrangedatahex8_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataLine2.cc 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataLine2.cc 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,100 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1, vertices are 2-4.
+ *
+ * 2 -------- 3 -------- 4
+ *
+ * After adding cohesive elements
+ * 2 -------- 3 -6- 5 -------- 4
+ */
+
+#include "CohesiveLagrangeDataLine2.hh"
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_numVertices = 5;
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_spaceDim = 1;
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_numCells = 3;
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_cellDim = 1;
+
+const double pylith::faults::CohesiveLagrangeDataLine2::_vertices[] = {
+ -1.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0
+};
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_numCorners[] = {
+ 2,
+ 2,
+ 3
+};
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_cells[] = {
+ 2, 3,
+ 5, 4,
+ 3, 5, 6
+};
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_numGroups = 2;
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_groupSizes[] =
+ { 3, 4 };
+
+const int pylith::faults::CohesiveLagrangeDataLine2::_groups[] = {
+ 3, 5, 6,
+ 2, 3, 5, 6
+};
+
+const char* pylith::faults::CohesiveLagrangeDataLine2::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataLine2::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataLine2::_filename = "data/meshLine.txt";
+
+pylith::faults::CohesiveLagrangeDataLine2::CohesiveLagrangeDataLine2(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::CohesiveLagrangeDataLine2::~CohesiveLagrangeDataLine2(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataLine2.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataLine2.hh 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataLine2.hh 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivelagrangedataline2_hh)
+#define pylith_faults_cohesivelagrangedataline2_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveLagrangeDataLine2;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveLagrangeDataLine2 : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveLagrangeDataLine2(void);
+
+ /// Destructor
+ ~CohesiveLagrangeDataLine2(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_cohesivelagrangedataline2_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataQuad4.cc 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataQuad4.cc 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,126 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1, vertices are 2-7.
+ *
+ * 3 -------- 5 -------- 7
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * | | |
+ * 2 -------- 4 -------- 6
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1,10 vertices are 2-9.
+ *
+ * 3 -------- 5 -11- 10 -------- 7
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * 2 -------- 4 --9-- 8 -------- 6
+ */
+
+#include "CohesiveLagrangeDataQuad4.hh"
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_numVertices = 10;
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_spaceDim = 2;
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_numCells = 3;
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_cellDim = 2;
+
+const double pylith::faults::CohesiveLagrangeDataQuad4::_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,
+ 0.0, -1.0,
+ 0.0, -1.0,
+ 0.0, 1.0,
+ 0.0, 1.0,
+};
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_numCorners[] = {
+ 4,
+ 4,
+ 6
+};
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_cells[] = {
+ 2, 4, 5, 3,
+ 6, 7, 10, 8,
+ 4, 5, 8, 10, 9, 11
+};
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_numGroups = 2;
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_groupSizes[] =
+ { 6, 5 };
+
+const int pylith::faults::CohesiveLagrangeDataQuad4::_groups[] = {
+ 4, 5, 8, 9, 10, 11,
+ 3, 5, 7, 10, 11
+};
+
+const char* pylith::faults::CohesiveLagrangeDataQuad4::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataQuad4::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataQuad4::_filename = "data/meshQuad4A.txt";
+
+pylith::faults::CohesiveLagrangeDataQuad4::CohesiveLagrangeDataQuad4(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::CohesiveLagrangeDataQuad4::~CohesiveLagrangeDataQuad4(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataQuad4.hh 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataQuad4.hh 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivelagrangedataquad4_hh)
+#define pylith_faults_cohesivelagrangedataquad4_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveLagrangeDataQuad4;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveLagrangeDataQuad4 : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveLagrangeDataQuad4(void);
+
+ /// Destructor
+ ~CohesiveLagrangeDataQuad4(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_cohesivedataquad4_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTet4.cc 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTet4.cc 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,113 @@
+// -*- 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,9,11 6
+ * 8,10,12
+ * ^^^^^^^^^^^^ Cohesive element in x-y plane.
+ */
+
+#include "CohesiveLagrangeDataTet4.hh"
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_numVertices = 11;
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_spaceDim = 3;
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_numCells = 3;
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_cellDim = 3;
+
+const double pylith::faults::CohesiveLagrangeDataTet4::_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, -1.0, 0.0,
+ 0.0, 0.0, 1.0,
+ 0.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 1.0, 0.0
+};
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_numCorners[] = {
+ 4,
+ 4,
+ 9
+};
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_cells[] = {
+ 3, 4, 5, 2,
+ 7, 11, 9, 6,
+ 3, 4, 5, 7, 9, 11, 8, 10, 12
+};
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_numGroups = 2;
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_groupSizes[] =
+ { 9, 7 };
+
+const int pylith::faults::CohesiveLagrangeDataTet4::_groups[] = {
+ 3, 4, 5, 7, 8, 9, 10, 11, 12,
+ 2, 4, 5, 9, 10, 11, 12
+};
+
+const char* pylith::faults::CohesiveLagrangeDataTet4::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataTet4::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataTet4::_filename = "data/meshTet4A.txt";
+
+pylith::faults::CohesiveLagrangeDataTet4::CohesiveLagrangeDataTet4(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::CohesiveLagrangeDataTet4::~CohesiveLagrangeDataTet4(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTet4.hh 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTet4.hh 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivelagrangedatatet4_hh)
+#define pylith_faults_cohesivelagrangedatatet4_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveLagrangeDataTet4;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveLagrangeDataTet4 : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveLagrangeDataTet4(void);
+
+ /// Destructor
+ ~CohesiveLagrangeDataTet4(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_cohesivedatatet4_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTri3.cc 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTri3.cc 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,127 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1, vertices are 2-5.
+ *
+ * 3
+ * /|\
+ * / | \
+ * / | \
+ * / | \
+ * 2 | 5
+ * \ | /
+ * \ | /
+ * \ | /
+ * \|/
+ * 4
+ *
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1, 8, vertices are 2-7.
+ *
+ * 3 -7- 6
+ * /| |\
+ * / | | \
+ * / | | \
+ * / | | \
+ * 2 | | 5
+ * \ | | /
+ * \ | | /
+ * \ | | /
+ * \| |/
+ * 4 -9- 8
+ */
+
+#include "CohesiveLagrangeDataTri3.hh"
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_numVertices = 8;
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_spaceDim = 2;
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_numCells = 3;
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_cellDim = 2;
+
+const double pylith::faults::CohesiveLagrangeDataTri3::_vertices[] = {
+ -1.0, 0.0,
+ 0.0, 1.0,
+ 0.0, -1.0,
+ 1.0, 0.0,
+ 0.0, 1.0,
+ 0.0, 1.0,
+ 0.0, -1.0,
+ 0.0, -1.0
+};
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_numCorners[] = {
+ 3,
+ 3,
+ 6
+};
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_cells[] = {
+ 2, 4, 3,
+ 6, 8, 5,
+ 3, 4, 6, 8, 7, 9
+};
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_materialIds[] = {
+ 0, 0,
+ 1
+};
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_numGroups = 2;
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_groupSizes[] =
+ { 6, 7 };
+
+const int pylith::faults::CohesiveLagrangeDataTri3::_groups[] = {
+ 3, 4, 6, 7, 8, 9,
+ 3, 4, 5, 6, 7, 8, 9
+};
+
+const char* pylith::faults::CohesiveLagrangeDataTri3::_groupNames[] = {
+ "fault", "output"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataTri3::_groupTypes[] = {
+ "vertex", "vertex"
+};
+
+const char* pylith::faults::CohesiveLagrangeDataTri3::_filename = "data/meshTri3A.txt";
+
+pylith::faults::CohesiveLagrangeDataTri3::CohesiveLagrangeDataTri3(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::CohesiveLagrangeDataTri3::~CohesiveLagrangeDataTri3(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTri3.hh 2007-04-27 04:46:09 UTC (rev 6707)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveLagrangeDataTri3.hh 2007-04-27 12:23:34 UTC (rev 6708)
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesivelagrangedatatri3_hh)
+#define pylith_faults_cohesivelagrangedatatri3_hh
+
+#include "CohesiveData.hh"
+
+namespace pylith {
+ namespace faults {
+ class CohesiveLagrangeDataTri3;
+ } // pylith
+} // faults
+
+class pylith::faults::CohesiveLagrangeDataTri3 : public CohesiveData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ CohesiveLagrangeDataTri3(void);
+
+ /// Destructor
+ ~CohesiveLagrangeDataTri3(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_cohesivedatatri3_hh
+
+// End of file
More information about the cig-commits
mailing list