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

brad at geodynamics.org brad at geodynamics.org
Sun Mar 2 12:43:43 PST 2008


Author: brad
Date: 2008-03-02 12:43:43 -0800 (Sun, 02 Mar 2008)
New Revision: 11303

Added:
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshHex8.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshHex8.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshQuad4.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshQuad4.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTet4.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataHex8.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataHex8.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataQuad4.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataQuad4.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataTet4.hh
Modified:
   short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
   short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.mesh
   short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.mesh
   short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.mesh
Log:
Finished C++ unit tests for submesh() exposing bug with cohesive cells.

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am	2008-03-02 19:13:46 UTC (rev 11302)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am	2008-03-02 20:43:43 UTC (rev 11303)
@@ -30,6 +30,9 @@
 	TestBoundaryCondition.cc \
 	TestBoundaryMesh.cc \
 	TestBoundaryMeshTri3.cc \
+	TestBoundaryMeshQuad4.cc \
+	TestBoundaryMeshTet4.cc \
+	TestBoundaryMeshHex8.cc \
 	TestDirichletBoundary.cc \
 	TestDirichletBoundaryTri3.cc \
 	TestDirichletBoundaryQuad4.cc \
@@ -64,6 +67,9 @@
 	TestBoundaryCondition.hh \
 	TestBoundaryMesh.hh \
 	TestBoundaryMeshTri3.hh \
+	TestBoundaryMeshQuad4.hh \
+	TestBoundaryMeshTet4.hh \
+	TestBoundaryMeshHex8.hh \
 	TestDirichletBoundary.hh \
 	TestDirichletBoundaryTri3.hh \
 	TestDirichletBoundaryQuad4.hh \
@@ -97,6 +103,9 @@
 	data/AbsorbingDampersDataHex8.cc \
 	data/BoundaryMeshData.cc \
 	data/BoundaryMeshDataTri3.cc \
+	data/BoundaryMeshDataQuad4.cc \
+	data/BoundaryMeshDataTet4.cc \
+	data/BoundaryMeshDataHex8.cc \
 	data/DirichletData.cc \
 	data/DirichletDataLine2.cc \
 	data/DirichletDataLine2b.cc \
@@ -122,6 +131,9 @@
 	data/AbsorbingDampersDataHex8.hh \
 	data/BoundaryMeshData.hh \
 	data/BoundaryMeshDataTri3.hh \
+	data/BoundaryMeshDataQuad4.hh \
+	data/BoundaryMeshDataTet4.hh \
+	data/BoundaryMeshDataHex8.hh \
 	data/DirichletData.hh \
 	data/DirichletDataLine2.hh \
 	data/DirichletDataLine2b.hh \

Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshHex8.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshHex8.cc	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestBoundaryMeshHex8.hh" // Implementation of class methods
+
+#include "data/BoundaryMeshDataHex8.hh" // USES BoundaryMeshDataHex8
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestBoundaryMeshHex8 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestBoundaryMeshHex8::setUp(void)
+{ // setUp
+  _data = new BoundaryMeshDataHex8();
+} // setUp
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshHex8.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshHex8.hh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestBoundaryMeshHex8.hh
+ *
+ * @brief C++ TestBoundaryMesh object.
+ *
+ * C++ unit testing of submesh() for mesh with 2-D tri cells.
+ */
+
+#if !defined(pylith_bc_testboundarymeshhex8_hh)
+#define pylith_bc_testboundarymeshhex8_hh
+
+#include "TestBoundaryMesh.hh" // ISA TestBoundaryMesh
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace bc {
+    class TestBoundaryMeshHex8;
+  } // bc
+} // pylith
+
+/// C++ unit testing of submesh() for mesh with 2-D tri cells.
+class pylith::bc::TestBoundaryMeshHex8 : public TestBoundaryMesh
+{ // class TestBoundaryMesh
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE(TestBoundaryMeshHex8);
+
+  CPPUNIT_TEST( testSubmesh );
+  CPPUNIT_TEST( testSubmeshFault );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+}; // class TestBoundaryMeshHex8
+
+#endif // pylith_bc_boundarymeshhex8_hh
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshQuad4.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshQuad4.cc	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestBoundaryMeshQuad4.hh" // Implementation of class methods
+
+#include "data/BoundaryMeshDataQuad4.hh" // USES BoundaryMeshDataQuad4
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestBoundaryMeshQuad4 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestBoundaryMeshQuad4::setUp(void)
+{ // setUp
+  _data = new BoundaryMeshDataQuad4();
+} // setUp
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshQuad4.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshQuad4.hh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestBoundaryMeshQuad4.hh
+ *
+ * @brief C++ TestBoundaryMesh object.
+ *
+ * C++ unit testing of submesh() for mesh with 2-D tri cells.
+ */
+
+#if !defined(pylith_bc_testboundarymeshquad4_hh)
+#define pylith_bc_testboundarymeshquad4_hh
+
+#include "TestBoundaryMesh.hh" // ISA TestBoundaryMesh
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace bc {
+    class TestBoundaryMeshQuad4;
+  } // bc
+} // pylith
+
+/// C++ unit testing of submesh() for mesh with 2-D tri cells.
+class pylith::bc::TestBoundaryMeshQuad4 : public TestBoundaryMesh
+{ // class TestBoundaryMesh
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE(TestBoundaryMeshQuad4);
+
+  CPPUNIT_TEST( testSubmesh );
+  CPPUNIT_TEST( testSubmeshFault );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+}; // class TestBoundaryMeshQuad4
+
+#endif // pylith_bc_boundarymeshquad4_hh
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTet4.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTet4.cc	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestBoundaryMeshTet4.hh" // Implementation of class methods
+
+#include "data/BoundaryMeshDataTet4.hh" // USES BoundaryMeshDataTet4
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestBoundaryMeshTet4 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestBoundaryMeshTet4::setUp(void)
+{ // setUp
+  _data = new BoundaryMeshDataTet4();
+} // setUp
+
+
+// End of file 

Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTet4.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTet4.hh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestBoundaryMeshTet4.hh
+ *
+ * @brief C++ TestBoundaryMesh object.
+ *
+ * C++ unit testing of submesh() for mesh with 2-D tri cells.
+ */
+
+#if !defined(pylith_bc_testboundarymeshtet4_hh)
+#define pylith_bc_testboundarymeshtet4_hh
+
+#include "TestBoundaryMesh.hh" // ISA TestBoundaryMesh
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace bc {
+    class TestBoundaryMeshTet4;
+  } // bc
+} // pylith
+
+/// C++ unit testing of submesh() for mesh with 2-D tri cells.
+class pylith::bc::TestBoundaryMeshTet4 : public TestBoundaryMesh
+{ // class TestBoundaryMesh
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE(TestBoundaryMeshTet4);
+
+  CPPUNIT_TEST( testSubmesh );
+  CPPUNIT_TEST( testSubmeshFault );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+}; // class TestBoundaryMeshTet4
+
+#endif // pylith_bc_boundarymeshtet4_hh
+
+
+// End of file 

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersDataTet4.cc	2008-03-02 19:13:46 UTC (rev 11302)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/AbsorbingDampersDataTet4.cc	2008-03-02 20:43:43 UTC (rev 11303)
@@ -65,7 +65,7 @@
 const int pylith::bc::AbsorbingDampersDataTet4::_numCells = 1;
 const int pylith::bc::AbsorbingDampersDataTet4::_numCorners = 3;
 const int pylith::bc::AbsorbingDampersDataTet4::_cells[] = {
-  4,  3,  1,
+  5,  4,  2,
 };
 
 
@@ -74,59 +74,87 @@
 };
 const double pylith::bc::AbsorbingDampersDataTet4::_valsResidual[] = {
   4.861111111e+06,  5.83333333e+06,  8.33333333e+06,
-   0.0,              0.0,             0.0,
+  0.0,              0.0,             0.0,
   4.861111111e+06,  5.83333333e+06,  8.33333333e+06,
   4.861111111e+06,  5.83333333e+06,  8.33333333e+06,
+  0.0,              0.0,             0.0,  
 };
 const double pylith::bc::AbsorbingDampersDataTet4::_valsJacobian[] = {
   1.38888889e+06, 0.0, 0.0, // 0x
   0.0, 0.0, 0.0,
   1.38888889e+06, 0.0, 0.0,
   1.38888889e+06, 0.0, 0.0,
+  0.0, 0.0, 0.0,
   0.0, 8.33333333e+05, 0.0, // 0y
   0.0, 0.0, 0.0,
   0.0, 8.33333333e+05, 0.0,
   0.0, 8.33333333e+05, 0.0,
+  0.0, 0.0, 0.0,
   0.0, 0.0, 8.33333333e+05, // 0z
   0.0, 0.0, 0.0,
   0.0, 0.0, 8.33333333e+05,
   0.0, 0.0, 8.33333333e+05,
+  0.0, 0.0, 0.0,
   0.0, 0.0, 0.0, // 1x
   0.0, 0.0, 0.0,
   0.0, 0.0, 0.0,
   0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
   0.0, 0.0, 0.0, // 1y
   0.0, 0.0, 0.0,
   0.0, 0.0, 0.0,
   0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
   0.0, 0.0, 0.0, // 1z
   0.0, 0.0, 0.0,
   0.0, 0.0, 0.0,
   0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
   1.38888889e+06, 0.0, 0.0, // 2x
   0.0, 0.0, 0.0,
   1.38888889e+06, 0.0, 0.0,
   1.38888889e+06, 0.0, 0.0,
+  0.0, 0.0, 0.0,
   0.0, 8.33333333e+05, 0.0, // 2y
   0.0, 0.0, 0.0,
   0.0, 8.33333333e+05, 0.0,
   0.0, 8.33333333e+05, 0.0,
+  0.0, 0.0, 0.0,
   0.0, 0.0, 8.33333333e+05, // 2z
   0.0, 0.0, 0.0,
   0.0, 0.0, 8.33333333e+05,
   0.0, 0.0, 8.33333333e+05,
+  0.0, 0.0, 0.0,
   1.38888889e+06, 0.0, 0.0, // 3x
   0.0, 0.0, 0.0,
   1.38888889e+06, 0.0, 0.0,
   1.38888889e+06, 0.0, 0.0,
+  0.0, 0.0, 0.0,
   0.0, 8.33333333e+05, 0.0, // 3y
   0.0, 0.0, 0.0,
   0.0, 8.33333333e+05, 0.0,
   0.0, 8.33333333e+05, 0.0,
+  0.0, 0.0, 0.0,
   0.0, 0.0, 8.33333333e+05, // 3z
   0.0, 0.0, 0.0,
   0.0, 0.0, 8.33333333e+05,
   0.0, 0.0, 8.33333333e+05,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0, // 4x
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0, // 4y
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0, // 4z
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
 };
 
 pylith::bc::AbsorbingDampersDataTet4::AbsorbingDampersDataTet4(void)

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataHex8.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataHex8.cc	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "BoundaryMeshDataHex8.hh"
+
+const char* pylith::bc::BoundaryMeshDataHex8::_filename = "data/hex8.mesh";
+
+const char* pylith::bc::BoundaryMeshDataHex8::_bcLabel = "bc2";
+
+const char* pylith::bc::BoundaryMeshDataHex8::_faultLabel = "fault";
+const int pylith::bc::BoundaryMeshDataHex8::_faultId = 100;
+
+const int pylith::bc::BoundaryMeshDataHex8::_numCorners = 4;
+const int pylith::bc::BoundaryMeshDataHex8::_numCells = 2;
+
+const int pylith::bc::BoundaryMeshDataHex8::_numVerticesNoFault = 6;
+const int pylith::bc::BoundaryMeshDataHex8::_verticesNoFault[] = {
+  2, 4, 6, 8, 10, 12
+};
+const int pylith::bc::BoundaryMeshDataHex8::_cellsNoFault[] = {
+  4, 10, 8, 2,
+  6, 12, 10, 4
+};
+
+const int pylith::bc::BoundaryMeshDataHex8::_numVerticesFault = 8;
+const int pylith::bc::BoundaryMeshDataHex8::_verticesFault[] = {
+  2, 4, 6, 8, 10, 12, 14, 16
+};
+const int pylith::bc::BoundaryMeshDataHex8::_cellsFault[] = {
+  14, 16, 8, 2,
+  6, 12, 10, 4,
+};
+
+pylith::bc::BoundaryMeshDataHex8::BoundaryMeshDataHex8(void)
+{ // constructor
+  filename = const_cast<char*>(_filename);
+
+  bcLabel = const_cast<char*>(_bcLabel);
+
+  faultLabel = const_cast<char*>(_faultLabel);
+  faultId = _faultId;
+
+  numCorners = _numCorners;
+  numCells = _numCells;
+
+  numVerticesNoFault = _numVerticesNoFault;
+  verticesNoFault = const_cast<int*>(_verticesNoFault);
+  cellsNoFault = const_cast<int*>(_cellsNoFault);
+
+  numVerticesFault = _numVerticesFault;
+  verticesFault = const_cast<int*>(_verticesFault);
+  cellsFault = const_cast<int*>(_cellsFault);
+} // constructor
+
+pylith::bc::BoundaryMeshDataHex8::~BoundaryMeshDataHex8(void)
+{}
+
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataHex8.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataHex8.hh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_boundarymeshdatahex8_hh)
+#define pylith_bc_boundarymeshdatahex8_hh
+
+#include "BoundaryMeshData.hh"
+
+namespace pylith {
+  namespace bc {
+     class BoundaryMeshDataHex8;
+  } // pylith
+} // bc
+
+class pylith::bc::BoundaryMeshDataHex8 : public BoundaryMeshData
+{
+
+public: 
+
+  /// Constructor
+  BoundaryMeshDataHex8(void);
+
+  /// Destructor
+  ~BoundaryMeshDataHex8(void);
+
+private:
+
+  static const char* _filename;
+
+  static const char* _bcLabel;
+
+  static const char* _faultLabel;
+  static const int _faultId;
+
+  static const int _numCorners;
+  static const int _numCells;
+
+  static const int _numVerticesNoFault;
+  static const int _verticesNoFault[];
+  static const int _cellsNoFault[];
+
+  static const int _numVerticesFault;
+  static const int _verticesFault[];
+  static const int _cellsFault[];
+
+};
+
+#endif // pylith_bc_boundarymeshdatahex8_hh
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataQuad4.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataQuad4.cc	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "BoundaryMeshDataQuad4.hh"
+
+const char* pylith::bc::BoundaryMeshDataQuad4::_filename = "data/quad4.mesh";
+
+const char* pylith::bc::BoundaryMeshDataQuad4::_bcLabel = "bc3";
+
+const char* pylith::bc::BoundaryMeshDataQuad4::_faultLabel = "fault";
+const int pylith::bc::BoundaryMeshDataQuad4::_faultId = 100;
+
+const int pylith::bc::BoundaryMeshDataQuad4::_numCorners = 2;
+const int pylith::bc::BoundaryMeshDataQuad4::_numCells = 2;
+
+const int pylith::bc::BoundaryMeshDataQuad4::_numVerticesNoFault = 3;
+const int pylith::bc::BoundaryMeshDataQuad4::_verticesNoFault[] = {
+  2, 4, 6
+};
+const int pylith::bc::BoundaryMeshDataQuad4::_cellsNoFault[] = {
+  2, 4,
+  4, 6,
+};
+
+const int pylith::bc::BoundaryMeshDataQuad4::_numVerticesFault = 4;
+const int pylith::bc::BoundaryMeshDataQuad4::_verticesFault[] = {
+  2, 4, 6, 8,
+};
+const int pylith::bc::BoundaryMeshDataQuad4::_cellsFault[] = {
+  2, 8,
+  4, 6,
+};
+
+pylith::bc::BoundaryMeshDataQuad4::BoundaryMeshDataQuad4(void)
+{ // constructor
+  filename = const_cast<char*>(_filename);
+
+  bcLabel = const_cast<char*>(_bcLabel);
+
+  faultLabel = const_cast<char*>(_faultLabel);
+  faultId = _faultId;
+
+  numCorners = _numCorners;
+  numCells = _numCells;
+
+  numVerticesNoFault = _numVerticesNoFault;
+  verticesNoFault = const_cast<int*>(_verticesNoFault);
+  cellsNoFault = const_cast<int*>(_cellsNoFault);
+
+  numVerticesFault = _numVerticesFault;
+  verticesFault = const_cast<int*>(_verticesFault);
+  cellsFault = const_cast<int*>(_cellsFault);
+} // constructor
+
+pylith::bc::BoundaryMeshDataQuad4::~BoundaryMeshDataQuad4(void)
+{}
+
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataQuad4.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataQuad4.hh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_boundarymeshdataquad4_hh)
+#define pylith_bc_boundarymeshdataquad4_hh
+
+#include "BoundaryMeshData.hh"
+
+namespace pylith {
+  namespace bc {
+     class BoundaryMeshDataQuad4;
+  } // pylith
+} // bc
+
+class pylith::bc::BoundaryMeshDataQuad4 : public BoundaryMeshData
+{
+
+public: 
+
+  /// Constructor
+  BoundaryMeshDataQuad4(void);
+
+  /// Destructor
+  ~BoundaryMeshDataQuad4(void);
+
+private:
+
+  static const char* _filename;
+
+  static const char* _bcLabel;
+
+  static const char* _faultLabel;
+  static const int _faultId;
+
+  static const int _numCorners;
+  static const int _numCells;
+
+  static const int _numVerticesNoFault;
+  static const int _verticesNoFault[];
+  static const int _cellsNoFault[];
+
+  static const int _numVerticesFault;
+  static const int _verticesFault[];
+  static const int _cellsFault[];
+
+};
+
+#endif // pylith_bc_boundarymeshdataquad4_hh
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataTet4.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataTet4.cc	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "BoundaryMeshDataTet4.hh"
+
+const char* pylith::bc::BoundaryMeshDataTet4::_filename = "data/tet4.mesh";
+
+const char* pylith::bc::BoundaryMeshDataTet4::_bcLabel = "bc4";
+
+const char* pylith::bc::BoundaryMeshDataTet4::_faultLabel = "fault";
+const int pylith::bc::BoundaryMeshDataTet4::_faultId = 100;
+
+const int pylith::bc::BoundaryMeshDataTet4::_numCorners = 3;
+const int pylith::bc::BoundaryMeshDataTet4::_numCells = 2;
+
+const int pylith::bc::BoundaryMeshDataTet4::_numVerticesNoFault = 4;
+const int pylith::bc::BoundaryMeshDataTet4::_verticesNoFault[] = {
+  2, 4, 5, 6
+};
+const int pylith::bc::BoundaryMeshDataTet4::_cellsNoFault[] = {
+  5, 4, 2,
+  2, 6, 5,
+};
+
+const int pylith::bc::BoundaryMeshDataTet4::_numVerticesFault = 6;
+const int pylith::bc::BoundaryMeshDataTet4::_verticesFault[] = {
+  2, 4, 5, 6, 7, 9
+};
+const int pylith::bc::BoundaryMeshDataTet4::_cellsFault[] = {
+  5, 4, 2,
+  7, 6, 9,
+};
+
+pylith::bc::BoundaryMeshDataTet4::BoundaryMeshDataTet4(void)
+{ // constructor
+  filename = const_cast<char*>(_filename);
+
+  bcLabel = const_cast<char*>(_bcLabel);
+
+  faultLabel = const_cast<char*>(_faultLabel);
+  faultId = _faultId;
+
+  numCorners = _numCorners;
+  numCells = _numCells;
+
+  numVerticesNoFault = _numVerticesNoFault;
+  verticesNoFault = const_cast<int*>(_verticesNoFault);
+  cellsNoFault = const_cast<int*>(_cellsNoFault);
+
+  numVerticesFault = _numVerticesFault;
+  verticesFault = const_cast<int*>(_verticesFault);
+  cellsFault = const_cast<int*>(_cellsFault);
+} // constructor
+
+pylith::bc::BoundaryMeshDataTet4::~BoundaryMeshDataTet4(void)
+{}
+
+
+// End of file

Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataTet4.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/BoundaryMeshDataTet4.hh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_boundarymeshdatatet4_hh)
+#define pylith_bc_boundarymeshdatatet4_hh
+
+#include "BoundaryMeshData.hh"
+
+namespace pylith {
+  namespace bc {
+     class BoundaryMeshDataTet4;
+  } // pylith
+} // bc
+
+class pylith::bc::BoundaryMeshDataTet4 : public BoundaryMeshData
+{
+
+public: 
+
+  /// Constructor
+  BoundaryMeshDataTet4(void);
+
+  /// Destructor
+  ~BoundaryMeshDataTet4(void);
+
+private:
+
+  static const char* _filename;
+
+  static const char* _bcLabel;
+
+  static const char* _faultLabel;
+  static const int _faultId;
+
+  static const int _numCorners;
+  static const int _numCells;
+
+  static const int _numVerticesNoFault;
+  static const int _verticesNoFault[];
+  static const int _cellsNoFault[];
+
+  static const int _numVerticesFault;
+  static const int _verticesFault[];
+  static const int _cellsFault[];
+
+};
+
+#endif // pylith_bc_boundarymeshdatatet4_hh
+
+// End of file

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc	2008-03-02 19:13:46 UTC (rev 11302)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/NeumannDataTet4.cc	2008-03-02 20:43:43 UTC (rev 11303)
@@ -74,6 +74,7 @@
   -1.5530860877e-01,  2.529396817e-01,  4.0236892706e-01,
   -1.5530860877e-01,  2.529396817e-01,  4.0236892706e-01,
   -1.5530860877e-01,  2.529396817e-01,  4.0236892706e-01,
+  0.0,               0.0,               0.0,
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.mesh	2008-03-02 19:13:46 UTC (rev 11302)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.mesh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -61,6 +61,14 @@
     }
   }
   group = {
+    name = fault
+    type = vertices
+    count = 4
+    indices = {
+      2  3  8  9
+    }
+  }
+  group = {
     name = bc
     type = vertices
     count = 4

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.mesh	2008-03-02 19:13:46 UTC (rev 11302)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.mesh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -14,6 +14,14 @@
 //  |       |       |
 //  2 ----- 4 ----- 6
 //
+// Sieve mesh w/fault
+//
+//  3 ----- 5-11-9 ----- 7
+//  |       |    |       |
+//  |   0   |    |   1   |
+//  |       |    |       |
+//  2 ----- 4-10-8 ----- 6
+//
 mesh = {
   dimension = 2
   use-index-zero = true
@@ -42,6 +50,14 @@
     }
   }
   group = {
+    name = fault
+    type = vertices
+    count = 2
+    indices = {
+      2  3
+    }
+  }
+  group = {
     name = bc
     type = vertices
     count = 3

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.mesh	2008-03-02 19:13:46 UTC (rev 11302)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.mesh	2008-03-02 20:43:43 UTC (rev 11303)
@@ -3,25 +3,36 @@
   use-index-zero = true
   vertices = {
     dimension = 3
-    count = 4
+    count = 5
     coordinates = {
              0      0.0  0.0  0.0
              1      1.0  0.0  0.0
              2      0.0  1.0  0.0
              3      0.0  0.0  1.0
+             4     -1.0  0.0  0.0
     }
   }
   cells = {
-    count = 1
+    count = 2
     num-corners = 4
     simplices = {
              0       0  1  2  3
+             0       0  4  1  3
     }
     material-ids = {
              0   0
+             1   1
     }
   }
   group = {
+    name = fault
+    type = vertices
+    count = 3
+    indices = {
+      0  1  3
+    }
+  }
+  group = {
     name = bc
     type = vertices
     count = 1
@@ -45,4 +56,12 @@
       1  2  3
     }
   }
+  group = {
+    name = bc4
+    type = vertices
+    count = 4
+    indices = {
+      0  2  3  4
+    }
+  }
 }



More information about the cig-commits mailing list