[cig-commits] r6918 - in
short/3D/PyLith/trunk/unittests/libtests/bc: . data
brad at geodynamics.org
brad at geodynamics.org
Thu May 17 17:37:24 PDT 2007
Author: brad
Date: 2007-05-17 17:37:24 -0700 (Thu, 17 May 2007)
New Revision: 6918
Added:
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.mesh
short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.mesh
short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.mesh
short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.mesh
short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.mesh
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb
short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb
Removed:
short/3D/PyLith/trunk/unittests/libtests/bc/data/meshLine2.txt
Modified:
short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc
short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh
short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc
short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am
Log:
Finished implementing C++ unit tests for Dirichlet boundary condition.
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/Makefile.am 2007-05-18 00:37:24 UTC (rev 6918)
@@ -24,21 +24,45 @@
TestBoundaryCondition.cc \
TestDirichlet.cc \
TestDirichletLine2.cc \
+ TestDirichletTri3.cc \
+ TestDirichletQuad4.cc \
+ TestDirichletTet4.cc \
+ TestDirichletHex8.cc \
+ TestDirichletMulti.cc \
+ TestDirichletMultiTri3.cc \
test_bc.cc
noinst_HEADERS = \
TestBoundaryCondition.hh \
+ TestDirichlet.hh \
TestDirichletLine2.hh \
- TestDirichlet.hh
+ TestDirichletTri3.hh \
+ TestDirichletQuad4.hh \
+ TestDirichletTet4.hh \
+ TestDirichletHex8.hh \
+ TestDirichletMulti.hh \
+ TestDirichletMultiTri3.hh
# Source files associated with testing data
testbc_SOURCES += \
data/DirichletData.cc \
- data/DirichletDataLine2.cc
+ data/DirichletDataLine2.cc \
+ data/DirichletDataTri3.cc \
+ data/DirichletDataQuad4.cc \
+ data/DirichletDataTet4.cc \
+ data/DirichletDataHex8.cc \
+ data/DirichletDataMulti.cc \
+ data/DirichletDataMultiTri3.cc
noinst_HEADERS += \
data/DirichletData.hh \
- data/DirichletDataLine2.hh
+ data/DirichletDataLine2.hh \
+ data/DirichletDataTri3.hh \
+ data/DirichletDataQuad4.hh \
+ data/DirichletDataTet4.hh \
+ data/DirichletDataHex8.hh \
+ data/DirichletDataMulti.hh \
+ data/DirichletDataMultiTri3.hh
testbc_LDFLAGS = $(PETSC_LIB) $(PYTHON_BLDLIBRARY)
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichlet.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -218,7 +218,7 @@
cs.setSpaceDim((*mesh)->getDimension());
cs.initialize();
- spatialdata::spatialdb::SimpleDB db;
+ spatialdata::spatialdb::SimpleDB db("TestDirichlet");
spatialdata::spatialdb::SimpleIOAscii dbIO;
dbIO.filename(_data->dbFilename);
db.ioHandler(&dbIO);
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletHex8.hh" // Implementation of class methods
+
+#include "data/DirichletDataHex8.hh" // USES DirichletDataHex8
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletHex8 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletHex8::setUp(void)
+{ // setUp
+ _data = new DirichletDataHex8();
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestDirichletHex8::tearDown(void)
+{ // tearDown
+ delete _data;
+} // tearDown
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletHex8.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletHex8.hh
+ *
+ * @brief C++ TestDirichlet object.
+ *
+ * C++ unit testing for Dirichlet for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichlethex8_hh)
+#define pylith_bc_testdirichlethex8_hh
+
+#include "TestDirichlet.hh" // ISA TestDirichlet
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletHex8;
+ } // bc
+} // pylith
+
+/// C++ unit testing for Dirichlet for mesh with 3-D hex cells.
+class pylith::bc::TestDirichletHex8 : public TestDirichlet
+{ // class TestDirichlet
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDirichletHex8 );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+}; // class TestDirichletHex8
+
+#endif // pylith_bc_dirichlethex8_hh
+
+
+// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletLine2.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -11,7 +11,7 @@
//
/**
- * @file unittests/libtests/bc/TestDirichlet.hh
+ * @file unittests/libtests/bc/TestDirichletLine2.hh
*
* @brief C++ TestDirichlet object.
*
@@ -19,7 +19,7 @@
*/
#if !defined(pylith_bc_testdirichletline2_hh)
-#define pylith_bc_testdirichletlin2_hh
+#define pylith_bc_testdirichletline2_hh
#include "TestDirichlet.hh" // ISA TestDirichlet
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,187 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletMulti.hh" // Implementation of class methods
+
+#include "pylith/bc/Dirichlet.hh" // USES Dirichlet
+
+#include "data/DirichletDataMulti.hh" // USES DirichletData
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/utils/sievetypes.hh" // USES PETSc Mesh
+
+#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
+#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
+#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
+
+// ----------------------------------------------------------------------
+// Test setConstraintSizes().
+void
+pylith::bc::TestDirichletMulti::testSetConstraintSizes(void)
+{ // testSetConstraintSizes
+ ALE::Obj<Mesh> mesh;
+ Dirichlet bcA;
+ Dirichlet bcB;
+ _initialize(&mesh, &bcA, &bcB);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bcA.setConstraintSizes(field, mesh);
+ bcB.setConstraintSizes(field, mesh);
+
+ CPPUNIT_ASSERT(0 != _data);
+
+ const int numCells = mesh->heightStratum(0)->size();
+ const int offset = numCells;
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ CPPUNIT_ASSERT_EQUAL(_data->numDOF, field->getFiberDimension(*v_iter));
+
+ const int flag = _data->bcFlags[*v_iter-offset];
+ if (-1 == flag)
+ // no constraints
+ CPPUNIT_ASSERT_EQUAL(0, field->getConstraintDimension(*v_iter));
+ else if (0 == flag)
+ CPPUNIT_ASSERT_EQUAL(_data->numFixedDOFA,
+ field->getConstraintDimension(*v_iter));
+ else if (1 == flag)
+ CPPUNIT_ASSERT_EQUAL(_data->numFixedDOFB,
+ field->getConstraintDimension(*v_iter));
+ } // for
+} // testSetConstraintSizes
+
+// ----------------------------------------------------------------------
+// Test setConstraints().
+void
+pylith::bc::TestDirichletMulti::testSetConstraints(void)
+{ // testSetConstraints
+ ALE::Obj<Mesh> mesh;
+ Dirichlet bcA;
+ Dirichlet bcB;
+ _initialize(&mesh, &bcA, &bcB);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bcA.setConstraintSizes(field, mesh);
+ bcB.setConstraintSizes(field, mesh);
+ mesh->allocate(field);
+ bcA.setConstraints(field, mesh);
+ bcB.setConstraints(field, mesh);
+
+ // No accessor in real_section_type to verify constraints are set
+ // correctly. For now, rely on testSetField test.
+} // testSetConstraints
+
+// ----------------------------------------------------------------------
+// Test setField().
+void
+pylith::bc::TestDirichletMulti::testSetField(void)
+{ // testSetField
+ ALE::Obj<Mesh> mesh;
+ Dirichlet bcA;
+ Dirichlet bcB;
+ _initialize(&mesh, &bcA, &bcB);
+
+ const ALE::Obj<real_section_type>& field = mesh->getRealSection("field");
+ const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
+ field->setFiberDimension(vertices, _data->numDOF);
+ bcA.setConstraintSizes(field, mesh);
+ bcB.setConstraintSizes(field, mesh);
+ mesh->allocate(field);
+ bcA.setConstraints(field, mesh);
+ bcB.setConstraints(field, mesh);
+
+ CPPUNIT_ASSERT(0 != _data);
+ const double tolerance = 1.0e-06;
+
+ // All values should be zero.
+ field->zero();
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ const int fiberDim = field->getFiberDimension(*v_iter);
+ const real_section_type::value_type* values =
+ mesh->restrict(field, *v_iter);
+ for (int i=0; i < fiberDim; ++i)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, values[i], tolerance);
+ } // for
+
+ // Only unconstrained values should be zero.
+ // Expected values set in _data->field
+ const double t = 1.0;
+ bcA.setField(t, field, mesh);
+ bcB.setField(t, field, mesh);
+
+ int i = 0;
+ for (Mesh::label_sequence::iterator v_iter = vertices->begin();
+ v_iter != vertices->end();
+ ++v_iter) {
+ const int fiberDim = field->getFiberDimension(*v_iter);
+ const real_section_type::value_type* values =
+ mesh->restrict(field, *v_iter);
+ for (int iDOF=0; iDOF < fiberDim; ++iDOF)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->field[i++], values[iDOF], tolerance);
+ } // for
+} // testSetField
+
+// ----------------------------------------------------------------------
+void
+pylith::bc::TestDirichletMulti::_initialize(ALE::Obj<Mesh>* mesh,
+ Dirichlet* const bcA,
+ Dirichlet* const bcB) const
+{ // _initialize
+ CPPUNIT_ASSERT(0 != _data);
+ CPPUNIT_ASSERT(0 != bcA);
+ CPPUNIT_ASSERT(0 != bcB);
+
+ meshio::MeshIOAscii iohandler;
+ iohandler.filename(_data->meshFilename);
+ iohandler.read(mesh);
+ CPPUNIT_ASSERT(!mesh->isNull());
+
+ spatialdata::geocoords::CSCart cs;
+ cs.setSpaceDim((*mesh)->getDimension());
+ cs.initialize();
+
+ // Setup boundary condition A
+ spatialdata::spatialdb::SimpleDB db("TestDirichletMulti");
+ spatialdata::spatialdb::SimpleIOAscii dbIO;
+ dbIO.filename(_data->dbFilenameA);
+ db.ioHandler(&dbIO);
+
+ int_array fixedDOFA(_data->fixedDOFA, _data->numFixedDOFA);
+
+ bcA->id(_data->idA);
+ bcA->label(_data->labelA);
+ bcA->db(&db);
+ bcA->fixedDOF(fixedDOFA);
+ bcA->initialize(*mesh, &cs);
+
+ // Setup boundary condition B
+ dbIO.filename(_data->dbFilenameB);
+ db.ioHandler(&dbIO);
+
+ int_array fixedDOFB(_data->fixedDOFB, _data->numFixedDOFB);
+
+ bcB->id(_data->idB);
+ bcB->label(_data->labelB);
+ bcB->db(&db);
+ bcB->fixedDOF(fixedDOFB);
+ bcB->initialize(*mesh, &cs);
+} // _initialize
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMulti.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,77 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletMulti.hh
+ *
+ * @brief C++ TestDirichletMulti object.
+ *
+ * C++ unit testing for DirichletMulti.
+ */
+
+#if !defined(pylith_bc_testdirichletmulti_hh)
+#define pylith_bc_testdirichletmulti_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/utils/sievefwd.hh" // USES PETSc Mesh
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletMulti;
+
+ class Dirichlet;
+ class DirichletDataMulti;
+ } // bc
+} // pylith
+
+/// C++ unit testing for DirichletMulti.
+class pylith::bc::TestDirichletMulti : public CppUnit::TestFixture
+{ // class TestDirichletMulti
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Test setConstraintSizes().
+ void testSetConstraintSizes(void);
+
+ /// Test setConstraints().
+ void testSetConstraints(void);
+
+ /// Test setField().
+ void testSetField(void);
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ DirichletDataMulti* _data; ///< Data for testing
+
+ // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+ /** Initialize DirichletMulti boundary condition.
+ *
+ * @param mesh PETSc mesh to initialize
+ * @param bcA Dirichlet boundary condition A to initialize.
+ * @param bcB Dirichlet boundary condition B to initialize.
+ */
+ void _initialize(ALE::Obj<ALE::Mesh>* mesh,
+ Dirichlet* const bcA,
+ Dirichlet* const bcB) const;
+
+}; // class TestDirichletMulti
+
+#endif // pylith_bc_dirichletmulti_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletMultiTri3.hh" // Implementation of class methods
+
+#include "data/DirichletDataMultiTri3.hh" // USES DirichletDataMultiTri3
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletMultiTri3 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletMultiTri3::setUp(void)
+{ // setUp
+ _data = new DirichletDataMultiTri3();
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestDirichletMultiTri3::tearDown(void)
+{ // tearDown
+ delete _data;
+} // tearDown
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletMultiTri3.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletMultiTri3.hh
+ *
+ * @brief C++ TestDirichlet object.
+ *
+ * C++ unit testing for Dirichlet for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletmultitri3_hh)
+#define pylith_bc_testdirichletmultitri3_hh
+
+#include "TestDirichletMulti.hh" // ISA TestDirichlet
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletMultiTri3;
+ } // bc
+} // pylith
+
+/// C++ unit testing for Dirichlet for mesh with 2-D tri cells.
+class pylith::bc::TestDirichletMultiTri3 : public TestDirichletMulti
+{ // class TestDirichlet
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDirichletMultiTri3 );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+}; // class TestDirichletMultiTri3
+
+#endif // pylith_bc_dirichletmultitri3_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletQuad4.hh" // Implementation of class methods
+
+#include "data/DirichletDataQuad4.hh" // USES DirichletDataQuad4
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletQuad4 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletQuad4::setUp(void)
+{ // setUp
+ _data = new DirichletDataQuad4();
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestDirichletQuad4::tearDown(void)
+{ // tearDown
+ delete _data;
+} // tearDown
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletQuad4.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletQuad4.hh
+ *
+ * @brief C++ TestDirichlet object.
+ *
+ * C++ unit testing for Dirichlet for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichletquad4_hh)
+#define pylith_bc_testdirichletquad4_hh
+
+#include "TestDirichlet.hh" // ISA TestDirichlet
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletQuad4;
+ } // bc
+} // pylith
+
+/// C++ unit testing for Dirichlet for mesh with 2-D quad cells.
+class pylith::bc::TestDirichletQuad4 : public TestDirichlet
+{ // class TestDirichlet
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDirichletQuad4 );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+}; // class TestDirichletQuad4
+
+#endif // pylith_bc_dirichletquad4_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletTet4.hh" // Implementation of class methods
+
+#include "data/DirichletDataTet4.hh" // USES DirichletDataTet4
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletTet4 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletTet4::setUp(void)
+{ // setUp
+ _data = new DirichletDataTet4();
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestDirichletTet4::tearDown(void)
+{ // tearDown
+ delete _data;
+} // tearDown
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTet4.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletTet4.hh
+ *
+ * @brief C++ TestDirichlet object.
+ *
+ * C++ unit testing for Dirichlet for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichlettet4_hh)
+#define pylith_bc_testdirichletet4_hh
+
+#include "TestDirichlet.hh" // ISA TestDirichlet
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletTet4;
+ } // bc
+} // pylith
+
+/// C++ unit testing for Dirichlet for mesh with 3-D tet cells.
+class pylith::bc::TestDirichletTet4 : public TestDirichlet
+{ // class TestDirichlet
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDirichletTet4 );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+}; // class TestDirichletTet4
+
+#endif // pylith_bc_dirichlettet4_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDirichletTri3.hh" // Implementation of class methods
+
+#include "data/DirichletDataTri3.hh" // USES DirichletDataTri3
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestDirichletTri3 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::bc::TestDirichletTri3::setUp(void)
+{ // setUp
+ _data = new DirichletDataTri3();
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::bc::TestDirichletTri3::tearDown(void)
+{ // tearDown
+ delete _data;
+} // tearDown
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletTri3.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/bc/TestDirichletTri3.hh
+ *
+ * @brief C++ TestDirichlet object.
+ *
+ * C++ unit testing for Dirichlet for mesh with 1-D line cells.
+ */
+
+#if !defined(pylith_bc_testdirichlettri3_hh)
+#define pylith_bc_testdirichlettri3_hh
+
+#include "TestDirichlet.hh" // ISA TestDirichlet
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace bc {
+ class TestDirichletTri3;
+ } // bc
+} // pylith
+
+/// C++ unit testing for Dirichlet for mesh with 2-D tri cells.
+class pylith::bc::TestDirichletTri3 : public TestDirichlet
+{ // class TestDirichlet
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDirichletTri3 );
+ CPPUNIT_TEST( testInitialize );
+ CPPUNIT_TEST( testSetConstraintSizes );
+ CPPUNIT_TEST( testSetConstraints );
+ CPPUNIT_TEST( testSetField );
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+}; // class TestDirichletTri3
+
+#endif // pylith_bc_dirichlettri3_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshHex8.txt
+ *
+ * Dirichlet BC at vertices 0, 1, 6, 7.
+ *
+ * Fixed DOF: { 0, 2 }
+ *
+ * Values
+ * 0: -0.2, 0.3
+ * 1: 0.1, 0.7
+ * 6: 0.5, 0.4
+ * 7: 3.2, 6.1
+ */
+
+#include "DirichletDataHex8.hh"
+
+const int pylith::bc::DirichletDataHex8::_id = 0;
+
+const char* pylith::bc::DirichletDataHex8::_label = "bc";
+
+const int pylith::bc::DirichletDataHex8::_numDOF = 3;
+const int pylith::bc::DirichletDataHex8::_numFixedDOF = 2;
+const int pylith::bc::DirichletDataHex8::_fixedDOF[] = { 0, 2 };
+
+const int pylith::bc::DirichletDataHex8::_numConstrainedPts = 4;
+const int pylith::bc::DirichletDataHex8::_constrainedPoints[] = { 0, 1, 6, 7 };
+const double pylith::bc::DirichletDataHex8::_values[] = {
+ -0.2, 0.3,
+ 0.1, 0.7,
+ 0.5, 0.4,
+ 3.2, 6.1,
+};
+
+const char* pylith::bc::DirichletDataHex8::_meshFilename =
+ "data/hex8.mesh";
+const char* pylith::bc::DirichletDataHex8::_dbFilename =
+ "data/hex8.spatialdb";
+
+pylith::bc::DirichletDataHex8::DirichletDataHex8(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletDataHex8::~DirichletDataHex8(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataHex8.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletdatahex8_hh)
+#define pylith_bc_dirichletdatahex8_hh
+
+#include "DirichletData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletDataHex8;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletDataHex8 : public DirichletData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletDataHex8(void);
+
+ /// Destructor
+ ~DirichletDataHex8(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletdatahex8_hh
+
+// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataLine2.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -37,7 +37,7 @@
const double pylith::bc::DirichletDataLine2::_values[] = { 1.1, 2.2 };
const char* pylith::bc::DirichletDataLine2::_meshFilename =
- "data/meshLine2.txt";
+ "data/line2.mesh";
const char* pylith::bc::DirichletDataLine2::_dbFilename =
"data/line2.spatialdb";
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,48 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "DirichletDataMulti.hh"
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::bc::DirichletDataMulti::DirichletDataMulti(void) :
+ numDOF(0),
+ numFixedDOFA(0),
+ numConstrainedPtsA(0),
+ idA(0),
+ labelA(0),
+ fixedDOFA(0),
+ constrainedPointsA(0),
+ valuesA(0),
+ dbFilenameA(0),
+ numFixedDOFB(0),
+ numConstrainedPtsB(0),
+ idB(0),
+ labelB(0),
+ fixedDOFB(0),
+ constrainedPointsB(0),
+ valuesB(0),
+ dbFilenameB(0),
+ field(0),
+ bcFlags(0),
+ meshFilename(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::bc::DirichletDataMulti::~DirichletDataMulti(void)
+{ // destructor
+} // destructor
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMulti.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,69 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletdatamulti_hh)
+#define pylith_bc_dirichletdatamulti_hh
+
+namespace pylith {
+ namespace bc {
+ class DirichletDataMulti;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletDataMulti
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+
+ /// Constructor
+ DirichletDataMulti(void);
+
+ /// Destructor
+ ~DirichletDataMulti(void);
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public:
+
+ int numDOF; ///< Number of degrees of freedom at each point.
+
+ //@{ Boundary condition A
+ int numFixedDOFA; ///< Number of fixedDOF at constrained points.
+ int numConstrainedPtsA; ///< Number of points constrained.
+ int idA; ///< Boundary condition identifier
+ char* labelA; ///< Label for boundary condition group
+ int* fixedDOFA; ///< Degrees of freedom that are constrained at each point
+ int* constrainedPointsA; ///< Array of indices of constrained points.
+ double* valuesA; ///< Values at constrained points.
+ char* dbFilenameA; ///< Filename of simple spatial datamultibase.
+ //@}
+
+ //@{ Boundary condition B
+ int numFixedDOFB; ///< Number of fixedDOF at constrained points.
+ int numConstrainedPtsB; ///< Number of points constrained.
+ int idB; ///< Boundary condition identifier
+ char* labelB; ///< Label for boundary condition group
+ int* fixedDOFB; ///< Degrees of freedom that are constrained at each point
+ int* constrainedPointsB; ///< Array of indices of constrained points.
+ double* valuesB; ///< Values at constrained points.
+ char* dbFilenameB; ///< Filename of simple spatial datamultibase.
+ //@}
+
+ double* field; ///< Values in field
+ int* bcFlags; ///< Flags indicating if point is associated with BC
+
+ char* meshFilename; ///< Filename for input mesh.
+};
+
+#endif // pylith_bc_cohesivedatamulti_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,101 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshTri3.txt
+ *
+ * Dirichlet BC A at vertices 1 and 3.
+ *
+ * Fixed DOF: { 1 }
+ *
+ * Values
+ * 1: 0.3
+ * 3: 0.7
+ *
+ * Dirichlet BC B at vertex 0
+ *
+ * Fixed DOF: { 0 }
+ *
+ * Values
+ * 0: 0.9
+ */
+
+#include "DirichletDataMultiTri3.hh"
+
+const int pylith::bc::DirichletDataMultiTri3::_numDOF = 2;
+
+const int pylith::bc::DirichletDataMultiTri3::_idA = 0;
+const char* pylith::bc::DirichletDataMultiTri3::_labelA = "bc";
+const int pylith::bc::DirichletDataMultiTri3::_numFixedDOFA = 1;
+const int pylith::bc::DirichletDataMultiTri3::_fixedDOFA[] = { 1 };
+const int pylith::bc::DirichletDataMultiTri3::_numConstrainedPtsA = 2;
+const int pylith::bc::DirichletDataMultiTri3::_constrainedPointsA[] = { 1, 3 };
+const double pylith::bc::DirichletDataMultiTri3::_valuesA[] = { 0.3, 0.7 };
+const char* pylith::bc::DirichletDataMultiTri3::_dbFilenameA =
+ "data/tri3.spatialdb";
+
+const int pylith::bc::DirichletDataMultiTri3::_idB = 1;
+const char* pylith::bc::DirichletDataMultiTri3::_labelB = "bc2";
+const int pylith::bc::DirichletDataMultiTri3::_numFixedDOFB = 1;
+const int pylith::bc::DirichletDataMultiTri3::_fixedDOFB[] = { 0 };
+const int pylith::bc::DirichletDataMultiTri3::_numConstrainedPtsB = 1;
+const int pylith::bc::DirichletDataMultiTri3::_constrainedPointsB[] = { 0 };
+const double pylith::bc::DirichletDataMultiTri3::_valuesB[] = { 0.9 };
+const char* pylith::bc::DirichletDataMultiTri3::_dbFilenameB =
+ "data/tri3_b.spatialdb";
+
+const double pylith::bc::DirichletDataMultiTri3::_field[] = {
+ 0.9, 0.0,
+ 0.0, 0.3,
+ 0.0, 0.0,
+ 0.0, 0.7
+};
+
+const int pylith::bc::DirichletDataMultiTri3::_bcFlags[] = {
+ 1, 0, -1, 0
+};
+
+const char* pylith::bc::DirichletDataMultiTri3::_meshFilename =
+ "data/tri3.mesh";
+
+pylith::bc::DirichletDataMultiTri3::DirichletDataMultiTri3(void)
+{ // constructor
+ numDOF = _numDOF;
+
+ idA = _idA;
+ labelA = const_cast<char*>(_labelA);
+ numFixedDOFA = _numFixedDOFA;
+ fixedDOFA = const_cast<int*>(_fixedDOFA);
+ numConstrainedPtsA = _numConstrainedPtsA;
+ constrainedPointsA = const_cast<int*>(_constrainedPointsA);
+ valuesA = const_cast<double*>(_valuesA);
+ dbFilenameA = const_cast<char*>(_dbFilenameA);
+
+ idB = _idA;
+ labelB = const_cast<char*>(_labelB);
+ numFixedDOFB = _numFixedDOFB;
+ fixedDOFB = const_cast<int*>(_fixedDOFB);
+ numConstrainedPtsB = _numConstrainedPtsB;
+ constrainedPointsB = const_cast<int*>(_constrainedPointsB);
+ valuesB = const_cast<double*>(_valuesB);
+ dbFilenameB = const_cast<char*>(_dbFilenameB);
+
+ field = const_cast<double*>(_field);
+ bcFlags = const_cast<int*>(_bcFlags);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+} // constructor
+
+pylith::bc::DirichletDataMultiTri3::~DirichletDataMultiTri3(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataMultiTri3.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,66 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletdatamultitri3_hh)
+#define pylith_bc_dirichletdatamultitri3_hh
+
+#include "DirichletDataMulti.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletDataMultiTri3;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletDataMultiTri3 : public DirichletDataMulti
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletDataMultiTri3(void);
+
+ /// Destructor
+ ~DirichletDataMultiTri3(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOFA; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPtsA; ///< Number of points constrained.
+ static const int _idA; ///< Boundary condition identifier
+ static const char* _labelA; /// Label for boundary condition group
+ static const int _fixedDOFA[]; ///< Degrees of freedom constrained at points
+ static const int _constrainedPointsA[]; ///< Array of indices of constrained pts.
+ static const double _valuesA[]; ///< Values at constrained points.
+ static const char* _dbFilenameA; ///< Filename of simple spatial database.
+
+ static const int _numFixedDOFB; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPtsB; ///< Number of points constrained.
+ static const int _idB; ///< Boundary condition identifier
+ static const char* _labelB; /// Label for boundary condition group
+ static const int _fixedDOFB[]; ///< Degrees of freedom constrained at points
+ static const int _constrainedPointsB[]; ///< Array of indices of constrained pts.
+ static const double _valuesB[]; ///< Values at constrained points.
+ static const char* _dbFilenameB; ///< Filename of simple spatial database.
+
+ static const double _field[]; ///< Values in field
+ static const int _bcFlags[]; ///< Flags indicating if point is associated with BC
+ static const char* _meshFilename; ///< Filename of input mesh.
+};
+
+#endif // pylith_bc_dirichletdatamultitri3_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,66 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshQuad4.txt
+ *
+ * Dirichlet BC at vertices 0, 1, 4.
+ *
+ * Fixed DOF: { 0, 1 }
+ *
+ * Values
+ * 0: 0.1, 0.6
+ * 1: 0.5, 0.3
+ * 4: 0.4, 0.2
+ */
+
+#include "DirichletDataQuad4.hh"
+
+const int pylith::bc::DirichletDataQuad4::_id = 0;
+
+const char* pylith::bc::DirichletDataQuad4::_label = "bc";
+
+const int pylith::bc::DirichletDataQuad4::_numDOF = 2;
+const int pylith::bc::DirichletDataQuad4::_numFixedDOF = 2;
+const int pylith::bc::DirichletDataQuad4::_fixedDOF[] = { 0, 1 };
+
+const int pylith::bc::DirichletDataQuad4::_numConstrainedPts = 3;
+const int pylith::bc::DirichletDataQuad4::_constrainedPoints[] = { 0, 1, 4 };
+const double pylith::bc::DirichletDataQuad4::_values[] =
+ { 0.1, 0.6, 0.5, 0.3, 0.4, 0.2 };
+
+const char* pylith::bc::DirichletDataQuad4::_meshFilename =
+ "data/quad4.mesh";
+const char* pylith::bc::DirichletDataQuad4::_dbFilename =
+ "data/quad4.spatialdb";
+
+pylith::bc::DirichletDataQuad4::DirichletDataQuad4(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletDataQuad4::~DirichletDataQuad4(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataQuad4.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletdataquad4_hh)
+#define pylith_bc_dirichletdataquad4_hh
+
+#include "DirichletData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletDataQuad4;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletDataQuad4 : public DirichletData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletDataQuad4(void);
+
+ /// Destructor
+ ~DirichletDataQuad4(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletdataquad4_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshTet4.txt
+ *
+ * Dirichlet BC at vertices 2.
+ *
+ * Fixed DOF: { 1, 2 }
+ *
+ * Values
+ * 2: 0.7, 0.2
+ */
+
+#include "DirichletDataTet4.hh"
+
+const int pylith::bc::DirichletDataTet4::_id = 0;
+
+const char* pylith::bc::DirichletDataTet4::_label = "bc";
+
+const int pylith::bc::DirichletDataTet4::_numDOF = 3;
+const int pylith::bc::DirichletDataTet4::_numFixedDOF = 2;
+const int pylith::bc::DirichletDataTet4::_fixedDOF[] = { 1, 2 };
+
+const int pylith::bc::DirichletDataTet4::_numConstrainedPts = 1;
+const int pylith::bc::DirichletDataTet4::_constrainedPoints[] = { 2 };
+const double pylith::bc::DirichletDataTet4::_values[] = { 0.7, 0.2 };
+
+const char* pylith::bc::DirichletDataTet4::_meshFilename =
+ "data/tet4.mesh";
+const char* pylith::bc::DirichletDataTet4::_dbFilename =
+ "data/tet4.spatialdb";
+
+pylith::bc::DirichletDataTet4::DirichletDataTet4(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletDataTet4::~DirichletDataTet4(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTet4.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletdatatet4_hh)
+#define pylith_bc_dirichletdatatet4_hh
+
+#include "DirichletData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletDataTet4;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletDataTet4 : public DirichletData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletDataTet4(void);
+
+ /// Destructor
+ ~DirichletDataTet4(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletdatatet4_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.cc 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,64 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/* Mesh: meshTri3.txt
+ *
+ * Dirichlet BC at vertices 1 and 3.
+ *
+ * Fixed DOF: { 1 }
+ *
+ * Values
+ * 1: 0.3
+ * 3: 0.7
+ */
+
+#include "DirichletDataTri3.hh"
+
+const int pylith::bc::DirichletDataTri3::_id = 0;
+
+const char* pylith::bc::DirichletDataTri3::_label = "bc";
+
+const int pylith::bc::DirichletDataTri3::_numDOF = 2;
+const int pylith::bc::DirichletDataTri3::_numFixedDOF = 1;
+const int pylith::bc::DirichletDataTri3::_fixedDOF[] = { 1 };
+
+const int pylith::bc::DirichletDataTri3::_numConstrainedPts = 2;
+const int pylith::bc::DirichletDataTri3::_constrainedPoints[] = { 1, 3 };
+const double pylith::bc::DirichletDataTri3::_values[] = { 0.3, 0.7 };
+
+const char* pylith::bc::DirichletDataTri3::_meshFilename =
+ "data/tri3.mesh";
+const char* pylith::bc::DirichletDataTri3::_dbFilename =
+ "data/tri3.spatialdb";
+
+pylith::bc::DirichletDataTri3::DirichletDataTri3(void)
+{ // constructor
+ id = _id;
+ label = const_cast<char*>(_label);
+
+ numDOF = _numDOF;
+ numFixedDOF = _numFixedDOF;
+ fixedDOF = const_cast<int*>(_fixedDOF);
+
+ numConstrainedPts = _numConstrainedPts;
+ constrainedPoints = const_cast<int*>(_constrainedPoints);
+ values = const_cast<double*>(_values);
+
+ meshFilename = const_cast<char*>(_meshFilename);
+ dbFilename = const_cast<char*>(_dbFilename);
+} // constructor
+
+pylith::bc::DirichletDataTri3::~DirichletDataTri3(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/DirichletDataTri3.hh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_bc_dirichletdatatri3_hh)
+#define pylith_bc_dirichletdatatri3_hh
+
+#include "DirichletData.hh"
+
+namespace pylith {
+ namespace bc {
+ class DirichletDataTri3;
+ } // pylith
+} // bc
+
+class pylith::bc::DirichletDataTri3 : public DirichletData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public:
+
+ /// Constructor
+ DirichletDataTri3(void);
+
+ /// Destructor
+ ~DirichletDataTri3(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+ static const int _numDOF; ///< Number of degrees of freedom at each point.
+
+ static const int _numFixedDOF; ///< Number of fixedDOF at constrained points.
+ static const int _numConstrainedPts; ///< Number of points constrained.
+
+ static const int _id; ///< Boundary condition identifier
+ static const char* _label; /// Label for boundary condition group
+
+ static const int _fixedDOF[]; ///< Degrees of freedom constrained at points
+
+ static const int _constrainedPoints[]; ///< Array of indices of constrained pts.
+ static const double _values[]; ///< Values at constrained points.
+
+ static const char* _meshFilename; ///< Filename of input mesh.
+ static const char* _dbFilename; ///< Filename of simple spatial database.
+};
+
+#endif // pylith_bc_dirichletdatatri3_hh
+
+// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/Makefile.am 2007-05-18 00:37:24 UTC (rev 6918)
@@ -11,11 +11,18 @@
#
noinst_DATA = \
- meshLine2.txt \
- line2.spatialdb
+ line2.mesh \
+ line2.spatialdb \
+ tri3.mesh \
+ tri3.spatialdb \
+ tri3_b.spatialdb \
+ quad4.mesh \
+ quad4.spatialdb \
+ tet4.mesh \
+ tet4.spatialdb \
+ hex8.mesh \
+ hex8.spatialdb
-noinst_TMP =
-
# 'export' the input files by performing a mock install
export_datadir = $(top_builddir)/unittests/libtests/bc/data
export-data: $(noinst_DATA)
@@ -24,8 +31,7 @@
BUILT_SOURCES = export-data
CLEANFILES = \
- $(export_datadir)/$(noinst_DATA) \
- $(export_datadir)/$(noinst_TMP)
+ $(export_datadir)/$(noinst_DATA)
# End of file
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.mesh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.mesh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,42 @@
+mesh = {
+ dimension = 3
+ use-index-zero = true
+ vertices = {
+ dimension = 3
+ count = 12
+ coordinates = {
+ 0 -1.0 -1.0 -1.0
+ 1 -1.0 1.0 -1.0
+ 2 0.0 -1.0 -1.0
+ 3 0.0 1.0 -1.0
+ 4 1.0 -1.0 -1.0
+ 5 1.0 1.0 -1.0
+ 6 -1.0 -1.0 1.0
+ 7 -1.0 1.0 1.0
+ 8 0.0 -1.0 1.0
+ 9 0.0 1.0 1.0
+ 10 1.0 -1.0 1.0
+ 11 1.0 1.0 1.0
+ }
+ }
+ cells = {
+ count = 2
+ num-corners = 8
+ simplices = {
+ 0 0 2 3 1 6 8 9 7
+ 1 2 4 5 3 8 10 11 9
+ }
+ material-ids = {
+ 0 0
+ 1 0
+ }
+ }
+ group = {
+ name = bc
+ type = vertices
+ count = 4
+ indices = {
+ 0 1 6 7
+ }
+ }
+}
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/hex8.spatialdb 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,17 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = dof-0 dof-1 dof-2
+ value-units = m m m
+ num-locs = 4
+ data-dim = 1
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+-1.0 -1.0 -1.0 -0.2 9.9 0.3
+-1.0 1.0 -1.0 0.1 9.9 0.7
+-1.0 -1.0 1.0 0.5 9.9 0.4
+-1.0 1.0 1.0 3.2 9.9 6.1
Copied: short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.mesh (from rev 6917, short/3D/PyLith/trunk/unittests/libtests/bc/data/meshLine2.txt)
Deleted: short/3D/PyLith/trunk/unittests/libtests/bc/data/meshLine2.txt
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/meshLine2.txt 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/meshLine2.txt 2007-05-18 00:37:24 UTC (rev 6918)
@@ -1,33 +0,0 @@
-mesh = {
- dimension = 1
- use-index-zero = true
- vertices = {
- dimension = 1
- count = 3
- coordinates = {
- 0 -1.0
- 1 0.0
- 2 1.0
- }
- }
- cells = {
- count = 2
- num-corners = 2
- simplices = {
- 0 0 1
- 1 1 2
- }
- material-ids = {
- 0 0
- 1 0
- }
- }
- group = {
- name = bc0
- type = vertices
- count = 2
- indices = {
- 0 2
- }
- }
-}
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.mesh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.mesh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,36 @@
+mesh = {
+ dimension = 2
+ use-index-zero = true
+ vertices = {
+ dimension = 2
+ count = 6
+ coordinates = {
+ 0 -1.0 -1.0
+ 1 -1.0 1.0
+ 2 0.0 -1.0
+ 3 0.0 1.0
+ 4 1.0 -1.0
+ 5 1.0 1.0
+ }
+ }
+ cells = {
+ count = 2
+ num-corners = 4
+ simplices = {
+ 0 0 2 3 1
+ 1 2 4 5 3
+ }
+ material-ids = {
+ 0 0
+ 1 0
+ }
+ }
+ group = {
+ name = bc
+ type = vertices
+ count = 3
+ indices = {
+ 0 1 4
+ }
+ }
+}
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/quad4.spatialdb 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = dof-0 dof-1
+ value-units = m m
+ num-locs = 3
+ data-dim = 2
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+-1.0 -1.0 0.1 0.6
+-1.0 1.0 0.5 0.3
+ 1.0 -1.0 0.4 0.2
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.mesh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.mesh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,32 @@
+mesh = {
+ dimension = 3
+ use-index-zero = true
+ vertices = {
+ dimension = 3
+ count = 4
+ 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
+ }
+ }
+ cells = {
+ count = 1
+ num-corners = 4
+ simplices = {
+ 0 0 1 2 3
+ }
+ material-ids = {
+ 0 0
+ }
+ }
+ group = {
+ name = bc
+ type = vertices
+ count = 1
+ indices = {
+ 2
+ }
+ }
+}
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tet4.spatialdb 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = dof-1 dof-2
+ value-units = m m
+ num-locs = 1
+ data-dim = 0
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+0.0 0.0 0.0 0.7 0.2
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.mesh 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.mesh 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,42 @@
+mesh = {
+ dimension = 2
+ use-index-zero = true
+ vertices = {
+ dimension = 2
+ count = 4
+ coordinates = {
+ 0 -1.0 0.0
+ 1 0.0 -1.0
+ 2 0.0 1.0
+ 3 1.0 0.0
+ }
+ }
+ cells = {
+ count = 2
+ num-corners = 3
+ simplices = {
+ 0 0 1 2
+ 1 1 3 2
+ }
+ material-ids = {
+ 0 0
+ 1 0
+ }
+ }
+ group = {
+ name = bc
+ type = vertices
+ count = 2
+ indices = {
+ 1 3
+ }
+ }
+ group = {
+ name = bc2
+ type = vertices
+ count = 1
+ indices = {
+ 0
+ }
+ }
+}
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3.spatialdb 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = dof-1
+ value-units = m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 -1.0 0.3
+ 1.0 0.0 0.7
Added: short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb 2007-05-17 22:18:01 UTC (rev 6917)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/tri3_b.spatialdb 2007-05-18 00:37:24 UTC (rev 6918)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = dof-0
+ value-units = m
+ num-locs = 1
+ data-dim = 0
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+ 0.0 0.0 0.9
More information about the cig-commits
mailing list