[cig-commits] r11179 - in short/3D/PyLith/trunk/unittests/libtests/meshio: . data
brad at geodynamics.org
brad at geodynamics.org
Sun Feb 17 19:53:43 PST 2008
Author: brad
Date: 2008-02-17 19:53:42 -0800 (Sun, 17 Feb 2008)
New Revision: 11179
Added:
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshHex8.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshHex8.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTet4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTet4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTri3.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTri3.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_cell_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_vertex_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_cell_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_vertex_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_cell_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_vertex_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_cell_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_t10.vtk
short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_vertex_t10.vtk
Modified:
short/3D/PyLith/trunk/unittests/libtests/meshio/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/meshio/data/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8.mesh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/line2.mesh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4.mesh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3.mesh
Log:
Added more C++ unit tests for DataWriterVTK.
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/Makefile.am 2008-02-17 17:46:55 UTC (rev 11178)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/Makefile.am 2008-02-18 03:53:42 UTC (rev 11179)
@@ -24,6 +24,10 @@
TestDataWriterVTK.cc \
TestDataWriterVTKMesh.cc \
TestDataWriterVTKMeshLine2.cc \
+ TestDataWriterVTKMeshTri3.cc \
+ TestDataWriterVTKMeshQuad4.cc \
+ TestDataWriterVTKMeshTet4.cc \
+ TestDataWriterVTKMeshHex8.cc \
TestMeshIO.cc \
TestMeshIOAscii.cc \
TestMeshIOLagrit.cc \
@@ -33,6 +37,10 @@
TestDataWriterVTK.hh \
TestDataWriterVTKMesh.hh \
TestDataWriterVTKMeshLine2.hh \
+ TestDataWriterVTKMeshTri3.hh \
+ TestDataWriterVTKMeshQuad4.hh \
+ TestDataWriterVTKMeshTet4.hh \
+ TestDataWriterVTKMeshHex8.hh \
TestMeshIO.hh \
TestMeshIOAscii.hh \
TestMeshIOLagrit.hh
@@ -42,6 +50,10 @@
data/DataWriterVTKData.cc \
data/DataWriterVTKDataMesh.cc \
data/DataWriterVTKDataMeshLine2.cc \
+ data/DataWriterVTKDataMeshTri3.cc \
+ data/DataWriterVTKDataMeshQuad4.cc \
+ data/DataWriterVTKDataMeshTet4.cc \
+ data/DataWriterVTKDataMeshHex8.cc \
data/MeshData.cc \
data/MeshData1D.cc \
data/MeshData1Din3D.cc \
@@ -60,6 +72,10 @@
data/DataWriterVTKData.hh \
data/DataWriterVTKDataMesh.hh \
data/DataWriterVTKDataMeshLine2.hh \
+ data/DataWriterVTKDataMeshTri3.hh \
+ data/DataWriterVTKDataMeshQuad4.hh \
+ data/DataWriterVTKDataMeshTet4.hh \
+ data/DataWriterVTKDataMeshHex8.hh \
data/MeshData.hh \
data/MeshData1D.hh \
data/MeshData1Din2D.hh \
@@ -103,7 +119,19 @@
mesh3D.txt \
line2_t10.vtk \
line2_vertex_t10.vtk \
- line2_cell_t10.vtk
+ line2_cell_t10.vtk \
+ tri3_t10.vtk \
+ tri3_vertex_t10.vtk \
+ tri3_cell_t10.vtk \
+ quad4_t10.vtk \
+ quad4_vertex_t10.vtk \
+ quad4_cell_t10.vtk \
+ tet4_t10.vtk \
+ tet4_vertex_t10.vtk \
+ tet4_cell_t10.vtk \
+ hex8_t10.vtk \
+ hex8_vertex_t10.vtk \
+ hex8_cell_t10.vtk
CLEANFILES = $(noinst_tmp)
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshHex8.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshHex8.cc 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,34 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterVTKMeshHex8.hh" // Implementation of class methods
+
+#include "data/DataWriterVTKDataMeshHex8.hh" // USES DataWriterVTKDataMeshHex8
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::meshio::TestDataWriterVTKMeshHex8 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterVTKMeshHex8::setUp(void)
+{ // setUp
+ TestDataWriterVTKMesh::setUp();
+ _data = new DataWriterVTKDataMeshHex8;
+ _dataMesh = new DataWriterVTKDataMeshHex8;
+ _initialize();
+} // setUp
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshHex8.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshHex8.hh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterVTKMeshHex8.hh
+ *
+ * @brief C++ TestDataWriterVTKMeshHex8 object
+ *
+ * C++ unit testing for DataWriterVTKMeshHex8.
+ */
+
+#if !defined(pylith_meshio_testdatawritervtkmeshhex8_hh)
+#define pylith_meshio_testdatawritervtkmeshhex8_hh
+
+#include "TestDataWriterVTKMesh.hh"
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterVTKMeshHex8;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriterVTK
+class pylith::meshio::TestDataWriterVTKMeshHex8 : public TestDataWriterVTKMesh
+{ // class TestDataWriterVTKMeshHex8
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDataWriterVTKMeshHex8 );
+
+ CPPUNIT_TEST( testTimeStep );
+ CPPUNIT_TEST( testWriteVertexField );
+ CPPUNIT_TEST( testWriteCellField );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDataWriterVTKMeshHex8
+
+#endif // pylith_meshio_testdatawritervtkmeshhex8_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.cc 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,34 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterVTKMeshQuad4.hh" // Implementation of class methods
+
+#include "data/DataWriterVTKDataMeshQuad4.hh" // USES DataWriterVTKDataMeshQuad4
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::meshio::TestDataWriterVTKMeshQuad4 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterVTKMeshQuad4::setUp(void)
+{ // setUp
+ TestDataWriterVTKMesh::setUp();
+ _data = new DataWriterVTKDataMeshQuad4;
+ _dataMesh = new DataWriterVTKDataMeshQuad4;
+ _initialize();
+} // setUp
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.hh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterVTKMeshQuad4.hh
+ *
+ * @brief C++ TestDataWriterVTKMeshQuad4 object
+ *
+ * C++ unit testing for DataWriterVTKMeshQuad4.
+ */
+
+#if !defined(pylith_meshio_testdatawritervtkmeshquad4_hh)
+#define pylith_meshio_testdatawritervtkmeshquad4_hh
+
+#include "TestDataWriterVTKMesh.hh"
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterVTKMeshQuad4;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriterVTK
+class pylith::meshio::TestDataWriterVTKMeshQuad4 : public TestDataWriterVTKMesh
+{ // class TestDataWriterVTKMeshQuad4
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDataWriterVTKMeshQuad4 );
+
+ CPPUNIT_TEST( testTimeStep );
+ CPPUNIT_TEST( testWriteVertexField );
+ CPPUNIT_TEST( testWriteCellField );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDataWriterVTKMeshQuad4
+
+#endif // pylith_meshio_testdatawritervtkmeshquad4_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTet4.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTet4.cc 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,34 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterVTKMeshTet4.hh" // Implementation of class methods
+
+#include "data/DataWriterVTKDataMeshTet4.hh" // USES DataWriterVTKDataMeshTet4
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::meshio::TestDataWriterVTKMeshTet4 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterVTKMeshTet4::setUp(void)
+{ // setUp
+ TestDataWriterVTKMesh::setUp();
+ _data = new DataWriterVTKDataMeshTet4;
+ _dataMesh = new DataWriterVTKDataMeshTet4;
+ _initialize();
+} // setUp
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTet4.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTet4.hh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterVTKMeshTet4.hh
+ *
+ * @brief C++ TestDataWriterVTKMeshTet4 object
+ *
+ * C++ unit testing for DataWriterVTKMeshTet4.
+ */
+
+#if !defined(pylith_meshio_testdatawritervtkmeshtet4_hh)
+#define pylith_meshio_testdatawritervtkmeshtet4_hh
+
+#include "TestDataWriterVTKMesh.hh"
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterVTKMeshTet4;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriterVTK
+class pylith::meshio::TestDataWriterVTKMeshTet4 : public TestDataWriterVTKMesh
+{ // class TestDataWriterVTKMeshTet4
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDataWriterVTKMeshTet4 );
+
+ CPPUNIT_TEST( testTimeStep );
+ CPPUNIT_TEST( testWriteVertexField );
+ CPPUNIT_TEST( testWriteCellField );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDataWriterVTKMeshTet4
+
+#endif // pylith_meshio_testdatawritervtkmeshtet4_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTri3.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTri3.cc 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,34 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterVTKMeshTri3.hh" // Implementation of class methods
+
+#include "data/DataWriterVTKDataMeshTri3.hh" // USES DataWriterVTKDataMeshTri3
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::meshio::TestDataWriterVTKMeshTri3 );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterVTKMeshTri3::setUp(void)
+{ // setUp
+ TestDataWriterVTKMesh::setUp();
+ _data = new DataWriterVTKDataMeshTri3;
+ _dataMesh = new DataWriterVTKDataMeshTri3;
+ _initialize();
+} // setUp
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTri3.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMeshTri3.hh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterVTKMeshTri3.hh
+ *
+ * @brief C++ TestDataWriterVTKMeshTri3 object
+ *
+ * C++ unit testing for DataWriterVTKMeshTri3.
+ */
+
+#if !defined(pylith_meshio_testdatawritervtkmeshtri3_hh)
+#define pylith_meshio_testdatawritervtkmeshtri3_hh
+
+#include "TestDataWriterVTKMesh.hh"
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterVTKMeshTri3;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriterVTK
+class pylith::meshio::TestDataWriterVTKMeshTri3 : public TestDataWriterVTKMesh
+{ // class TestDataWriterVTKMeshTri3
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDataWriterVTKMeshTri3 );
+
+ CPPUNIT_TEST( testTimeStep );
+ CPPUNIT_TEST( testWriteVertexField );
+ CPPUNIT_TEST( testWriteCellField );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+}; // class TestDataWriterVTKMeshTri3
+
+#endif // pylith_meshio_testdatawritervtkmeshtri3_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "DataWriterVTKDataMeshHex8.hh"
+
+const char* pylith::meshio::DataWriterVTKDataMeshHex8::_meshFilename =
+ "data/hex8.mesh";
+
+const char* pylith::meshio::DataWriterVTKDataMeshHex8::_timestepFilename =
+ "hex8.vtk";
+
+const char* pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFilename =
+ "hex8_vertex.vtk";
+
+const char* pylith::meshio::DataWriterVTKDataMeshHex8::_cellFilename =
+ "hex8_cell.vtk";
+
+const double pylith::meshio::DataWriterVTKDataMeshHex8::_time = 1.0;
+
+const char* pylith::meshio::DataWriterVTKDataMeshHex8::_timeFormat =
+ "%3.1f";
+
+const int pylith::meshio::DataWriterVTKDataMeshHex8::_numVertexFields = 3;
+const int pylith::meshio::DataWriterVTKDataMeshHex8::_numVertices = 12;
+
+const pylith::meshio::DataWriterVTKData::FieldStruct
+pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFields[] = {
+ { "displacements", VECTOR_FIELD, 3, 0 },
+ { "pressure", SCALAR_FIELD, 1, 0 },
+ { "other", OTHER_FIELD, 2, 0 },
+};
+const double pylith::meshio::DataWriterVTKDataMeshHex8::_vertexField0[] = {
+ 1.1, 2.2, 3.3,
+ 4.4, 5.5, 6.6,
+ 7.7, 8.8, 9.9,
+ 10.1, 11.2, 12.3,
+ 1.2, 2.3, 3.4,
+ 4.5, 5.6, 6.7,
+ 7.8, 8.9, 9.0,
+ 10.2, 11.3, 12.4,
+ 1.3, 2.4, 3.5,
+ 4.6, 5.7, 6.8,
+ 7.9, 8.0, 9.1,
+ 10.2, 11.3, 12.4,
+};
+const double pylith::meshio::DataWriterVTKDataMeshHex8::_vertexField1[] = {
+ 2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.0, 12.1, 11.1, 13.1
+};
+const double pylith::meshio::DataWriterVTKDataMeshHex8::_vertexField2[] = {
+ 1.2, 2.3,
+ 3.4, 4.5,
+ 5.6, 6.7,
+ 7.8, 8.9,
+ 1.3, 2.4,
+ 3.5, 4.6,
+ 5.7, 6.8,
+ 7.9, 8.0,
+ 1.3, 2.4,
+ 3.5, 4.6,
+ 5.7, 6.8,
+ 7.9, 8.0,
+};
+
+const int pylith::meshio::DataWriterVTKDataMeshHex8::_numCellFields = 3;
+const int pylith::meshio::DataWriterVTKDataMeshHex8::_numCells = 1;
+
+const pylith::meshio::DataWriterVTKData::FieldStruct
+pylith::meshio::DataWriterVTKDataMeshHex8::_cellFields[] = {
+ { "traction", VECTOR_FIELD, 3, 0 },
+ { "pressure", SCALAR_FIELD, 1, 0 },
+ { "other", TENSOR_FIELD, 6, 0 },
+};
+const double pylith::meshio::DataWriterVTKDataMeshHex8::_cellField0[] = {
+ 1.1, 2.2, 3.3,
+ 4.4, 5.5, 6.6
+};
+const double pylith::meshio::DataWriterVTKDataMeshHex8::_cellField1[] = {
+ 2.1, 3.2,
+};
+const double pylith::meshio::DataWriterVTKDataMeshHex8::_cellField2[] = {
+ 1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
+ 1.1, 2.2, 3.3, 4.4, 5.5, 6.6,
+};
+
+pylith::meshio::DataWriterVTKDataMeshHex8::DataWriterVTKDataMeshHex8(void)
+{ // constructor
+ meshFilename = const_cast<char*>(_meshFilename);
+
+ timestepFilename = const_cast<char*>(_timestepFilename);
+ vertexFilename = const_cast<char*>(_vertexFilename);
+ cellFilename = const_cast<char*>(_cellFilename);
+
+ time = _time;
+ timeFormat = const_cast<char*>(_timeFormat);
+
+ numVertexFields = _numVertexFields;
+ numVertices = _numVertices;
+ vertexFields = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFields[0].values = const_cast<double*>(_vertexField0);
+ vertexFields[1].values = const_cast<double*>(_vertexField1);
+ vertexFields[2].values = const_cast<double*>(_vertexField2);
+
+ numCellFields = _numCellFields;
+ numVertices = _numVertices;
+ cellFields = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFields[0].values = const_cast<double*>(_cellField0);
+ cellFields[1].values = const_cast<double*>(_cellField1);
+ cellFields[2].values = const_cast<double*>(_cellField2);
+} // constructor
+
+pylith::meshio::DataWriterVTKDataMeshHex8::~DataWriterVTKDataMeshHex8(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,75 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_meshio_datawritervtkdatameshhex8_hh)
+#define pylith_meshio_datawritervtkdatameshhex8_hh
+
+#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterVTKDataMesh.hh" // ISA DataWriterVTKDataMesh
+
+namespace pylith {
+ namespace meshio {
+ class DataWriterVTKDataMeshHex8;
+ } // meshio
+} // pylith
+
+class pylith::meshio::DataWriterVTKDataMeshHex8 :
+ public DataWriterVTKData,
+ public DataWriterVTKDataMesh
+{ // DataWriterVTKDataMeshHex8
+
+public:
+
+ /// Constructor
+ DataWriterVTKDataMeshHex8(void);
+
+ /// Destructor
+ ~DataWriterVTKDataMeshHex8(void);
+
+private:
+
+ static const char* _meshFilename; ///< Name of mesh file.
+
+ static const char* _timestepFilename; ///< Name of VTK file without fields.
+ static const char* _vertexFilename; ///< Name of VTK file for vertex fields.
+ static const char* _cellFilename; ///< Name of VTK file for cell fields.
+
+ static const double _time; ///< Time for fields.
+ static const char* _timeFormat; ///< Format for time stamp.
+
+ /// @name Vertex field information.
+ //@{
+ static const int _numVertexFields; ///< Number of vertex fields.
+ static const int _numVertices; ///< Number of vertices.
+ static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
+
+ static const double _vertexField0[]; ///< Values for vertex field 0.
+ static const double _vertexField1[]; ///< Values for vertex field 1.
+ static const double _vertexField2[]; ///< Values for vertex field 2.
+ //@}
+
+ /// @name Cell field information.
+ //@{
+ static const int _numCellFields; ///< Number of cell fields.
+ static const int _numCells; ///< Number of cells.
+ static const FieldStruct _cellFields[]; ///< Array of cell fields.
+
+ static const double _cellField0[]; ///< Values for cell field 0.
+ static const double _cellField1[]; ///< Values for cell field 1.
+ static const double _cellField2[]; ///< Values for cell field 2.
+ //@}
+
+}; // DataWriterVTKDataMeshHex8
+
+#endif // pylith_meshio_datawritervtkdatameshhex8_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "DataWriterVTKDataMeshQuad4.hh"
+
+const char* pylith::meshio::DataWriterVTKDataMeshQuad4::_meshFilename =
+ "data/quad4.mesh";
+
+const char* pylith::meshio::DataWriterVTKDataMeshQuad4::_timestepFilename =
+ "quad4.vtk";
+
+const char* pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFilename =
+ "quad4_vertex.vtk";
+
+const char* pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFilename =
+ "quad4_cell.vtk";
+
+const double pylith::meshio::DataWriterVTKDataMeshQuad4::_time = 1.0;
+
+const char* pylith::meshio::DataWriterVTKDataMeshQuad4::_timeFormat =
+ "%3.1f";
+
+const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numVertexFields = 3;
+const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numVertices = 6;
+
+const pylith::meshio::DataWriterVTKData::FieldStruct
+pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFields[] = {
+ { "displacements", VECTOR_FIELD, 2, 0 },
+ { "pressure", SCALAR_FIELD, 1, 0 },
+ { "other", OTHER_FIELD, 2, 0 },
+};
+const double pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexField0[] = {
+ 1.1, 2.2,
+ 3.3, 4.4,
+ 5.5, 6.6,
+ 7.7, 8.8,
+ 9.9, 10.1,
+ 11.2, 12.3,
+};
+const double pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexField1[] = {
+ 2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+};
+const double pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexField2[] = {
+ 1.2, 2.3,
+ 3.4, 4.5,
+ 5.6, 6.7,
+ 7.8, 8.9,
+ 9.8, 7.6,
+ 6.5, 5.4
+};
+
+const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numCellFields = 3;
+const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numCells = 2;
+
+const pylith::meshio::DataWriterVTKData::FieldStruct
+pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFields[] = {
+ { "traction", VECTOR_FIELD, 2, 0 },
+ { "pressure", SCALAR_FIELD, 1, 0 },
+ { "other", TENSOR_FIELD, 3, 0 },
+};
+const double pylith::meshio::DataWriterVTKDataMeshQuad4::_cellField0[] = {
+ 1.1, 2.2,
+ 3.3, 4.4
+};
+const double pylith::meshio::DataWriterVTKDataMeshQuad4::_cellField1[] = {
+ 2.1, 2.2,
+};
+const double pylith::meshio::DataWriterVTKDataMeshQuad4::_cellField2[] = {
+ 1.2, 2.3, 3.4,
+ 4.5, 5.6, 6.7,
+};
+
+pylith::meshio::DataWriterVTKDataMeshQuad4::DataWriterVTKDataMeshQuad4(void)
+{ // constructor
+ meshFilename = const_cast<char*>(_meshFilename);
+
+ timestepFilename = const_cast<char*>(_timestepFilename);
+ vertexFilename = const_cast<char*>(_vertexFilename);
+ cellFilename = const_cast<char*>(_cellFilename);
+
+ time = _time;
+ timeFormat = const_cast<char*>(_timeFormat);
+
+ numVertexFields = _numVertexFields;
+ numVertices = _numVertices;
+ vertexFields = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFields[0].values = const_cast<double*>(_vertexField0);
+ vertexFields[1].values = const_cast<double*>(_vertexField1);
+ vertexFields[2].values = const_cast<double*>(_vertexField2);
+
+ numCellFields = _numCellFields;
+ numVertices = _numVertices;
+ cellFields = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFields[0].values = const_cast<double*>(_cellField0);
+ cellFields[1].values = const_cast<double*>(_cellField1);
+ cellFields[2].values = const_cast<double*>(_cellField2);
+} // constructor
+
+pylith::meshio::DataWriterVTKDataMeshQuad4::~DataWriterVTKDataMeshQuad4(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,75 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_meshio_datawritervtkdatameshquad4_hh)
+#define pylith_meshio_datawritervtkdatameshquad4_hh
+
+#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterVTKDataMesh.hh" // ISA DataWriterVTKDataMesh
+
+namespace pylith {
+ namespace meshio {
+ class DataWriterVTKDataMeshQuad4;
+ } // meshio
+} // pylith
+
+class pylith::meshio::DataWriterVTKDataMeshQuad4 :
+ public DataWriterVTKData,
+ public DataWriterVTKDataMesh
+{ // DataWriterVTKDataMeshQuad4
+
+public:
+
+ /// Constructor
+ DataWriterVTKDataMeshQuad4(void);
+
+ /// Destructor
+ ~DataWriterVTKDataMeshQuad4(void);
+
+private:
+
+ static const char* _meshFilename; ///< Name of mesh file.
+
+ static const char* _timestepFilename; ///< Name of VTK file without fields.
+ static const char* _vertexFilename; ///< Name of VTK file for vertex fields.
+ static const char* _cellFilename; ///< Name of VTK file for cell fields.
+
+ static const double _time; ///< Time for fields.
+ static const char* _timeFormat; ///< Format for time stamp.
+
+ /// @name Vertex field information.
+ //@{
+ static const int _numVertexFields; ///< Number of vertex fields.
+ static const int _numVertices; ///< Number of vertices.
+ static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
+
+ static const double _vertexField0[]; ///< Values for vertex field 0.
+ static const double _vertexField1[]; ///< Values for vertex field 1.
+ static const double _vertexField2[]; ///< Values for vertex field 2.
+ //@}
+
+ /// @name Cell field information.
+ //@{
+ static const int _numCellFields; ///< Number of cell fields.
+ static const int _numCells; ///< Number of cells.
+ static const FieldStruct _cellFields[]; ///< Array of cell fields.
+
+ static const double _cellField0[]; ///< Values for cell field 0.
+ static const double _cellField1[]; ///< Values for cell field 1.
+ static const double _cellField2[]; ///< Values for cell field 2.
+ //@}
+
+}; // DataWriterVTKDataMeshQuad4
+
+#endif // pylith_meshio_datawritervtkdatameshquad4_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,106 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "DataWriterVTKDataMeshTet4.hh"
+
+const char* pylith::meshio::DataWriterVTKDataMeshTet4::_meshFilename =
+ "data/tet4.mesh";
+
+const char* pylith::meshio::DataWriterVTKDataMeshTet4::_timestepFilename =
+ "tet4.vtk";
+
+const char* pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFilename =
+ "tet4_vertex.vtk";
+
+const char* pylith::meshio::DataWriterVTKDataMeshTet4::_cellFilename =
+ "tet4_cell.vtk";
+
+const double pylith::meshio::DataWriterVTKDataMeshTet4::_time = 1.0;
+
+const char* pylith::meshio::DataWriterVTKDataMeshTet4::_timeFormat =
+ "%3.1f";
+
+const int pylith::meshio::DataWriterVTKDataMeshTet4::_numVertexFields = 3;
+const int pylith::meshio::DataWriterVTKDataMeshTet4::_numVertices = 4;
+
+const pylith::meshio::DataWriterVTKData::FieldStruct
+pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFields[] = {
+ { "displacements", VECTOR_FIELD, 3, 0 },
+ { "pressure", SCALAR_FIELD, 1, 0 },
+ { "other", OTHER_FIELD, 2, 0 },
+};
+const double pylith::meshio::DataWriterVTKDataMeshTet4::_vertexField0[] = {
+ 1.1, 2.2, 3.3,
+ 4.4, 5.5, 6.6,
+ 7.7, 8.8, 9.9,
+ 10.1, 11.2, 12.3
+};
+const double pylith::meshio::DataWriterVTKDataMeshTet4::_vertexField1[] = {
+ 2.1, 3.2, 4.3, 5.4,
+};
+const double pylith::meshio::DataWriterVTKDataMeshTet4::_vertexField2[] = {
+ 1.2, 2.3,
+ 3.4, 4.5,
+ 5.6, 6.7,
+ 7.8, 8.9,
+};
+
+const int pylith::meshio::DataWriterVTKDataMeshTet4::_numCellFields = 3;
+const int pylith::meshio::DataWriterVTKDataMeshTet4::_numCells = 1;
+
+const pylith::meshio::DataWriterVTKData::FieldStruct
+pylith::meshio::DataWriterVTKDataMeshTet4::_cellFields[] = {
+ { "traction", VECTOR_FIELD, 3, 0 },
+ { "pressure", SCALAR_FIELD, 1, 0 },
+ { "other", TENSOR_FIELD, 6, 0 },
+};
+const double pylith::meshio::DataWriterVTKDataMeshTet4::_cellField0[] = {
+ 1.1, 2.2, 3.3
+};
+const double pylith::meshio::DataWriterVTKDataMeshTet4::_cellField1[] = {
+ 2.1,
+};
+const double pylith::meshio::DataWriterVTKDataMeshTet4::_cellField2[] = {
+ 1.2, 2.3, 3.4, 4.5, 5.6, 6.7
+};
+
+pylith::meshio::DataWriterVTKDataMeshTet4::DataWriterVTKDataMeshTet4(void)
+{ // constructor
+ meshFilename = const_cast<char*>(_meshFilename);
+
+ timestepFilename = const_cast<char*>(_timestepFilename);
+ vertexFilename = const_cast<char*>(_vertexFilename);
+ cellFilename = const_cast<char*>(_cellFilename);
+
+ time = _time;
+ timeFormat = const_cast<char*>(_timeFormat);
+
+ numVertexFields = _numVertexFields;
+ numVertices = _numVertices;
+ vertexFields = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFields[0].values = const_cast<double*>(_vertexField0);
+ vertexFields[1].values = const_cast<double*>(_vertexField1);
+ vertexFields[2].values = const_cast<double*>(_vertexField2);
+
+ numCellFields = _numCellFields;
+ numVertices = _numVertices;
+ cellFields = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFields[0].values = const_cast<double*>(_cellField0);
+ cellFields[1].values = const_cast<double*>(_cellField1);
+ cellFields[2].values = const_cast<double*>(_cellField2);
+} // constructor
+
+pylith::meshio::DataWriterVTKDataMeshTet4::~DataWriterVTKDataMeshTet4(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,75 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_meshio_datawritervtkdatameshtet4_hh)
+#define pylith_meshio_datawritervtkdatameshtet4_hh
+
+#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterVTKDataMesh.hh" // ISA DataWriterVTKDataMesh
+
+namespace pylith {
+ namespace meshio {
+ class DataWriterVTKDataMeshTet4;
+ } // meshio
+} // pylith
+
+class pylith::meshio::DataWriterVTKDataMeshTet4 :
+ public DataWriterVTKData,
+ public DataWriterVTKDataMesh
+{ // DataWriterVTKDataMeshTet4
+
+public:
+
+ /// Constructor
+ DataWriterVTKDataMeshTet4(void);
+
+ /// Destructor
+ ~DataWriterVTKDataMeshTet4(void);
+
+private:
+
+ static const char* _meshFilename; ///< Name of mesh file.
+
+ static const char* _timestepFilename; ///< Name of VTK file without fields.
+ static const char* _vertexFilename; ///< Name of VTK file for vertex fields.
+ static const char* _cellFilename; ///< Name of VTK file for cell fields.
+
+ static const double _time; ///< Time for fields.
+ static const char* _timeFormat; ///< Format for time stamp.
+
+ /// @name Vertex field information.
+ //@{
+ static const int _numVertexFields; ///< Number of vertex fields.
+ static const int _numVertices; ///< Number of vertices.
+ static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
+
+ static const double _vertexField0[]; ///< Values for vertex field 0.
+ static const double _vertexField1[]; ///< Values for vertex field 1.
+ static const double _vertexField2[]; ///< Values for vertex field 2.
+ //@}
+
+ /// @name Cell field information.
+ //@{
+ static const int _numCellFields; ///< Number of cell fields.
+ static const int _numCells; ///< Number of cells.
+ static const FieldStruct _cellFields[]; ///< Array of cell fields.
+
+ static const double _cellField0[]; ///< Values for cell field 0.
+ static const double _cellField1[]; ///< Values for cell field 1.
+ static const double _cellField2[]; ///< Values for cell field 2.
+ //@}
+
+}; // DataWriterVTKDataMeshTet4
+
+#endif // pylith_meshio_datawritervtkdatameshtet4_hh
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,108 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include "DataWriterVTKDataMeshTri3.hh"
+
+const char* pylith::meshio::DataWriterVTKDataMeshTri3::_meshFilename =
+ "data/tri3.mesh";
+
+const char* pylith::meshio::DataWriterVTKDataMeshTri3::_timestepFilename =
+ "tri3.vtk";
+
+const char* pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFilename =
+ "tri3_vertex.vtk";
+
+const char* pylith::meshio::DataWriterVTKDataMeshTri3::_cellFilename =
+ "tri3_cell.vtk";
+
+const double pylith::meshio::DataWriterVTKDataMeshTri3::_time = 1.0;
+
+const char* pylith::meshio::DataWriterVTKDataMeshTri3::_timeFormat =
+ "%3.1f";
+
+const int pylith::meshio::DataWriterVTKDataMeshTri3::_numVertexFields = 3;
+const int pylith::meshio::DataWriterVTKDataMeshTri3::_numVertices = 4;
+
+const pylith::meshio::DataWriterVTKData::FieldStruct
+pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFields[] = {
+ { "displacements", VECTOR_FIELD, 2, 0 },
+ { "pressure", SCALAR_FIELD, 1, 0 },
+ { "other", OTHER_FIELD, 2, 0 },
+};
+const double pylith::meshio::DataWriterVTKDataMeshTri3::_vertexField0[] = {
+ 1.1, 2.2,
+ 3.3, 4.4,
+ 5.5, 6.6,
+ 7.7, 8.8
+};
+const double pylith::meshio::DataWriterVTKDataMeshTri3::_vertexField1[] = {
+ 2.1, 3.2, 4.3, 5.4
+};
+const double pylith::meshio::DataWriterVTKDataMeshTri3::_vertexField2[] = {
+ 1.2, 2.3,
+ 3.4, 4.5,
+ 5.6, 6.7,
+ 7.8, 8.9
+};
+
+const int pylith::meshio::DataWriterVTKDataMeshTri3::_numCellFields = 3;
+const int pylith::meshio::DataWriterVTKDataMeshTri3::_numCells = 2;
+
+const pylith::meshio::DataWriterVTKData::FieldStruct
+pylith::meshio::DataWriterVTKDataMeshTri3::_cellFields[] = {
+ { "traction", VECTOR_FIELD, 2, 0 },
+ { "pressure", SCALAR_FIELD, 1, 0 },
+ { "other", TENSOR_FIELD, 3, 0 },
+};
+const double pylith::meshio::DataWriterVTKDataMeshTri3::_cellField0[] = {
+ 1.1, 2.2,
+ 3.3, 4.4
+};
+const double pylith::meshio::DataWriterVTKDataMeshTri3::_cellField1[] = {
+ 2.1, 2.2,
+};
+const double pylith::meshio::DataWriterVTKDataMeshTri3::_cellField2[] = {
+ 1.2, 2.3, 3.4,
+ 4.5, 5.6, 6.7,
+};
+
+pylith::meshio::DataWriterVTKDataMeshTri3::DataWriterVTKDataMeshTri3(void)
+{ // constructor
+ meshFilename = const_cast<char*>(_meshFilename);
+
+ timestepFilename = const_cast<char*>(_timestepFilename);
+ vertexFilename = const_cast<char*>(_vertexFilename);
+ cellFilename = const_cast<char*>(_cellFilename);
+
+ time = _time;
+ timeFormat = const_cast<char*>(_timeFormat);
+
+ numVertexFields = _numVertexFields;
+ numVertices = _numVertices;
+ vertexFields = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFields[0].values = const_cast<double*>(_vertexField0);
+ vertexFields[1].values = const_cast<double*>(_vertexField1);
+ vertexFields[2].values = const_cast<double*>(_vertexField2);
+
+ numCellFields = _numCellFields;
+ numVertices = _numVertices;
+ cellFields = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFields[0].values = const_cast<double*>(_cellField0);
+ cellFields[1].values = const_cast<double*>(_cellField1);
+ cellFields[2].values = const_cast<double*>(_cellField2);
+} // constructor
+
+pylith::meshio::DataWriterVTKDataMeshTri3::~DataWriterVTKDataMeshTri3(void)
+{}
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,75 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_meshio_datawritervtkdatameshtri3_hh)
+#define pylith_meshio_datawritervtkdatameshtri3_hh
+
+#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterVTKDataMesh.hh" // ISA DataWriterVTKDataMesh
+
+namespace pylith {
+ namespace meshio {
+ class DataWriterVTKDataMeshTri3;
+ } // meshio
+} // pylith
+
+class pylith::meshio::DataWriterVTKDataMeshTri3 :
+ public DataWriterVTKData,
+ public DataWriterVTKDataMesh
+{ // DataWriterVTKDataMeshTri3
+
+public:
+
+ /// Constructor
+ DataWriterVTKDataMeshTri3(void);
+
+ /// Destructor
+ ~DataWriterVTKDataMeshTri3(void);
+
+private:
+
+ static const char* _meshFilename; ///< Name of mesh file.
+
+ static const char* _timestepFilename; ///< Name of VTK file without fields.
+ static const char* _vertexFilename; ///< Name of VTK file for vertex fields.
+ static const char* _cellFilename; ///< Name of VTK file for cell fields.
+
+ static const double _time; ///< Time for fields.
+ static const char* _timeFormat; ///< Format for time stamp.
+
+ /// @name Vertex field information.
+ //@{
+ static const int _numVertexFields; ///< Number of vertex fields.
+ static const int _numVertices; ///< Number of vertices.
+ static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
+
+ static const double _vertexField0[]; ///< Values for vertex field 0.
+ static const double _vertexField1[]; ///< Values for vertex field 1.
+ static const double _vertexField2[]; ///< Values for vertex field 2.
+ //@}
+
+ /// @name Cell field information.
+ //@{
+ static const int _numCellFields; ///< Number of cell fields.
+ static const int _numCells; ///< Number of cells.
+ static const FieldStruct _cellFields[]; ///< Array of cell fields.
+
+ static const double _cellField0[]; ///< Values for cell field 0.
+ static const double _cellField1[]; ///< Values for cell field 1.
+ static const double _cellField2[]; ///< Values for cell field 2.
+ //@}
+
+}; // DataWriterVTKDataMeshTri3
+
+#endif // pylith_meshio_datawritervtkdatameshtri3_hh
+
+// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/Makefile.am 2008-02-17 17:46:55 UTC (rev 11178)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/Makefile.am 2008-02-18 03:53:42 UTC (rev 11179)
@@ -24,7 +24,23 @@
line2.mesh \
line2_t10.vtk \
line2_vertex_t10.vtk \
- line2_cell_t10.vtk
+ line2_cell_t10.vtk \
+ tri3.mesh \
+ tri3_t10.vtk \
+ tri3_vertex_t10.vtk \
+ tri3_cell_t10.vtk \
+ quad4.mesh \
+ quad4_t10.vtk \
+ quad4_vertex_t10.vtk \
+ quad4_cell_t10.vtk \
+ tet4.mesh \
+ tet4_t10.vtk \
+ tet4_vertex_t10.vtk \
+ tet4_cell_t10.vtk \
+ hex8.mesh \
+ hex8_t10.vtk \
+ hex8_vertex_t10.vtk \
+ hex8_cell_t10.vtk
noinst_TMP =
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8.mesh 2008-02-17 17:46:55 UTC (rev 11178)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8.mesh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -57,7 +57,7 @@
}
material-ids = {
0 0
- 1 0
+ 1 1
}
}
group = {
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_cell_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_cell_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_cell_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,35 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 12 double
+-1 -1 -1
+-1 1 -1
+0 -1 -1
+0 1 -1
+1 -1 -1
+1 1 -1
+-1 -1 1
+-1 1 1
+0 -1 1
+0 1 1
+1 -1 1
+1 1 1
+CELLS 2 18
+8 0 2 3 1 6 8 9 7
+8 2 4 5 3 8 10 11 9
+CELL_TYPES 2
+12
+12
+CELL_DATA 2
+VECTORS traction double
+1.1 2.2 3.3
+4.4 5.5 6.6
+SCALARS pressure double 1
+LOOKUP_TABLE default
+2.1
+3.2
+SCALARS other double 6
+LOOKUP_TABLE default
+1.2 2.3 3.4 4.5 5.6 6.7
+1.1 2.2 3.3 4.4 5.5 6.6
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,23 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 12 double
+-1 -1 -1
+-1 1 -1
+0 -1 -1
+0 1 -1
+1 -1 -1
+1 1 -1
+-1 -1 1
+-1 1 1
+0 -1 1
+0 1 1
+1 -1 1
+1 1 1
+CELLS 2 18
+8 0 2 3 1 6 8 9 7
+8 2 4 5 3 8 10 11 9
+CELL_TYPES 2
+12
+12
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_vertex_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/hex8_vertex_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,65 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 12 double
+-1 -1 -1
+-1 1 -1
+0 -1 -1
+0 1 -1
+1 -1 -1
+1 1 -1
+-1 -1 1
+-1 1 1
+0 -1 1
+0 1 1
+1 -1 1
+1 1 1
+CELLS 2 18
+8 0 2 3 1 6 8 9 7
+8 2 4 5 3 8 10 11 9
+CELL_TYPES 2
+12
+12
+POINT_DATA 12
+VECTORS displacements double
+1.1 2.2 3.3
+4.4 5.5 6.6
+7.7 8.8 9.9
+10.1 11.2 12.3
+1.2 2.3 3.4
+4.5 5.6 6.7
+7.8 8.9 9
+10.2 11.3 12.4
+1.3 2.4 3.5
+4.6 5.7 6.8
+7.9 8 9.1
+10.2 11.3 12.4
+SCALARS pressure double 1
+LOOKUP_TABLE default
+2.1
+3.2
+4.3
+5.4
+6.5
+7.6
+8.7
+9.8
+10
+12.1
+11.1
+13.1
+SCALARS other double 2
+LOOKUP_TABLE default
+1.2 2.3
+3.4 4.5
+5.6 6.7
+7.8 8.9
+1.3 2.4
+3.5 4.6
+5.7 6.8
+7.9 8
+1.3 2.4
+3.5 4.6
+5.7 6.8
+7.9 8
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/line2.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/line2.mesh 2008-02-17 17:46:55 UTC (rev 11178)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/line2.mesh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -28,7 +28,7 @@
}
material-ids = {
0 0
- 1 0
+ 1 1
}
}
group = {
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4.mesh 2008-02-17 17:46:55 UTC (rev 11178)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4.mesh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -38,7 +38,7 @@
}
material-ids = {
0 0
- 1 0
+ 1 2
}
}
group = {
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_cell_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_cell_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_cell_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,28 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 6 double
+-1 -1 0.0
+-1 1 0.0
+0 -1 0.0
+0 1 0.0
+1 -1 0.0
+1 1 0.0
+CELLS 2 10
+4 0 2 3 1
+4 2 4 5 3
+CELL_TYPES 2
+9
+9
+CELL_DATA 2
+VECTORS traction double
+1.1 2.2 0.0
+3.3 4.4 0.0
+SCALARS pressure double 1
+LOOKUP_TABLE default
+2.1
+2.2
+VECTORS other double
+1.2 2.3 3.4
+4.5 5.6 6.7
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,17 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 6 double
+-1 -1 0.0
+-1 1 0.0
+0 -1 0.0
+0 1 0.0
+1 -1 0.0
+1 1 0.0
+CELLS 2 10
+4 0 2 3 1
+4 2 4 5 3
+CELL_TYPES 2
+9
+9
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_vertex_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_vertex_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,41 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 6 double
+-1 -1 0.0
+-1 1 0.0
+0 -1 0.0
+0 1 0.0
+1 -1 0.0
+1 1 0.0
+CELLS 2 10
+4 0 2 3 1
+4 2 4 5 3
+CELL_TYPES 2
+9
+9
+POINT_DATA 6
+VECTORS displacements double
+1.1 2.2 0.0
+3.3 4.4 0.0
+5.5 6.6 0.0
+7.7 8.8 0.0
+9.9 10.1 0.0
+11.2 12.3 0.0
+SCALARS pressure double 1
+LOOKUP_TABLE default
+2.1
+3.2
+4.3
+5.4
+6.5
+7.6
+SCALARS other double 2
+LOOKUP_TABLE default
+1.2 2.3
+3.4 4.5
+5.6 6.7
+7.8 8.9
+9.8 7.6
+6.5 5.4
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_cell_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_cell_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_cell_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,22 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 4 double
+0 0 0
+1 0 0
+0 1 0
+0 0 1
+CELLS 1 5
+4 0 1 2 3
+CELL_TYPES 1
+10
+CELL_DATA 1
+VECTORS traction double
+1.1 2.2 3.3
+SCALARS pressure double 1
+LOOKUP_TABLE default
+2.1
+SCALARS other double 6
+LOOKUP_TABLE default
+1.2 2.3 3.4 4.5 5.6 6.7
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,13 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 4 double
+0 0 0
+1 0 0
+0 1 0
+0 0 1
+CELLS 1 5
+4 0 1 2 3
+CELL_TYPES 1
+10
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_vertex_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/tet4_vertex_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,31 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 4 double
+0 0 0
+1 0 0
+0 1 0
+0 0 1
+CELLS 1 5
+4 0 1 2 3
+CELL_TYPES 1
+10
+POINT_DATA 4
+VECTORS displacements double
+1.1 2.2 3.3
+4.4 5.5 6.6
+7.7 8.8 9.9
+10.1 11.2 12.3
+SCALARS pressure double 1
+LOOKUP_TABLE default
+2.1
+3.2
+4.3
+5.4
+SCALARS other double 2
+LOOKUP_TABLE default
+1.2 2.3
+3.4 4.5
+5.6 6.7
+7.8 8.9
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3.mesh 2008-02-17 17:46:55 UTC (rev 11178)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3.mesh 2008-02-18 03:53:42 UTC (rev 11179)
@@ -37,7 +37,7 @@
1 1 3 2
}
material-ids = {
- 0 0
+ 0 1
1 0
}
}
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_cell_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_cell_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_cell_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,26 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 4 double
+-1 0 0.0
+0 -1 0.0
+0 1 0.0
+1 0 0.0
+CELLS 2 8
+3 0 1 2
+3 1 3 2
+CELL_TYPES 2
+5
+5
+CELL_DATA 2
+VECTORS traction double
+1.1 2.2 0.0
+3.3 4.4 0.0
+SCALARS pressure double 1
+LOOKUP_TABLE default
+2.1
+2.2
+VECTORS other double
+1.2 2.3 3.4
+4.5 5.6 6.7
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,15 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 4 double
+-1 0 0.0
+0 -1 0.0
+0 1 0.0
+1 0 0.0
+CELLS 2 8
+3 0 1 2
+3 1 3 2
+CELL_TYPES 2
+5
+5
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_vertex_t10.vtk (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/tri3_vertex_t10.vtk 2008-02-18 03:53:42 UTC (rev 11179)
@@ -0,0 +1,33 @@
+# vtk DataFile Version 2.0
+Simplicial Mesh Example
+ASCII
+DATASET UNSTRUCTURED_GRID
+POINTS 4 double
+-1 0 0.0
+0 -1 0.0
+0 1 0.0
+1 0 0.0
+CELLS 2 8
+3 0 1 2
+3 1 3 2
+CELL_TYPES 2
+5
+5
+POINT_DATA 4
+VECTORS displacements double
+1.1 2.2 0.0
+3.3 4.4 0.0
+5.5 6.6 0.0
+7.7 8.8 0.0
+SCALARS pressure double 1
+LOOKUP_TABLE default
+2.1
+3.2
+4.3
+5.4
+SCALARS other double 2
+LOOKUP_TABLE default
+1.2 2.3
+3.4 4.5
+5.6 6.7
+7.8 8.9
More information about the cig-commits
mailing list