[cig-commits] r17199 - in short/3D/PyLith/trunk/unittests/libtests/meshio: . data
brad at geodynamics.org
brad at geodynamics.org
Thu Sep 16 15:58:46 PDT 2010
Author: brad
Date: 2010-09-16 15:58:45 -0700 (Thu, 16 Sep 2010)
New Revision: 17199
Added:
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterBCMesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterBCMesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterFaultMesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterFaultMesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5Mesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5Mesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterMesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterMesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterSubMesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterSubMesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterData.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterData.hh
Removed:
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.hh
Modified:
short/3D/PyLith/trunk/unittests/libtests/meshio/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKBCMesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKBCMesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKFaultMesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKFaultMesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKSubMesh.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKSubMesh.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.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/DataWriterVTKDataMeshLine2.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.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/DataWriterVTKDataSubMeshHex8.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.hh
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.cc
short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.hh
Log:
Refactored DataWriter unit tests setup with objects that setup data independent of how data is written. Started work on HDF5 tests.
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/Makefile.am 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/Makefile.am 2010-09-16 22:58:45 UTC (rev 17199)
@@ -32,6 +32,10 @@
TestMeshIOLagrit.cc \
TestCellFilterAvg.cc \
TestVertexFilterVecNorm.cc \
+ TestDataWriterMesh.cc \
+ TestDataWriterSubMesh.cc \
+ TestDataWriterBCMesh.cc \
+ TestDataWriterFaultMesh.cc \
TestDataWriterVTK.cc \
TestDataWriterVTKMesh.cc \
TestDataWriterVTKMeshLine2.cc \
@@ -55,6 +59,7 @@
TestDataWriterVTKSubMeshQuad4.cc \
TestDataWriterVTKSubMeshTet4.cc \
TestDataWriterVTKSubMeshHex8.cc \
+ TestDataWriterHDF5.cc \
TestOutputManager.cc \
TestOutputSolnSubset.cc \
TestDataWriterVTKFaultMesh.cc \
@@ -67,7 +72,11 @@
noinst_HEADERS = \
TestCellFilterAvg.hh \
+ TestDataWriterMesh.hh \
TestDataWriterVTK.hh \
+ TestDataWriterSubMesh.hh \
+ TestDataWriterBCMesh.hh \
+ TestDataWriterFaultMesh.hh \
TestDataWriterVTKMesh.hh \
TestDataWriterVTKMeshLine2.hh \
TestDataWriterVTKMeshTri3.hh \
@@ -95,6 +104,7 @@
TestDataWriterVTKBCMeshQuad4.hh \
TestDataWriterVTKBCMeshTet4.hh \
TestDataWriterVTKBCMeshHex8.hh \
+ TestDataWriterHDF5.hh \
TestMeshIO.hh \
TestMeshIOAscii.hh \
TestMeshIOLagrit.hh \
@@ -105,7 +115,7 @@
# Source files associated with testing data
testmeshio_SOURCES += \
- data/DataWriterVTKData.cc \
+ data/DataWriterData.cc \
data/DataWriterVTKDataMeshLine2.cc \
data/DataWriterVTKDataMeshTri3.cc \
data/DataWriterVTKDataMeshQuad4.cc \
@@ -145,7 +155,7 @@
noinst_HEADERS += \
- data/DataWriterVTKData.hh \
+ data/DataWriterData.hh \
data/DataWriterVTKDataMeshLine2.hh \
data/DataWriterVTKDataMeshTri3.hh \
data/DataWriterVTKDataMeshQuad4.hh \
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterBCMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterBCMesh.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterBCMesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,193 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterBCMesh.hh" // Implementation of class methods
+
+#include "data/DataWriterData.hh" // USES DataWriterData
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/Fields.hh" // USES Fields
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/meshio/DataWriter.hh" // USES DataWriter
+#include "pylith/faults/FaultCohesiveKin.hh" // USES FaultCohesiveKin
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Field<pylith::topology::SubMesh> SubMeshField;
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterBCMesh::setUp(void)
+{ // setUp
+ _data = 0;
+ _mesh = 0;
+ _submesh = 0;
+ _flipFault = false;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::meshio::TestDataWriterBCMesh::tearDown(void)
+{ // tearDown
+ delete _data; _data = 0;
+ delete _mesh; _mesh = 0;
+ delete _submesh; _submesh = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Initialize mesh.
+void
+pylith::meshio::TestDataWriterBCMesh::_initialize(void)
+{ // _initialize
+ CPPUNIT_ASSERT(0 != _data);
+
+ delete _mesh; _mesh = new topology::Mesh;
+ MeshIOAscii iohandler;
+ iohandler.filename(_data->meshFilename);
+ iohandler.read(_mesh);
+
+ if (0 != _data->faultLabel) {
+ faults::FaultCohesiveKin fault;
+ int firstFaultVertex = 0;
+ int firstLagrangeVertex = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ int firstFaultCell = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ if (fault.useLagrangeConstraints()) {
+ firstFaultCell += _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ }
+ fault.label(_data->faultLabel);
+ fault.id(_data->faultId);
+ fault.adjustTopology(_mesh, &firstFaultVertex, &firstLagrangeVertex, &firstFaultCell, _flipFault);
+ } // if
+
+ delete _submesh; _submesh = new topology::SubMesh(*_mesh, _data->bcLabel);
+ const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = _mesh->sieveMesh();
+ assert(!sieveMesh.isNull());
+ const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
+ _submesh->sieveMesh();
+ assert(!sieveSubMesh.isNull());
+ sieveSubMesh->setRealSection("coordinates",
+ sieveMesh->getRealSection("coordinates"));
+ //_mesh->view("BC mesh");
+} // _initialize
+
+// ----------------------------------------------------------------------
+// Create vertex fields.
+void
+pylith::meshio::TestDataWriterBCMesh::_createVertexFields(
+ topology::Fields<SubMeshField>* fields) const
+{ // _createVertexFields
+ CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ try {
+ const int nfields = _data->numVertexFields;
+
+ const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
+ _submesh->sieveMesh();
+ CPPUNIT_ASSERT(!sieveSubMesh.isNull());
+ const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& vertices =
+ sieveSubMesh->depthStratum(0);
+ CPPUNIT_ASSERT(!vertices.isNull());
+ const topology::SubMesh::SieveMesh::label_sequence::iterator verticesEnd =
+ vertices->end();
+
+ // Set vertex fields
+ for (int i=0; i < nfields; ++i) {
+ const char* name = _data->vertexFieldsInfo[i].name;
+ const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
+ fields->add(name, name);
+ SubMeshField& field = fields->get(name);
+ field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
+ field.allocate();
+ field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
+
+ const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
+ CPPUNIT_ASSERT(!section.isNull());
+ int ipt = 0;
+ for (topology::SubMesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
+ v_iter != verticesEnd;
+ ++v_iter, ++ipt) {
+ const double* values = &_data->vertexFields[i][ipt*fiberDim];
+ section->updatePoint(*v_iter, values);
+ } // for
+ CPPUNIT_ASSERT_EQUAL(_data->numVertices, ipt);
+ } // for
+ } catch (const ALE::Exception& err) {
+ throw std::runtime_error(err.msg());
+ } // catch
+} // _createVertexFields
+
+// ----------------------------------------------------------------------
+// Create cell fields.
+void
+pylith::meshio::TestDataWriterBCMesh::_createCellFields(
+ topology::Fields<SubMeshField>* fields) const
+{ // _createCellFields
+ CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ try {
+ const int nfields = _data->numCellFields;
+
+ const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
+ _submesh->sieveMesh();
+ CPPUNIT_ASSERT(!sieveSubMesh.isNull());
+ const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& cells =
+ sieveSubMesh->heightStratum(1);
+ assert(!cells.isNull());
+ const topology::SubMesh::SieveMesh::label_sequence::iterator cellsBegin =
+ cells->begin();
+ const topology::SubMesh::SieveMesh::label_sequence::iterator cellsEnd =
+ cells->end();
+
+ // Set cell fields
+ for (int i=0; i < nfields; ++i) {
+ const char* name = _data->cellFieldsInfo[i].name;
+ const int fiberDim = _data->cellFieldsInfo[i].fiber_dim;
+ fields->add(name, name);
+ SubMeshField& field = fields->get(name);
+ field.newSection(topology::FieldBase::CELLS_FIELD, fiberDim, 1);
+ field.allocate();
+ field.vectorFieldType(_data->cellFieldsInfo[i].field_type);
+
+ const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
+ CPPUNIT_ASSERT(!section.isNull());
+ int icell = 0;
+ for (topology::SubMesh::SieveMesh::label_sequence::iterator c_iter=cellsBegin;
+ c_iter != cellsEnd;
+ ++c_iter, ++icell) {
+ const double* values = &_data->cellFields[i][icell*fiberDim];
+ section->updatePoint(*c_iter, values);
+ } // for
+ CPPUNIT_ASSERT_EQUAL(_data->numCells, icell);
+ } // for
+ } catch (const ALE::Exception& err) {
+ throw std::runtime_error(err.msg());
+ } // catch
+} // _createCellFields
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterBCMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterBCMesh.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterBCMesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterBCMesh.hh
+ *
+ * @brief C++ TestDataWriterBCMesh object
+ *
+ * C++ unit testing for DataWriter<BCMesh>.
+ */
+
+#if !defined(pylith_meshio_testdatawriterbcmesh_hh)
+#define pylith_meshio_testdatawriterbcmesh_hh
+
+#include "pylith/topology/topologyfwd.hh" // USES Mesh, SubMesh, Field
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterBCMesh;
+
+ class DataWriterData;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriter<BCMesh>
+class pylith::meshio::TestDataWriterBCMesh
+{ // class TestDataWriterBCMesh
+
+ // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+ /// Initialize mesh.
+ void _initialize(void);
+
+ /** Create vertex fields.
+ *
+ * @param fields Vertex fields.
+ */
+ void
+ _createVertexFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
+
+ /** Create cell fields.
+ *
+ * @param fields Cell fields.
+ */
+ void
+ _createCellFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ DataWriterData* _data; ///< Data for testing
+ topology::Mesh* _mesh; ///< Mesh for domain
+ topology::SubMesh* _submesh; ///< Mesh for subdomain.
+ bool _flipFault; ///< If true, flip fault orientation.
+
+}; // class TestDataWriterBCMesh
+
+#endif // pylith_meshio_testdatawriterbcmesh_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterFaultMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterFaultMesh.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterFaultMesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,188 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterFaultMesh.hh" // Implementation of class methods
+
+#include "data/DataWriterData.hh" // USES DataWriterData
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/Fields.hh" // USES Fields
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/meshio/DataWriter.hh" // USES DataWriter
+#include "pylith/faults/FaultCohesiveKin.hh" // USES FaultCohesiveKin
+#include "pylith/faults/CohesiveTopology.hh" // USES CohesiveTopology
+
+#include <map> // USES std::map
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Field<pylith::topology::SubMesh> MeshField;
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterFaultMesh::setUp(void)
+{ // setUp
+ _data = 0;
+ _mesh = new topology::Mesh();
+ _faultMesh = new topology::SubMesh();
+ _flipFault = false;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::meshio::TestDataWriterFaultMesh::tearDown(void)
+{ // tearDown
+ delete _data; _data = 0;
+ delete _mesh; _mesh = 0;
+ delete _faultMesh; _faultMesh = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Initialize mesh.
+void
+pylith::meshio::TestDataWriterFaultMesh::_initialize(void)
+{ // _initialize
+ CPPUNIT_ASSERT(0 != _data);
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _faultMesh);
+
+ MeshIOAscii iohandler;
+ iohandler.filename(_data->meshFilename);
+ iohandler.read(_mesh);
+
+ faults::FaultCohesiveKin fault;
+ int firstFaultVertex = 0;
+ int firstLagrangeVertex = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ int firstFaultCell = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ const bool constraintCell = true;
+ if (constraintCell) {
+ firstFaultCell += _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ }
+ fault.label(_data->faultLabel);
+ fault.id(_data->faultId);
+ fault.adjustTopology(_mesh, &firstFaultVertex, &firstLagrangeVertex, &firstFaultCell, _flipFault);
+ faults::CohesiveTopology::createFaultParallel(_faultMesh, *_mesh, _data->faultId,
+ constraintCell);
+} // _initialize
+
+// ----------------------------------------------------------------------
+// Create vertex fields.
+void
+pylith::meshio::TestDataWriterFaultMesh::_createVertexFields(
+ topology::Fields<MeshField>* fields) const
+{ // _createVertexFields
+ CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(0 != _faultMesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ try {
+ const int nfields = _data->numVertexFields;
+
+ const ALE::Obj<topology::SubMesh::SieveMesh>& sieveFaultMesh =
+ _faultMesh->sieveMesh();
+ CPPUNIT_ASSERT(!sieveFaultMesh.isNull());
+ const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& vertices =
+ sieveFaultMesh->depthStratum(0);
+ CPPUNIT_ASSERT(!vertices.isNull());
+ const topology::SubMesh::SieveMesh::label_sequence::iterator verticesEnd =
+ vertices->end();
+
+ // Set vertex fields
+ for (int i=0; i < nfields; ++i) {
+ const char* name = _data->vertexFieldsInfo[i].name;
+ const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
+ fields->add(name, name);
+ MeshField& field = fields->get(name);
+ field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
+ field.allocate();
+ field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
+
+ const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
+ CPPUNIT_ASSERT(!section.isNull());
+ int ipt = 0;
+ for (topology::SubMesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
+ v_iter != verticesEnd;
+ ++v_iter, ++ipt) {
+ const double* values = &_data->vertexFields[i][ipt*fiberDim];
+ section->updatePoint(*v_iter, values);
+ } // for
+ CPPUNIT_ASSERT_EQUAL(_data->numVertices, ipt);
+ } // for
+ } catch (const ALE::Exception& err) {
+ throw std::runtime_error(err.msg());
+ } // catch
+} // _createVertexFields
+
+// ----------------------------------------------------------------------
+// Create cell fields.
+void
+pylith::meshio::TestDataWriterFaultMesh::_createCellFields(
+ topology::Fields<MeshField>* fields) const
+{ // _createCellFields
+ CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ try {
+ const int nfields = _data->numCellFields;
+
+ const ALE::Obj<topology::SubMesh::SieveMesh>& sieveFaultMesh =
+ _faultMesh->sieveMesh();
+ CPPUNIT_ASSERT(!sieveFaultMesh.isNull());
+ const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& cells =
+ sieveFaultMesh->heightStratum(0);
+ assert(!cells.isNull());
+ const topology::SubMesh::SieveMesh::label_sequence::iterator cellsBegin =
+ cells->begin();
+ const topology::SubMesh::SieveMesh::label_sequence::iterator cellsEnd =
+ cells->end();
+
+ // Set cell fields
+ for (int i=0; i < nfields; ++i) {
+ const char* name = _data->cellFieldsInfo[i].name;
+ const int fiberDim = _data->cellFieldsInfo[i].fiber_dim;
+ fields->add(name, name);
+ MeshField& field = fields->get(name);
+ field.newSection(topology::FieldBase::CELLS_FIELD, fiberDim);
+ field.allocate();
+ field.vectorFieldType(_data->cellFieldsInfo[i].field_type);
+
+ const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
+ CPPUNIT_ASSERT(!section.isNull());
+ int icell = 0;
+ for (topology::SubMesh::SieveMesh::label_sequence::iterator c_iter=cellsBegin;
+ c_iter != cellsEnd;
+ ++c_iter, ++icell) {
+ const double* values = &_data->cellFields[i][icell*fiberDim];
+ section->updatePoint(*c_iter, values);
+ } // for
+ CPPUNIT_ASSERT_EQUAL(_data->numCells, icell);
+ } // for
+ } catch (const ALE::Exception& err) {
+ throw std::runtime_error(err.msg());
+ } // catch
+} // _createCellFields
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterFaultMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterFaultMesh.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterFaultMesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterFaultMesh.hh
+ *
+ * @brief C++ TestDataWriterFaultMesh object
+ *
+ * C++ unit testing for DataWriter<FaultMesh>.
+ */
+
+#if !defined(pylith_meshio_testdatawriterfaultmesh_hh)
+#define pylith_meshio_testdatawriterfaultmesh_hh
+
+#include "pylith/topology/topologyfwd.hh" // USES Mesh, SubMesh, Field
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterFaultMesh;
+
+ class DataWriterData;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriter<FaultMesh>.
+class pylith::meshio::TestDataWriterFaultMesh
+{ // class TestDataWriterFaultMesh
+
+ // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+ /// Initialize mesh.
+ void _initialize(void);
+
+ /** Create vertex fields.
+ *
+ * @param fields Vertex fields.
+ */
+ void
+ _createVertexFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
+
+ /** Create cell fields.
+ *
+ * @param fields Cell fields.
+ */
+ void
+ _createCellFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ DataWriterData* _data; ///< Data for testing
+ topology::Mesh* _mesh; ///< Mesh for domain
+ topology::SubMesh* _faultMesh; ///< Fault mesh.
+ bool _flipFault; ///< If true, flip fault orientation.
+
+}; // class TestDataWriterFaultMesh
+
+#endif // pylith_meshio_testdatawriterfaultmesh_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,38 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterHDF5.hh" // Implementation of class methods
+
+#include <string.h> // USES strcmp()
+#include <iostream> // USES std::cerr
+#include <fstream> // USES std::ifstream
+
+// ----------------------------------------------------------------------
+// Check HDF5 file against archived file.
+void
+pylith::meshio::TestDataWriterHDF5::checkFile(const char* filename)
+{ // checkFile
+
+ const std::string filenameE = "data/" + std::string(filename);
+
+} // checkFile
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterHDF5.hh
+ *
+ * @brief C++ TestDataWriterHDF5 object
+ *
+ * C++ unit testing for DataWriterHDF5.
+ */
+
+#if !defined(pylith_meshio_testdatawriterhdf5_hh)
+#define pylith_meshio_testdatawriterhdf5_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterHDF5;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriterHDF5
+class pylith::meshio::TestDataWriterHDF5
+{ // class TestDataWriterHDF5
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /** Check HDF5 file against archived file.
+ *
+ * @param filename Name of file to check.
+ */
+ static
+ void checkFile(const char* filename);
+
+}; // class TestDataWriterHDF5
+
+#endif // pylith_meshio_testdatawriterhdf5_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5Mesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5Mesh.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5Mesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,238 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterHDF5Mesh.hh" // Implementation of class methods
+
+#include "data/DataWriterData.hh" // USES DataWriterData
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/Fields.hh" // USES Fields
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/meshio/DataWriterHDF5.hh" // USES DataWriterHDF5
+#include "pylith/faults/FaultCohesiveKin.hh" // USES FaultCohesiveKin
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::meshio::TestDataWriterHDF5Mesh );
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Field<pylith::topology::Mesh> MeshField;
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterHDF5Mesh::setUp(void)
+{ // setUp
+ TestDataWriterMesh::setUp();
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::meshio::TestDataWriterHDF5Mesh::tearDown(void)
+{ // tearDown
+ TestDataWriterMesh::tearDown();
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Test constructor
+void
+pylith::meshio::TestDataWriterHDF5Mesh::testConstructor(void)
+{ // testConstructor
+ DataWriterHDF5<topology::Mesh, MeshField> writer;
+
+ CPPUNIT_ASSERT(0 == writer._viewer);
+ CPPUNIT_ASSERT(false == writer._wroteVertexHeader);
+ CPPUNIT_ASSERT(false == writer._wroteCellHeader);
+} // testConstructor
+
+// ----------------------------------------------------------------------
+// Test filename()
+void
+pylith::meshio::TestDataWriterHDF5Mesh::testFilename(void)
+{ // testDebug
+ DataWriterHDF5<topology::Mesh, MeshField> writer;
+
+ const char* filename = "data.h5";
+ writer.filename(filename);
+ CPPUNIT_ASSERT_EQUAL(std::string(filename), writer._filename);
+} // testFilename
+
+// ----------------------------------------------------------------------
+// Test openTimeStep() and closeTimeStep()
+void
+pylith::meshio::TestDataWriterHDF5Mesh::testTimeStep(void)
+{ // testTimeStep
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ DataWriterHDF5<topology::Mesh, MeshField> writer;
+
+ writer.filename(_data->timestepFilename);
+ writer.timeFormat(_data->timeFormat);
+
+ CPPUNIT_ASSERT(false == writer._wroteVertexHeader);
+ CPPUNIT_ASSERT(false == writer._wroteCellHeader);
+
+ const double t = _data->time;
+ const int numTimeSteps = 1;
+ if (0 == _data->cellsLabel) {
+ writer.open(*_mesh, numTimeSteps);
+ writer.openTimeStep(t, *_mesh);
+ } else {
+ const char* label = _data->cellsLabel;
+ const int id = _data->labelId;
+ writer.open(*_mesh, numTimeSteps, label, id);
+ writer.openTimeStep(t, *_mesh, label, id);
+ } // else
+
+ CPPUNIT_ASSERT(false == writer._wroteVertexHeader);
+ CPPUNIT_ASSERT(false == writer._wroteCellHeader);
+
+ writer.closeTimeStep();
+ writer.close();
+
+ CPPUNIT_ASSERT(false == writer._wroteVertexHeader);
+ CPPUNIT_ASSERT(false == writer._wroteCellHeader);
+
+ checkFile(_data->timestepFilename, t, _data->timeFormat);
+} // testTimeStep
+
+// ----------------------------------------------------------------------
+// Test writeVertexField.
+void
+pylith::meshio::TestDataWriterHDF5Mesh::testWriteVertexField(void)
+{ // testWriteVertexField
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ DataWriterHDF5<topology::Mesh, MeshField> writer;
+
+ topology::Fields<MeshField> vertexFields(*_mesh);
+ _createVertexFields(&vertexFields);
+
+ writer.filename(_data->vertexFilename);
+ writer.timeFormat(_data->timeFormat);
+
+ const int nfields = _data->numVertexFields;
+
+ const double t = _data->time;
+ const int numTimeSteps = 1;
+ if (0 == _data->cellsLabel) {
+ writer.open(*_mesh, numTimeSteps);
+ writer.openTimeStep(t, *_mesh);
+ } else {
+ const char* label = _data->cellsLabel;
+ const int id = _data->labelId;
+ writer.open(*_mesh, numTimeSteps, label, id);
+ writer.openTimeStep(t, *_mesh, label, id);
+ } // else
+ for (int i=0; i < nfields; ++i) {
+ MeshField& field = vertexFields.get(_data->vertexFieldsInfo[i].name);
+ writer.writeVertexField(t, field, *_mesh);
+ CPPUNIT_ASSERT(writer._wroteVertexHeader);
+ CPPUNIT_ASSERT(false == writer._wroteCellHeader);
+ } // for
+ writer.closeTimeStep();
+ writer.close();
+ CPPUNIT_ASSERT(false == writer._wroteVertexHeader);
+ CPPUNIT_ASSERT(false == writer._wroteCellHeader);
+
+ checkFile(_data->vertexFilename, t, _data->timeFormat);
+} // testWriteVertexField
+
+// ----------------------------------------------------------------------
+// Test writeCellField.
+void
+pylith::meshio::TestDataWriterHDF5Mesh::testWriteCellField(void)
+{ // testWriteCellField
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ DataWriterHDF5<topology::Mesh, MeshField> writer;
+
+ topology::Fields<MeshField> cellFields(*_mesh);
+ _createCellFields(&cellFields);
+
+ writer.filename(_data->cellFilename);
+ writer.timeFormat(_data->timeFormat);
+
+ const int nfields = _data->numCellFields;
+
+ const double t = _data->time;
+ const int numTimeSteps = 1;
+ if (0 == _data->cellsLabel) {
+ writer.open(*_mesh, numTimeSteps);
+ writer.openTimeStep(t, *_mesh);
+ for (int i=0; i < nfields; ++i) {
+ MeshField& field = cellFields.get(_data->cellFieldsInfo[i].name);
+ writer.writeCellField(t, field);
+ CPPUNIT_ASSERT(false == writer._wroteVertexHeader);
+ CPPUNIT_ASSERT(writer._wroteCellHeader);
+ } // for
+ } else {
+ const char* label = _data->cellsLabel;
+ const int id = _data->labelId;
+ writer.open(*_mesh, numTimeSteps, label, id);
+ writer.openTimeStep(t, *_mesh, label, id);
+ for (int i=0; i < nfields; ++i) {
+ MeshField& field = cellFields.get(_data->cellFieldsInfo[i].name);
+ writer.writeCellField(t, field, label, id);
+ CPPUNIT_ASSERT(false == writer._wroteVertexHeader);
+ CPPUNIT_ASSERT(writer._wroteCellHeader);
+ } // for
+ } // else
+ writer.closeTimeStep();
+ writer.close();
+ CPPUNIT_ASSERT(false == writer._wroteCellHeader);
+ CPPUNIT_ASSERT(false == writer._wroteCellHeader);
+
+ checkFile(_data->cellFilename, t, _data->timeFormat);
+} // testWriteCellField
+
+// ----------------------------------------------------------------------
+// Test _hdf5Filename.
+void pylith::meshio::TestDataWriterHDF5Mesh::testHdf5Filename(void)
+{ // testHdf5Filename
+ DataWriterHDF5<topology::Mesh, MeshField> writer;
+
+ // Append info to filename if number of time steps is 0.
+ writer._numTimeSteps = 0;
+ writer._filename = "output.h5";
+ CPPUNIT_ASSERT_EQUAL(std::string("output_info.h5"), writer._hdf5Filename(0.0));
+
+ // Use default normalization of 1.0, remove period from time stamp.
+ writer._numTimeSteps = 100;
+ writer._filename = "output.h5";
+ writer.timeFormat("%05.2f");
+ CPPUNIT_ASSERT_EQUAL(std::string("output_t0230.h5"),
+ writer._hdf5Filename(2.3));
+
+ // Use normalization of 20.0, remove period from time stamp.
+ writer._numTimeSteps = 100;
+ writer._filename = "output.h5";
+ writer.timeFormat("%05.2f");
+ writer.timeConstant(20.0);
+ CPPUNIT_ASSERT_EQUAL(std::string("output_t0250.h5"),
+ writer._hdf5Filename(50.0));
+} // testHdf5Filename
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5Mesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5Mesh.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterHDF5Mesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,90 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterHDF5Mesh.hh
+ *
+ * @brief C++ TestDataWriterHDF5Mesh object
+ *
+ * C++ unit testing for DataWriterHDF5Mesh.
+ */
+
+#if !defined(pylith_meshio_testdatawriterhdf5mesh_hh)
+#define pylith_meshio_testdatawriterhdf5mesh_hh
+
+#include "TestDataWriterHDF5.hh" // ISA TestDataWriterHDF5
+
+#include "pylith/topology/topologyfwd.hh" // USES Mesh, Field
+
+#include <cppunit/extensions/HelperMacros.h>
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterHDF5Mesh;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriterHDF5
+class pylith::meshio::TestDataWriterHDF5Mesh : public TestDataWriterHDF5,
+ public TestDataWriterMesh,
+ public CppUnit::TestFixture
+{ // class TestDataWriterHDF5Mesh
+
+ // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+ CPPUNIT_TEST_SUITE( TestDataWriterHDF5Mesh );
+
+ CPPUNIT_TEST( testConstructor );
+ CPPUNIT_TEST( testFilename );
+ CPPUNIT_TEST( testHdf5Filename );
+
+ CPPUNIT_TEST_SUITE_END();
+
+ // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+ /// Test constructor
+ void testConstructor(void);
+
+ /// Test filename()
+ void testFilename(void);
+
+ /// Test openTimeStep() and closeTimeStep()
+ void testTimeStep(void);
+
+ /// Test writeVertexField.
+ void testWriteVertexField(void);
+
+ /// Test writeCellField.
+ void testWriteCellField(void);
+
+ /// Test hdf5Filename.
+ void testHdf5Filename(void);
+
+}; // class TestDataWriterHDF5Mesh
+
+#endif // pylith_meshio_testdatawriterhdf5mesh_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterMesh.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterMesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,182 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterMesh.hh" // Implementation of class methods
+
+#include "data/DataWriterData.hh" // USES DataWriterData
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/Fields.hh" // USES Fields
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/meshio/DataWriter.hh" // USES DataWriter
+#include "pylith/faults/FaultCohesiveKin.hh" // USES FaultCohesiveKin
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Field<pylith::topology::Mesh> MeshField;
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterMesh::setUp(void)
+{ // setUp
+ _data = 0;
+ _mesh = 0;
+ _flipFault = false;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::meshio::TestDataWriterMesh::tearDown(void)
+{ // tearDown
+ delete _data; _data = 0;
+ delete _mesh; _mesh = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Initialize mesh.
+void
+pylith::meshio::TestDataWriterMesh::_initialize(void)
+{ // _initialize
+ CPPUNIT_ASSERT(0 != _data);
+
+ delete _mesh; _mesh = new topology::Mesh;
+ MeshIOAscii iohandler;
+ iohandler.filename(_data->meshFilename);
+ iohandler.read(_mesh);
+
+ if (0 != _data->faultLabel) {
+ faults::FaultCohesiveKin fault;
+ int firstFaultVertex = 0;
+ int firstLagrangeVertex = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ int firstFaultCell = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ if (fault.useLagrangeConstraints()) {
+ firstFaultCell += _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ }
+ fault.label(_data->faultLabel);
+ fault.id(_data->faultId);
+ fault.adjustTopology(_mesh, &firstFaultVertex, &firstLagrangeVertex, &firstFaultCell, _flipFault);
+ } // if
+} // _initialize
+
+// ----------------------------------------------------------------------
+// Create vertex fields.
+void
+pylith::meshio::TestDataWriterMesh::_createVertexFields(
+ topology::Fields<MeshField>* fields) const
+{ // _createVertexFields
+ CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ try {
+ const int nfields = _data->numVertexFields;
+
+ const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = _mesh->sieveMesh();
+ CPPUNIT_ASSERT(!sieveMesh.isNull());
+ const ALE::Obj<topology::Mesh::SieveMesh::label_sequence>& vertices =
+ sieveMesh->depthStratum(0);
+ CPPUNIT_ASSERT(!vertices.isNull());
+ const topology::Mesh::SieveMesh::label_sequence::iterator verticesEnd =
+ vertices->end();
+
+ // Set vertex fields
+ for (int i=0; i < nfields; ++i) {
+ const char* name = _data->vertexFieldsInfo[i].name;
+ const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
+ fields->add(name, name);
+ MeshField& field = fields->get(name);
+ field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
+ field.allocate();
+ field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
+
+ const ALE::Obj<topology::Mesh::RealSection>& section = field.section();
+ CPPUNIT_ASSERT(!section.isNull());
+ int ipt = 0;
+ for (topology::Mesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
+ v_iter != verticesEnd;
+ ++v_iter, ++ipt) {
+ const double* values = &_data->vertexFields[i][ipt*fiberDim];
+ section->updatePoint(*v_iter, values);
+ } // for
+ CPPUNIT_ASSERT_EQUAL(_data->numVertices, ipt);
+ } // for
+ } catch (const ALE::Exception& err) {
+ throw std::runtime_error(err.msg());
+ } catch (...) {
+ throw;
+ } // catch
+} // _createVertexFields
+
+// ----------------------------------------------------------------------
+// Create cell fields.
+void
+pylith::meshio::TestDataWriterMesh::_createCellFields(
+ topology::Fields<MeshField>* fields) const
+{ // _createCellFields
+ CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ try {
+ const int nfields = _data->numCellFields;
+
+ const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = _mesh->sieveMesh();
+ CPPUNIT_ASSERT(!sieveMesh.isNull());
+ const ALE::Obj<topology::Mesh::SieveMesh::label_sequence>& cells =
+ (0 == _data->cellsLabel) ?
+ sieveMesh->depthStratum(1) :
+ sieveMesh->getLabelStratum(_data->cellsLabel, _data->labelId);
+ const topology::Mesh::SieveMesh::label_sequence::iterator cellsEnd =
+ cells->end();
+
+ // Set cell fields
+ for (int i=0; i < nfields; ++i) {
+ const char* name = _data->cellFieldsInfo[i].name;
+ const int fiberDim = _data->cellFieldsInfo[i].fiber_dim;
+ fields->add(name, name);
+ MeshField& field = fields->get(name);
+ field.newSection(topology::FieldBase::CELLS_FIELD, fiberDim);
+ field.allocate();
+ field.vectorFieldType(_data->cellFieldsInfo[i].field_type);
+
+ const ALE::Obj<topology::Mesh::RealSection>& section = field.section();
+ CPPUNIT_ASSERT(!section.isNull());
+ int icell = 0;
+ for (topology::Mesh::SieveMesh::label_sequence::iterator c_iter=cells->begin();
+ c_iter != cellsEnd;
+ ++c_iter, ++icell) {
+ const double* values = &_data->cellFields[i][icell*fiberDim];
+ section->updatePoint(*c_iter, values);
+ } // for
+ CPPUNIT_ASSERT_EQUAL(_data->numCells, icell);
+ } // for
+ } catch (const ALE::Exception& err) {
+ throw std::runtime_error(err.msg());
+ } catch (...) {
+ throw;
+ } // catch
+} // _createCellFields
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterMesh.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterMesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterMesh.hh
+ *
+ * @brief C++ TestDataWriterMesh object
+ *
+ * C++ unit testing for DataWriter<Mesh>.
+ */
+
+#if !defined(pylith_meshio_testdatawritermesh_hh)
+#define pylith_meshio_testdatawritermesh_hh
+
+#include "pylith/topology/topologyfwd.hh" // USES Mesh, Field
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterMesh;
+
+ class DataWriterData;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriter<Mesh>.
+class pylith::meshio::TestDataWriterMesh
+{ // class TestDataWriterMesh
+
+ // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+ /// Initialize mesh.
+ void _initialize(void);
+
+ /** Create vertex fields.
+ *
+ * @param fields Vertex fields.
+ */
+ void
+ _createVertexFields(topology::Fields<topology::Field<topology::Mesh> >* fields) const;
+
+ /** Create cell fields.
+ *
+ * @param fields Cell fields.
+ */
+ void
+ _createCellFields(topology::Fields<topology::Field<topology::Mesh> >* fields) const;
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ DataWriterData* _data; ///< Data for testing
+ topology::Mesh* _mesh; ///< Mesh for data
+ bool _flipFault; ///< If true, flip fault orientation.
+
+}; // class TestDataWriterMesh
+
+#endif // pylith_meshio_testdatawritermesh_hh
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterSubMesh.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterSubMesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,199 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestDataWriterSubMesh.hh" // Implementation of class methods
+
+#include "data/DataWriterData.hh" // USES DataWriterData
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/Fields.hh" // USES Fields
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/meshio/DataWriter.hh" // USES DataWriter
+#include "pylith/faults/FaultCohesiveKin.hh" // USES FaultCohesiveKin
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Field<pylith::topology::Mesh> MeshField;
+typedef pylith::topology::Field<pylith::topology::SubMesh> SubMeshField;
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::meshio::TestDataWriterSubMesh::setUp(void)
+{ // setUp
+ _data = 0;
+ _mesh = 0;
+ _submesh = 0;
+ _flipFault = false;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::meshio::TestDataWriterSubMesh::tearDown(void)
+{ // tearDown
+ delete _data; _data = 0;
+ delete _mesh; _mesh = 0;
+ delete _submesh; _submesh = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Initialize mesh.
+void
+pylith::meshio::TestDataWriterSubMesh::_initialize(void)
+{ // _initialize
+ CPPUNIT_ASSERT(0 != _data);
+
+ delete _mesh; _mesh = new topology::Mesh;
+ MeshIOAscii iohandler;
+ iohandler.filename(_data->meshFilename);
+ iohandler.read(_mesh);
+
+ if (0 != _data->faultLabel) {
+ faults::FaultCohesiveKin fault;
+ int firstFaultVertex = 0;
+ int firstLagrangeVertex = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ int firstFaultCell = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ if (fault.useLagrangeConstraints()) {
+ firstFaultCell += _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
+ }
+ fault.label(_data->faultLabel);
+ fault.id(_data->faultId);
+ fault.adjustTopology(_mesh, &firstFaultVertex, &firstLagrangeVertex, &firstFaultCell, _flipFault);
+ } // if
+
+ CPPUNIT_ASSERT(0 != _data->bcLabel);
+ delete _submesh; _submesh = new topology::SubMesh(*_mesh, _data->bcLabel);
+ const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = _mesh->sieveMesh();
+ assert(!sieveMesh.isNull());
+ const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
+ _submesh->sieveMesh();
+ assert(!sieveSubMesh.isNull());
+ sieveSubMesh->setRealSection("coordinates",
+ sieveMesh->getRealSection("coordinates"));
+ //_mesh->view("BC mesh");
+} // _initialize
+
+// ----------------------------------------------------------------------
+// Create vertex fields.
+void
+pylith::meshio::TestDataWriterSubMesh::_createVertexFields(
+ topology::Fields<MeshField>* fields) const
+{ // _createVertexFields
+ CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ try {
+ const int nfields = _data->numVertexFields;
+
+ const ALE::Obj<topology::SubMesh::SieveMesh>& sieveMesh =
+ _mesh->sieveMesh();
+ CPPUNIT_ASSERT(!sieveMesh.isNull());
+ const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& vertices =
+ sieveMesh->depthStratum(0);
+ CPPUNIT_ASSERT(!vertices.isNull());
+ const topology::SubMesh::SieveMesh::label_sequence::iterator verticesEnd =
+ vertices->end();
+
+ // Set vertex fields
+ for (int i=0; i < nfields; ++i) {
+ const char* name = _data->vertexFieldsInfo[i].name;
+ const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
+ fields->add(name, name);
+ MeshField& field = fields->get(name);
+ field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
+ field.allocate();
+ field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
+
+ const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
+ CPPUNIT_ASSERT(!section.isNull());
+ int ipt = 0;
+ for (topology::SubMesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
+ v_iter != verticesEnd;
+ ++v_iter, ++ipt) {
+ const double* values = &_data->vertexFields[i][ipt*fiberDim];
+ section->updatePoint(*v_iter, values);
+ } // for
+ CPPUNIT_ASSERT_EQUAL(_data->numVertices, ipt);
+ } // for
+ } catch (const ALE::Exception& err) {
+ throw std::runtime_error(err.msg());
+ } catch (...) {
+ throw;
+ } // catch
+} // _createVertexFields
+
+// ----------------------------------------------------------------------
+// Create cell fields.
+void
+pylith::meshio::TestDataWriterSubMesh::_createCellFields(
+ topology::Fields<SubMeshField>* fields) const
+{ // _createCellFields
+ CPPUNIT_ASSERT(0 != fields);
+ CPPUNIT_ASSERT(0 != _mesh);
+ CPPUNIT_ASSERT(0 != _data);
+
+ try {
+ const int nfields = _data->numCellFields;
+
+ const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
+ _submesh->sieveMesh();
+ CPPUNIT_ASSERT(!sieveSubMesh.isNull());
+ const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& cells =
+ sieveSubMesh->heightStratum(1);
+ assert(!cells.isNull());
+ const topology::SubMesh::SieveMesh::label_sequence::iterator cellsBegin =
+ cells->begin();
+ const topology::SubMesh::SieveMesh::label_sequence::iterator cellsEnd =
+ cells->end();
+
+ // Set cell fields
+ for (int i=0; i < nfields; ++i) {
+ const char* name = _data->cellFieldsInfo[i].name;
+ const int fiberDim = _data->cellFieldsInfo[i].fiber_dim;
+ fields->add(name, name);
+ SubMeshField& field = fields->get(name);
+ field.newSection(topology::FieldBase::CELLS_FIELD, fiberDim, 1);
+ field.allocate();
+ field.vectorFieldType(_data->cellFieldsInfo[i].field_type);
+
+ const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
+ CPPUNIT_ASSERT(!section.isNull());
+ int icell = 0;
+ for (topology::SubMesh::SieveMesh::label_sequence::iterator c_iter=cellsBegin;
+ c_iter != cellsEnd;
+ ++c_iter, ++icell) {
+ const double* values = &_data->cellFields[i][icell*fiberDim];
+ section->updatePoint(*c_iter, values);
+ } // for
+ CPPUNIT_ASSERT_EQUAL(_data->numCells, icell);
+ } // for
+ } catch (const ALE::Exception& err) {
+ throw std::runtime_error(err.msg());
+ } catch (...) {
+ throw;
+ } // catch
+} // _createCellFields
+
+
+// End of file
Added: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterSubMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterSubMesh.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterSubMesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/meshio/TestDataWriterSubMesh.hh
+ *
+ * @brief C++ TestDataWriterSubMesh object
+ *
+ * C++ unit testing for DataWriter<SubMesh>.
+ */
+
+#if !defined(pylith_meshio_testdatawritersubmesh_hh)
+#define pylith_meshio_testdatawritersubmesh_hh
+
+#include "pylith/topology/topologyfwd.hh" // USES Mesh, SubMesh, Field
+
+/// Namespace for pylith package
+namespace pylith {
+ namespace meshio {
+ class TestDataWriterSubMesh;
+
+ class DataWriterData;
+ } // meshio
+} // pylith
+
+/// C++ unit testing for DataWriter<SubMesh>.
+class pylith::meshio::TestDataWriterSubMesh
+{ // class TestDataWriterSubMesh
+
+ // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+ /// Setup testing data.
+ void setUp(void);
+
+ /// Tear down testing data.
+ void tearDown(void);
+
+ /// Initialize mesh.
+ void _initialize(void);
+
+ /** Create vertex fields.
+ *
+ * @param fields Vertex fields.
+ */
+ void
+ _createVertexFields(topology::Fields<topology::Field<topology::Mesh> >* fields) const;
+
+ /** Create cell fields.
+ *
+ * @param fields Cell fields.
+ */
+ void
+ _createCellFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
+
+ // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+ DataWriterData* _data; ///< Data for testing
+ topology::Mesh* _mesh; ///< Mesh for domain
+ topology::SubMesh* _submesh; ///< Mesh for subdomain.
+ bool _flipFault; ///< If true, flip fault orientation.
+
+}; // class TestDataWriterSubMesh
+
+#endif // pylith_meshio_testdatawritersubmesh_hh
+
+
+// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -20,29 +20,14 @@
#include "TestDataWriterVTK.hh" // Implementation of class methods
-#include "data/DataWriterVTKData.hh" // USES DataWriterVTKData
+#include <cppunit/extensions/HelperMacros.h>
#include <string.h> // USES strcmp()
#include <iostream> // USES std::cerr
+#include <sstream> // USES std::ostringstream
#include <fstream> // USES std::ifstream
// ----------------------------------------------------------------------
-// Setup testing data.
-void
-pylith::meshio::TestDataWriterVTK::setUp(void)
-{ // setUp
- _data = 0;
-} // setUp
-
-// ----------------------------------------------------------------------
-// Tear down testing data.
-void
-pylith::meshio::TestDataWriterVTK::tearDown(void)
-{ // tearDown
- delete _data; _data = 0;
-} // tearDown
-
-// ----------------------------------------------------------------------
// Check VTK file against archived file.
void
pylith::meshio::TestDataWriterVTK::checkFile(const char* filenameRoot,
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -27,33 +27,20 @@
#if !defined(pylith_meshio_testdatawritervtk_hh)
#define pylith_meshio_testdatawritervtk_hh
-#include <cppunit/extensions/HelperMacros.h>
-
/// Namespace for pylith package
namespace pylith {
namespace meshio {
class TestDataWriterVTK;
-
- class DataWriterVTKData;
} // meshio
} // pylith
/// C++ unit testing for DataWriterVTK
-class pylith::meshio::TestDataWriterVTK : public CppUnit::TestFixture
+class pylith::meshio::TestDataWriterVTK
{ // class TestDataWriterVTK
// PUBLIC METHODS /////////////////////////////////////////////////////
public :
- /// Setup testing data.
- void setUp(void);
-
- /// Tear down testing data.
- void tearDown(void);
-
- // PUBLIC METHODS /////////////////////////////////////////////////////
-public :
-
/** Check VTK file against archived file.
*
* @param filename Name of file to check.
@@ -65,11 +52,6 @@
const double t,
const char* timeFormat);
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- DataWriterVTKData* _data; ///< Data for testing
-
}; // class TestDataWriterVTK
#endif // pylith_meshio_testdatawritervtk_hh
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKBCMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKBCMesh.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKBCMesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -20,7 +20,7 @@
#include "TestDataWriterVTKBCMesh.hh" // Implementation of class methods
-#include "data/DataWriterVTKData.hh" // USES DataWriterVTKData
+#include "data/DataWriterData.hh" // USES DataWriterData
#include "pylith/topology/Mesh.hh" // USES Mesh
#include "pylith/topology/Field.hh" // USES Field
@@ -40,10 +40,7 @@
void
pylith::meshio::TestDataWriterVTKBCMesh::setUp(void)
{ // setUp
- TestDataWriterVTK::setUp();
- _mesh = 0;
- _submesh = 0;
- _flipFault = false;
+ TestDataWriterBCMesh::setUp();
} // setUp
// ----------------------------------------------------------------------
@@ -51,9 +48,7 @@
void
pylith::meshio::TestDataWriterVTKBCMesh::tearDown(void)
{ // tearDown
- TestDataWriterVTK::tearDown();
- delete _mesh; _mesh = 0;
- delete _submesh; _submesh = 0;
+ TestDataWriterBCMesh::tearDown();
} // tearDown
// ----------------------------------------------------------------------
@@ -200,139 +195,5 @@
checkFile(_data->cellFilename, t, _data->timeFormat);
} // testWriteCellField
-// ----------------------------------------------------------------------
-// Initialize mesh.
-void
-pylith::meshio::TestDataWriterVTKBCMesh::_initialize(void)
-{ // _initialize
- CPPUNIT_ASSERT(0 != _data);
- delete _mesh; _mesh = new topology::Mesh;
- MeshIOAscii iohandler;
- iohandler.filename(_data->meshFilename);
- iohandler.read(_mesh);
-
- if (0 != _data->faultLabel) {
- faults::FaultCohesiveKin fault;
- int firstFaultVertex = 0;
- int firstLagrangeVertex = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- int firstFaultCell = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- if (fault.useLagrangeConstraints()) {
- firstFaultCell += _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- }
- fault.label(_data->faultLabel);
- fault.id(_data->faultId);
- fault.adjustTopology(_mesh, &firstFaultVertex, &firstLagrangeVertex, &firstFaultCell, _flipFault);
- } // if
-
- delete _submesh; _submesh = new topology::SubMesh(*_mesh, _data->bcLabel);
- const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = _mesh->sieveMesh();
- assert(!sieveMesh.isNull());
- const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
- _submesh->sieveMesh();
- assert(!sieveSubMesh.isNull());
- sieveSubMesh->setRealSection("coordinates",
- sieveMesh->getRealSection("coordinates"));
- //_mesh->view("BC mesh");
-} // _initialize
-
-// ----------------------------------------------------------------------
-// Create vertex fields.
-void
-pylith::meshio::TestDataWriterVTKBCMesh::_createVertexFields(
- topology::Fields<SubMeshField>* fields) const
-{ // _createVertexFields
- CPPUNIT_ASSERT(0 != fields);
- CPPUNIT_ASSERT(0 != _mesh);
- CPPUNIT_ASSERT(0 != _data);
-
- try {
- const int nfields = _data->numVertexFields;
-
- const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
- _submesh->sieveMesh();
- CPPUNIT_ASSERT(!sieveSubMesh.isNull());
- const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& vertices =
- sieveSubMesh->depthStratum(0);
- CPPUNIT_ASSERT(!vertices.isNull());
- const topology::SubMesh::SieveMesh::label_sequence::iterator verticesEnd =
- vertices->end();
-
- // Set vertex fields
- for (int i=0; i < nfields; ++i) {
- const char* name = _data->vertexFieldsInfo[i].name;
- const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
- fields->add(name, name);
- SubMeshField& field = fields->get(name);
- field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
- field.allocate();
- field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
-
- const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
- CPPUNIT_ASSERT(!section.isNull());
- int ipt = 0;
- for (topology::SubMesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
- v_iter != verticesEnd;
- ++v_iter, ++ipt) {
- const double* values = &_data->vertexFields[i][ipt*fiberDim];
- section->updatePoint(*v_iter, values);
- } // for
- CPPUNIT_ASSERT_EQUAL(_data->numVertices, ipt);
- } // for
- } catch (const ALE::Exception& err) {
- throw std::runtime_error(err.msg());
- } // catch
-} // _createVertexFields
-
-// ----------------------------------------------------------------------
-// Create cell fields.
-void
-pylith::meshio::TestDataWriterVTKBCMesh::_createCellFields(
- topology::Fields<SubMeshField>* fields) const
-{ // _createCellFields
- CPPUNIT_ASSERT(0 != fields);
- CPPUNIT_ASSERT(0 != _mesh);
- CPPUNIT_ASSERT(0 != _data);
-
- try {
- const int nfields = _data->numCellFields;
-
- const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
- _submesh->sieveMesh();
- CPPUNIT_ASSERT(!sieveSubMesh.isNull());
- const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& cells =
- sieveSubMesh->heightStratum(1);
- assert(!cells.isNull());
- const topology::SubMesh::SieveMesh::label_sequence::iterator cellsBegin =
- cells->begin();
- const topology::SubMesh::SieveMesh::label_sequence::iterator cellsEnd =
- cells->end();
-
- // Set cell fields
- for (int i=0; i < nfields; ++i) {
- const char* name = _data->cellFieldsInfo[i].name;
- const int fiberDim = _data->cellFieldsInfo[i].fiber_dim;
- fields->add(name, name);
- SubMeshField& field = fields->get(name);
- field.newSection(topology::FieldBase::CELLS_FIELD, fiberDim, 1);
- field.allocate();
- field.vectorFieldType(_data->cellFieldsInfo[i].field_type);
-
- const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
- CPPUNIT_ASSERT(!section.isNull());
- int icell = 0;
- for (topology::SubMesh::SieveMesh::label_sequence::iterator c_iter=cellsBegin;
- c_iter != cellsEnd;
- ++c_iter, ++icell) {
- const double* values = &_data->cellFields[i][icell*fiberDim];
- section->updatePoint(*c_iter, values);
- } // for
- CPPUNIT_ASSERT_EQUAL(_data->numCells, icell);
- } // for
- } catch (const ALE::Exception& err) {
- throw std::runtime_error(err.msg());
- } // catch
-} // _createCellFields
-
-
// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKBCMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKBCMesh.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKBCMesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -28,9 +28,12 @@
#define pylith_meshio_testdatawritervtkbcmesh_hh
#include "TestDataWriterVTK.hh"
+#include "TestDataWriterBCMesh.hh"
#include "pylith/topology/topologyfwd.hh" // USES Mesh, SubMesh, Field
+#include <cppunit/extensions/HelperMacros.h>
+
/// Namespace for pylith package
namespace pylith {
namespace meshio {
@@ -39,7 +42,9 @@
} // pylith
/// C++ unit testing for DataWriterVTK
-class pylith::meshio::TestDataWriterVTKBCMesh : public TestDataWriterVTK
+class pylith::meshio::TestDataWriterVTKBCMesh : public TestDataWriterVTK,
+ public TestDataWriterBCMesh,
+ public CppUnit::TestFixture
{ // class TestDataWriterVTKBCMesh
// CPPUNIT TEST SUITE /////////////////////////////////////////////////
@@ -70,36 +75,6 @@
/// Test writeCellField.
void testWriteCellField(void);
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- /// Initialize mesh.
- void _initialize(void);
-
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- topology::Mesh* _mesh; ///< Mesh for domain
- topology::SubMesh* _submesh; ///< Mesh for subdomain.
- bool _flipFault; ///< If true, flip fault orientation.
-
- // PRIVATE MEMBERS ////////////////////////////////////////////////////
-private :
-
- /** Create vertex fields.
- *
- * @param fields Vertex fields.
- */
- void
- _createVertexFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
-
- /** Create cell fields.
- *
- * @param fields Cell fields.
- */
- void
- _createCellFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
-
}; // class TestDataWriterVTKBCMesh
#endif // pylith_meshio_testdatawritervtkbcmesh_hh
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKFaultMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKFaultMesh.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKFaultMesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -20,7 +20,7 @@
#include "TestDataWriterVTKFaultMesh.hh" // Implementation of class methods
-#include "data/DataWriterVTKData.hh" // USES DataWriterVTKData
+#include "data/DataWriterData.hh" // USES DataWriterData
#include "pylith/topology/Mesh.hh" // USES Mesh
#include "pylith/topology/Field.hh" // USES Field
@@ -43,10 +43,7 @@
void
pylith::meshio::TestDataWriterVTKFaultMesh::setUp(void)
{ // setUp
- TestDataWriterVTK::setUp();
- _mesh = new topology::Mesh();
- _faultMesh = new topology::SubMesh();
- _flipFault = false;
+ TestDataWriterFaultMesh::setUp();
} // setUp
// ----------------------------------------------------------------------
@@ -54,9 +51,7 @@
void
pylith::meshio::TestDataWriterVTKFaultMesh::tearDown(void)
{ // tearDown
- TestDataWriterVTK::tearDown();
- delete _mesh; _mesh = 0;
- delete _faultMesh; _faultMesh = 0;
+ TestDataWriterFaultMesh::tearDown();
} // tearDown
// ----------------------------------------------------------------------
@@ -203,131 +198,5 @@
checkFile(_data->cellFilename, t, _data->timeFormat);
} // testWriteCellField
-// ----------------------------------------------------------------------
-// Initialize mesh.
-void
-pylith::meshio::TestDataWriterVTKFaultMesh::_initialize(void)
-{ // _initialize
- CPPUNIT_ASSERT(0 != _data);
- CPPUNIT_ASSERT(0 != _mesh);
- CPPUNIT_ASSERT(0 != _faultMesh);
- MeshIOAscii iohandler;
- iohandler.filename(_data->meshFilename);
- iohandler.read(_mesh);
-
- faults::FaultCohesiveKin fault;
- int firstFaultVertex = 0;
- int firstLagrangeVertex = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- int firstFaultCell = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- const bool constraintCell = true;
- if (constraintCell) {
- firstFaultCell += _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- }
- fault.label(_data->faultLabel);
- fault.id(_data->faultId);
- fault.adjustTopology(_mesh, &firstFaultVertex, &firstLagrangeVertex, &firstFaultCell, _flipFault);
- faults::CohesiveTopology::createFaultParallel(_faultMesh, *_mesh, _data->faultId,
- constraintCell);
-} // _initialize
-
-// ----------------------------------------------------------------------
-// Create vertex fields.
-void
-pylith::meshio::TestDataWriterVTKFaultMesh::_createVertexFields(
- topology::Fields<MeshField>* fields) const
-{ // _createVertexFields
- CPPUNIT_ASSERT(0 != fields);
- CPPUNIT_ASSERT(0 != _faultMesh);
- CPPUNIT_ASSERT(0 != _data);
-
- try {
- const int nfields = _data->numVertexFields;
-
- const ALE::Obj<topology::SubMesh::SieveMesh>& sieveFaultMesh =
- _faultMesh->sieveMesh();
- CPPUNIT_ASSERT(!sieveFaultMesh.isNull());
- const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& vertices =
- sieveFaultMesh->depthStratum(0);
- CPPUNIT_ASSERT(!vertices.isNull());
- const topology::SubMesh::SieveMesh::label_sequence::iterator verticesEnd =
- vertices->end();
-
- // Set vertex fields
- for (int i=0; i < nfields; ++i) {
- const char* name = _data->vertexFieldsInfo[i].name;
- const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
- fields->add(name, name);
- MeshField& field = fields->get(name);
- field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
- field.allocate();
- field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
-
- const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
- CPPUNIT_ASSERT(!section.isNull());
- int ipt = 0;
- for (topology::SubMesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
- v_iter != verticesEnd;
- ++v_iter, ++ipt) {
- const double* values = &_data->vertexFields[i][ipt*fiberDim];
- section->updatePoint(*v_iter, values);
- } // for
- CPPUNIT_ASSERT_EQUAL(_data->numVertices, ipt);
- } // for
- } catch (const ALE::Exception& err) {
- throw std::runtime_error(err.msg());
- } // catch
-} // _createVertexFields
-
-// ----------------------------------------------------------------------
-// Create cell fields.
-void
-pylith::meshio::TestDataWriterVTKFaultMesh::_createCellFields(
- topology::Fields<MeshField>* fields) const
-{ // _createCellFields
- CPPUNIT_ASSERT(0 != fields);
- CPPUNIT_ASSERT(0 != _mesh);
- CPPUNIT_ASSERT(0 != _data);
-
- try {
- const int nfields = _data->numCellFields;
-
- const ALE::Obj<topology::SubMesh::SieveMesh>& sieveFaultMesh =
- _faultMesh->sieveMesh();
- CPPUNIT_ASSERT(!sieveFaultMesh.isNull());
- const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& cells =
- sieveFaultMesh->heightStratum(0);
- assert(!cells.isNull());
- const topology::SubMesh::SieveMesh::label_sequence::iterator cellsBegin =
- cells->begin();
- const topology::SubMesh::SieveMesh::label_sequence::iterator cellsEnd =
- cells->end();
-
- // Set cell fields
- for (int i=0; i < nfields; ++i) {
- const char* name = _data->cellFieldsInfo[i].name;
- const int fiberDim = _data->cellFieldsInfo[i].fiber_dim;
- fields->add(name, name);
- MeshField& field = fields->get(name);
- field.newSection(topology::FieldBase::CELLS_FIELD, fiberDim);
- field.allocate();
- field.vectorFieldType(_data->cellFieldsInfo[i].field_type);
-
- const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
- CPPUNIT_ASSERT(!section.isNull());
- int icell = 0;
- for (topology::SubMesh::SieveMesh::label_sequence::iterator c_iter=cellsBegin;
- c_iter != cellsEnd;
- ++c_iter, ++icell) {
- const double* values = &_data->cellFields[i][icell*fiberDim];
- section->updatePoint(*c_iter, values);
- } // for
- CPPUNIT_ASSERT_EQUAL(_data->numCells, icell);
- } // for
- } catch (const ALE::Exception& err) {
- throw std::runtime_error(err.msg());
- } // catch
-} // _createCellFields
-
-
// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKFaultMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKFaultMesh.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKFaultMesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -28,9 +28,12 @@
#define pylith_meshio_testdatawritervtkfaultmesh_hh
#include "TestDataWriterVTK.hh"
+#include "TestDataWriterFaultMesh.hh"
#include "pylith/topology/topologyfwd.hh" // USES Mesh, SubMesh, Field
+#include <cppunit/extensions/HelperMacros.h>
+
/// Namespace for pylith package
namespace pylith {
namespace meshio {
@@ -39,7 +42,9 @@
} // pylith
/// C++ unit testing for DataWriterVTK
-class pylith::meshio::TestDataWriterVTKFaultMesh : public TestDataWriterVTK
+class pylith::meshio::TestDataWriterVTKFaultMesh : public TestDataWriterVTK,
+ public TestDataWriterFaultMesh,
+ public CppUnit::TestFixture
{ // class TestDataWriterVTKFaultMesh
// CPPUNIT TEST SUITE /////////////////////////////////////////////////
@@ -70,36 +75,6 @@
/// Test writeCellField.
void testWriteCellField(void);
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- /// Initialize mesh.
- void _initialize(void);
-
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- topology::Mesh* _mesh; ///< Mesh for domain
- topology::SubMesh* _faultMesh; ///< Fault mesh.
- bool _flipFault; ///< If true, flip fault orientation.
-
- // PRIVATE MEMBERS ////////////////////////////////////////////////////
-private :
-
- /** Create vertex fields.
- *
- * @param fields Vertex fields.
- */
- void
- _createVertexFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
-
- /** Create cell fields.
- *
- * @param fields Cell fields.
- */
- void
- _createCellFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
-
}; // class TestDataWriterVTKFaultMesh
#endif // pylith_meshio_testdatawritervtkfaultmesh_hh
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMesh.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -20,7 +20,7 @@
#include "TestDataWriterVTKMesh.hh" // Implementation of class methods
-#include "data/DataWriterVTKData.hh" // USES DataWriterVTKData
+#include "data/DataWriterData.hh" // USES DataWriterData
#include "pylith/topology/Mesh.hh" // USES Mesh
#include "pylith/topology/Field.hh" // USES Field
@@ -40,9 +40,7 @@
void
pylith::meshio::TestDataWriterVTKMesh::setUp(void)
{ // setUp
- TestDataWriterVTK::setUp();
- _mesh = 0;
- _flipFault = false;
+ TestDataWriterVTKMesh::setUp();
} // setUp
// ----------------------------------------------------------------------
@@ -50,8 +48,7 @@
void
pylith::meshio::TestDataWriterVTKMesh::tearDown(void)
{ // tearDown
- TestDataWriterVTK::tearDown();
- delete _mesh; _mesh = 0;
+ TestDataWriterMesh::tearDown();
} // tearDown
// ----------------------------------------------------------------------
@@ -273,126 +270,5 @@
writer._vtkFilename(50.0));
} // testVtkFilename
-// ----------------------------------------------------------------------
-// Initialize mesh.
-void
-pylith::meshio::TestDataWriterVTKMesh::_initialize(void)
-{ // _initialize
- CPPUNIT_ASSERT(0 != _data);
- delete _mesh; _mesh = new topology::Mesh;
- MeshIOAscii iohandler;
- iohandler.filename(_data->meshFilename);
- iohandler.read(_mesh);
-
- if (0 != _data->faultLabel) {
- faults::FaultCohesiveKin fault;
- int firstFaultVertex = 0;
- int firstLagrangeVertex = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- int firstFaultCell = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- if (fault.useLagrangeConstraints()) {
- firstFaultCell += _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- }
- fault.label(_data->faultLabel);
- fault.id(_data->faultId);
- fault.adjustTopology(_mesh, &firstFaultVertex, &firstLagrangeVertex, &firstFaultCell, _flipFault);
- } // if
-} // _initialize
-
-// ----------------------------------------------------------------------
-// Create vertex fields.
-void
-pylith::meshio::TestDataWriterVTKMesh::_createVertexFields(
- topology::Fields<MeshField>* fields) const
-{ // _createVertexFields
- CPPUNIT_ASSERT(0 != fields);
- CPPUNIT_ASSERT(0 != _mesh);
- CPPUNIT_ASSERT(0 != _data);
-
- try {
- const int nfields = _data->numVertexFields;
-
- const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = _mesh->sieveMesh();
- CPPUNIT_ASSERT(!sieveMesh.isNull());
- const ALE::Obj<topology::Mesh::SieveMesh::label_sequence>& vertices =
- sieveMesh->depthStratum(0);
- CPPUNIT_ASSERT(!vertices.isNull());
- const topology::Mesh::SieveMesh::label_sequence::iterator verticesEnd =
- vertices->end();
-
- // Set vertex fields
- for (int i=0; i < nfields; ++i) {
- const char* name = _data->vertexFieldsInfo[i].name;
- const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
- fields->add(name, name);
- MeshField& field = fields->get(name);
- field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
- field.allocate();
- field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
-
- const ALE::Obj<topology::Mesh::RealSection>& section = field.section();
- CPPUNIT_ASSERT(!section.isNull());
- int ipt = 0;
- for (topology::Mesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
- v_iter != verticesEnd;
- ++v_iter, ++ipt) {
- const double* values = &_data->vertexFields[i][ipt*fiberDim];
- section->updatePoint(*v_iter, values);
- } // for
- CPPUNIT_ASSERT_EQUAL(_data->numVertices, ipt);
- } // for
- } catch (const ALE::Exception& err) {
- throw std::runtime_error(err.msg());
- } // catch
-} // _createVertexFields
-
-// ----------------------------------------------------------------------
-// Create cell fields.
-void
-pylith::meshio::TestDataWriterVTKMesh::_createCellFields(
- topology::Fields<MeshField>* fields) const
-{ // _createCellFields
- CPPUNIT_ASSERT(0 != fields);
- CPPUNIT_ASSERT(0 != _mesh);
- CPPUNIT_ASSERT(0 != _data);
-
- try {
- const int nfields = _data->numCellFields;
-
- const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = _mesh->sieveMesh();
- CPPUNIT_ASSERT(!sieveMesh.isNull());
- const ALE::Obj<topology::Mesh::SieveMesh::label_sequence>& cells =
- (0 == _data->cellsLabel) ?
- sieveMesh->depthStratum(1) :
- sieveMesh->getLabelStratum(_data->cellsLabel, _data->labelId);
- const topology::Mesh::SieveMesh::label_sequence::iterator cellsEnd =
- cells->end();
-
- // Set cell fields
- for (int i=0; i < nfields; ++i) {
- const char* name = _data->cellFieldsInfo[i].name;
- const int fiberDim = _data->cellFieldsInfo[i].fiber_dim;
- fields->add(name, name);
- MeshField& field = fields->get(name);
- field.newSection(topology::FieldBase::CELLS_FIELD, fiberDim);
- field.allocate();
- field.vectorFieldType(_data->cellFieldsInfo[i].field_type);
-
- const ALE::Obj<topology::Mesh::RealSection>& section = field.section();
- CPPUNIT_ASSERT(!section.isNull());
- int icell = 0;
- for (topology::Mesh::SieveMesh::label_sequence::iterator c_iter=cells->begin();
- c_iter != cellsEnd;
- ++c_iter, ++icell) {
- const double* values = &_data->cellFields[i][icell*fiberDim];
- section->updatePoint(*c_iter, values);
- } // for
- CPPUNIT_ASSERT_EQUAL(_data->numCells, icell);
- } // for
- } catch (const ALE::Exception& err) {
- throw std::runtime_error(err.msg());
- } // catch
-} // _createCellFields
-
-
// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMesh.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKMesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -28,9 +28,12 @@
#define pylith_meshio_testdatawritervtkmesh_hh
#include "TestDataWriterVTK.hh" // ISA TestDataWriterVTK
+#include "TestDataWriterMesh.hh" // ISA TestDataWriterMesh
#include "pylith/topology/topologyfwd.hh" // USES Mesh, Field
+#include <cppunit/extensions/HelperMacros.h>
+
/// Namespace for pylith package
namespace pylith {
namespace meshio {
@@ -39,7 +42,9 @@
} // pylith
/// C++ unit testing for DataWriterVTK
-class pylith::meshio::TestDataWriterVTKMesh : public TestDataWriterVTK
+class pylith::meshio::TestDataWriterVTKMesh : public TestDataWriterVTK,
+ public TestDataWriterMesh,
+ public CppUnit::TestFixture
{ // class TestDataWriterVTKMesh
// CPPUNIT TEST SUITE /////////////////////////////////////////////////
@@ -90,35 +95,6 @@
/// Test vtkFilename.
void testVtkFilename(void);
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- /// Initialize mesh.
- void _initialize(void);
-
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- topology::Mesh* _mesh; ///< Mesh for data
- bool _flipFault; ///< If true, flip fault orientation.
-
- // PRIVATE MEMBERS ////////////////////////////////////////////////////
-private :
-
- /** Create vertex fields.
- *
- * @param fields Vertex fields.
- */
- void
- _createVertexFields(topology::Fields<topology::Field<topology::Mesh> >* fields) const;
-
- /** Create cell fields.
- *
- * @param fields Cell fields.
- */
- void
- _createCellFields(topology::Fields<topology::Field<topology::Mesh> >* fields) const;
-
}; // class TestDataWriterVTKMesh
#endif // pylith_meshio_testdatawritervtkmesh_hh
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKSubMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKSubMesh.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKSubMesh.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -20,7 +20,7 @@
#include "TestDataWriterVTKSubMesh.hh" // Implementation of class methods
-#include "data/DataWriterVTKData.hh" // USES DataWriterVTKData
+#include "data/DataWriterData.hh" // USES DataWriterData
#include "pylith/topology/Mesh.hh" // USES Mesh
#include "pylith/topology/Field.hh" // USES Field
@@ -41,10 +41,7 @@
void
pylith::meshio::TestDataWriterVTKSubMesh::setUp(void)
{ // setUp
- TestDataWriterVTK::setUp();
- _mesh = 0;
- _submesh = 0;
- _flipFault = false;
+ TestDataWriterSubMesh::setUp();
} // setUp
// ----------------------------------------------------------------------
@@ -52,9 +49,7 @@
void
pylith::meshio::TestDataWriterVTKSubMesh::tearDown(void)
{ // tearDown
- TestDataWriterVTK::tearDown();
- delete _mesh; _mesh = 0;
- delete _submesh; _submesh = 0;
+ TestDataWriterSubMesh::tearDown();
} // tearDown
// ----------------------------------------------------------------------
@@ -201,140 +196,5 @@
checkFile(_data->cellFilename, t, _data->timeFormat);
} // testWriteCellField
-// ----------------------------------------------------------------------
-// Initialize mesh.
-void
-pylith::meshio::TestDataWriterVTKSubMesh::_initialize(void)
-{ // _initialize
- CPPUNIT_ASSERT(0 != _data);
- delete _mesh; _mesh = new topology::Mesh;
- MeshIOAscii iohandler;
- iohandler.filename(_data->meshFilename);
- iohandler.read(_mesh);
-
- if (0 != _data->faultLabel) {
- faults::FaultCohesiveKin fault;
- int firstFaultVertex = 0;
- int firstLagrangeVertex = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- int firstFaultCell = _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- if (fault.useLagrangeConstraints()) {
- firstFaultCell += _mesh->sieveMesh()->getIntSection(_data->faultLabel)->size();
- }
- fault.label(_data->faultLabel);
- fault.id(_data->faultId);
- fault.adjustTopology(_mesh, &firstFaultVertex, &firstLagrangeVertex, &firstFaultCell, _flipFault);
- } // if
-
- CPPUNIT_ASSERT(0 != _data->bcLabel);
- delete _submesh; _submesh = new topology::SubMesh(*_mesh, _data->bcLabel);
- const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = _mesh->sieveMesh();
- assert(!sieveMesh.isNull());
- const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
- _submesh->sieveMesh();
- assert(!sieveSubMesh.isNull());
- sieveSubMesh->setRealSection("coordinates",
- sieveMesh->getRealSection("coordinates"));
- //_mesh->view("BC mesh");
-} // _initialize
-
-// ----------------------------------------------------------------------
-// Create vertex fields.
-void
-pylith::meshio::TestDataWriterVTKSubMesh::_createVertexFields(
- topology::Fields<MeshField>* fields) const
-{ // _createVertexFields
- CPPUNIT_ASSERT(0 != fields);
- CPPUNIT_ASSERT(0 != _mesh);
- CPPUNIT_ASSERT(0 != _data);
-
- try {
- const int nfields = _data->numVertexFields;
-
- const ALE::Obj<topology::SubMesh::SieveMesh>& sieveMesh =
- _mesh->sieveMesh();
- CPPUNIT_ASSERT(!sieveMesh.isNull());
- const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& vertices =
- sieveMesh->depthStratum(0);
- CPPUNIT_ASSERT(!vertices.isNull());
- const topology::SubMesh::SieveMesh::label_sequence::iterator verticesEnd =
- vertices->end();
-
- // Set vertex fields
- for (int i=0; i < nfields; ++i) {
- const char* name = _data->vertexFieldsInfo[i].name;
- const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
- fields->add(name, name);
- MeshField& field = fields->get(name);
- field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
- field.allocate();
- field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
-
- const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
- CPPUNIT_ASSERT(!section.isNull());
- int ipt = 0;
- for (topology::SubMesh::SieveMesh::label_sequence::iterator v_iter=vertices->begin();
- v_iter != verticesEnd;
- ++v_iter, ++ipt) {
- const double* values = &_data->vertexFields[i][ipt*fiberDim];
- section->updatePoint(*v_iter, values);
- } // for
- CPPUNIT_ASSERT_EQUAL(_data->numVertices, ipt);
- } // for
- } catch (const ALE::Exception& err) {
- throw std::runtime_error(err.msg());
- } // catch
-} // _createVertexFields
-
-// ----------------------------------------------------------------------
-// Create cell fields.
-void
-pylith::meshio::TestDataWriterVTKSubMesh::_createCellFields(
- topology::Fields<SubMeshField>* fields) const
-{ // _createCellFields
- CPPUNIT_ASSERT(0 != fields);
- CPPUNIT_ASSERT(0 != _mesh);
- CPPUNIT_ASSERT(0 != _data);
-
- try {
- const int nfields = _data->numCellFields;
-
- const ALE::Obj<topology::SubMesh::SieveMesh>& sieveSubMesh =
- _submesh->sieveMesh();
- CPPUNIT_ASSERT(!sieveSubMesh.isNull());
- const ALE::Obj<topology::SubMesh::SieveMesh::label_sequence>& cells =
- sieveSubMesh->heightStratum(1);
- assert(!cells.isNull());
- const topology::SubMesh::SieveMesh::label_sequence::iterator cellsBegin =
- cells->begin();
- const topology::SubMesh::SieveMesh::label_sequence::iterator cellsEnd =
- cells->end();
-
- // Set cell fields
- for (int i=0; i < nfields; ++i) {
- const char* name = _data->cellFieldsInfo[i].name;
- const int fiberDim = _data->cellFieldsInfo[i].fiber_dim;
- fields->add(name, name);
- SubMeshField& field = fields->get(name);
- field.newSection(topology::FieldBase::CELLS_FIELD, fiberDim, 1);
- field.allocate();
- field.vectorFieldType(_data->cellFieldsInfo[i].field_type);
-
- const ALE::Obj<topology::SubMesh::RealSection>& section = field.section();
- CPPUNIT_ASSERT(!section.isNull());
- int icell = 0;
- for (topology::SubMesh::SieveMesh::label_sequence::iterator c_iter=cellsBegin;
- c_iter != cellsEnd;
- ++c_iter, ++icell) {
- const double* values = &_data->cellFields[i][icell*fiberDim];
- section->updatePoint(*c_iter, values);
- } // for
- CPPUNIT_ASSERT_EQUAL(_data->numCells, icell);
- } // for
- } catch (const ALE::Exception& err) {
- throw std::runtime_error(err.msg());
- } // catch
-} // _createCellFields
-
-
// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKSubMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKSubMesh.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKSubMesh.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -28,9 +28,12 @@
#define pylith_meshio_testdatawritervtksubmesh_hh
#include "TestDataWriterVTK.hh"
+#include "TestDataWriterSubMesh.hh"
#include "pylith/topology/topologyfwd.hh" // USES Mesh, SubMesh, Field
+#include <cppunit/extensions/HelperMacros.h>
+
/// Namespace for pylith package
namespace pylith {
namespace meshio {
@@ -39,7 +42,9 @@
} // pylith
/// C++ unit testing for DataWriterVTK
-class pylith::meshio::TestDataWriterVTKSubMesh : public TestDataWriterVTK
+class pylith::meshio::TestDataWriterVTKSubMesh : public TestDataWriterVTK,
+ public TestDataWriterSubMesh,
+ public CppUnit::TestFixture
{ // class TestDataWriterVTKSubMesh
// CPPUNIT TEST SUITE /////////////////////////////////////////////////
@@ -70,36 +75,6 @@
/// Test writeCellField.
void testWriteCellField(void);
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- /// Initialize mesh.
- void _initialize(void);
-
- // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
- topology::Mesh* _mesh; ///< Mesh for domain
- topology::SubMesh* _submesh; ///< Mesh for subdomain.
- bool _flipFault; ///< If true, flip fault orientation.
-
- // PRIVATE MEMBERS ////////////////////////////////////////////////////
-private :
-
- /** Create vertex fields.
- *
- * @param fields Vertex fields.
- */
- void
- _createVertexFields(topology::Fields<topology::Field<topology::Mesh> >* fields) const;
-
- /** Create cell fields.
- *
- * @param fields Cell fields.
- */
- void
- _createCellFields(topology::Fields<topology::Field<topology::SubMesh> >* fields) const;
-
}; // class TestDataWriterVTKSubMesh
#endif // pylith_meshio_testdatawritervtksubmesh_hh
Copied: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterData.cc (from rev 17197, short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterData.cc (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterData.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+#include "DataWriterData.hh"
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::meshio::DataWriterData::DataWriterData(void) :
+ meshFilename(0),
+ faultLabel(0),
+ faultId(0),
+ bcLabel(0),
+ timestepFilename(0),
+ vertexFilename(0),
+ cellFilename(0),
+ time(0),
+ timeFormat(0),
+ cellsLabel(0),
+ labelId(0),
+ numVertexFields(0),
+ numVertices(0),
+ vertexFieldsInfo(0),
+ numCellFields(0),
+ numCells(0),
+ cellFieldsInfo(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::meshio::DataWriterData::~DataWriterData(void)
+{ // destructor
+} // destructor
+
+
+// End of file
Copied: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterData.hh (from rev 17197, short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterData.hh (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterData.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -0,0 +1,91 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+#if !defined(pylith_meshio_datawriterdata_hh)
+#define pylith_meshio_datawriterdata_hh
+
+#include "pylith/topology/FieldBase.hh" // USES VectorFieldEnum
+
+namespace pylith {
+ namespace meshio {
+ class DataWriterData;
+ } // meshio
+} // pylith
+
+class pylith::meshio::DataWriterData
+{ // DataWriterData
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+
+ /// Constructor
+ DataWriterData(void);
+
+ /// Destructor
+ virtual
+ ~DataWriterData(void);
+
+// PUBLIC STRUCTS ///////////////////////////////////////////////////////
+public:
+
+ struct FieldStruct {
+ char* name; ///< Name of field
+ topology::FieldBase::VectorFieldEnum field_type; ///< Type of field.
+ int fiber_dim; ///< Fiber dimension for field.
+ }; // FieldStruct
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public:
+
+ char* meshFilename; ///< Name of mesh file.
+ char* faultLabel; ///< Name of group of vertices for fault.
+ int faultId; ///< Material identifier for fault.
+ char* bcLabel; ///< Name of group of vertices for bc.
+
+ char* timestepFilename; ///< Name of file without fields.
+ char* vertexFilename; ///< Name of file for vertex fields.
+ char* cellFilename; ///< Name of file for cell fields.
+
+ double time; ///< Time for fields.
+ char* timeFormat; ///< Format for time stamp.
+
+ char* cellsLabel; ///< Name of label for mesh cells (if using subset or boundary).
+ int labelId; ///< Id for label associated with cells (if cellsLabel != 0)
+
+ /// @name Vertex field information.
+ //@{
+ int numVertexFields; ///< Number of vertex fields.
+ int numVertices; ///< Number of vertices.
+ FieldStruct* vertexFieldsInfo; ///< Array of vertex field information.
+ double* vertexFields[3]; ///< Array of vertex field values.
+ //@}
+
+ /// @name Cell field information.
+ //@{
+ int numCellFields; ///< Number of cell fields.
+ int numCells; ///< Number of vertices.
+ FieldStruct* cellFieldsInfo; ///< Array of cell fields information.
+ double* cellFields[3]; /// Array of cell field values.
+ //@}
+
+}; // DataWriterData
+
+#endif // pylith_meshio_datawriterdata_hh
+
+
+// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard, U.S. Geological Survey
-// Charles A. Williams, GNS Science
-// Matthew G. Knepley, University of Chicago
-//
-// This code was developed as part of the Computational Infrastructure
-// for Geodynamics (http://geodynamics.org).
-//
-// Copyright (c) 2010 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-#include "DataWriterVTKData.hh"
-
-// ----------------------------------------------------------------------
-// Constructor
-pylith::meshio::DataWriterVTKData::DataWriterVTKData(void) :
- meshFilename(0),
- faultLabel(0),
- faultId(0),
- bcLabel(0),
- timestepFilename(0),
- vertexFilename(0),
- cellFilename(0),
- time(0),
- timeFormat(0),
- cellsLabel(0),
- labelId(0),
- numVertexFields(0),
- numVertices(0),
- vertexFieldsInfo(0),
- numCellFields(0),
- numCells(0),
- cellFieldsInfo(0)
-{ // constructor
-} // constructor
-
-// ----------------------------------------------------------------------
-// Destructor
-pylith::meshio::DataWriterVTKData::~DataWriterVTKData(void)
-{ // destructor
-} // destructor
-
-
-// End of file
Deleted: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKData.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -1,91 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard, U.S. Geological Survey
-// Charles A. Williams, GNS Science
-// Matthew G. Knepley, University of Chicago
-//
-// This code was developed as part of the Computational Infrastructure
-// for Geodynamics (http://geodynamics.org).
-//
-// Copyright (c) 2010 University of California, Davis
-//
-// See COPYING for license information.
-//
-// ======================================================================
-//
-
-#if !defined(pylith_meshio_datawritervtkdata_hh)
-#define pylith_meshio_datawritervtkdata_hh
-
-#include "pylith/topology/FieldBase.hh" // USES VectorFieldEnum
-
-namespace pylith {
- namespace meshio {
- class DataWriterVTKData;
- } // meshio
-} // pylith
-
-class pylith::meshio::DataWriterVTKData
-{ // DataWriterVTKData
-
-// PUBLIC METHODS ///////////////////////////////////////////////////////
-public :
-
- /// Constructor
- DataWriterVTKData(void);
-
- /// Destructor
- virtual
- ~DataWriterVTKData(void);
-
-// PUBLIC STRUCTS ///////////////////////////////////////////////////////
-public:
-
- struct FieldStruct {
- char* name; ///< Name of field
- topology::FieldBase::VectorFieldEnum field_type; ///< Type of field.
- int fiber_dim; ///< Fiber dimension for field.
- }; // FieldStruct
-
-// PUBLIC MEMBERS ///////////////////////////////////////////////////////
-public:
-
- char* meshFilename; ///< Name of mesh file.
- char* faultLabel; ///< Name of group of vertices for fault.
- int faultId; ///< Material identifier for fault.
- char* bcLabel; ///< Name of group of vertices for bc.
-
- char* timestepFilename; ///< Name of VTK file without fields.
- char* vertexFilename; ///< Name of VTK file for vertex fields.
- char* cellFilename; ///< Name of VTK file for cell fields.
-
- double time; ///< Time for fields.
- char* timeFormat; ///< Format for time stamp.
-
- char* cellsLabel; ///< Name of label for mesh cells (if using subset or boundary).
- int labelId; ///< Id for label associated with cells (if cellsLabel != 0)
-
- /// @name Vertex field information.
- //@{
- int numVertexFields; ///< Number of vertex fields.
- int numVertices; ///< Number of vertices.
- FieldStruct* vertexFieldsInfo; ///< Array of vertex field information.
- double* vertexFields[3]; ///< Array of vertex field values.
- //@}
-
- /// @name Cell field information.
- //@{
- int numCellFields; ///< Number of cell fields.
- int numCells; ///< Number of vertices.
- FieldStruct* cellFieldsInfo; ///< Array of cell fields information.
- double* cellFields[3]; /// Array of cell field values.
- //@}
-
-}; // DataWriterVTKData
-
-#endif // pylith_meshio_datawritervtkdata_hh
-
-
-// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -47,7 +47,7 @@
const int pylith::meshio::DataWriterVTKDataBCMeshHex8::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataBCMeshHex8::_numVertices = 8;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -80,7 +80,7 @@
const int pylith::meshio::DataWriterVTKDataBCMeshHex8::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataBCMeshHex8::_numCells = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -115,7 +115,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -123,7 +123,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatabcmeshhex8_hh)
#define pylith_meshio_datawritervtkdatabcmeshhex8_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataBCMeshHex8 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataBCMeshHex8 : public DataWriterData
{ // DataWriterVTKDataBCMeshHex8
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -43,7 +43,7 @@
const int pylith::meshio::DataWriterVTKDataBCMeshQuad4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataBCMeshQuad4::_numVertices = 3;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -66,7 +66,7 @@
const int pylith::meshio::DataWriterVTKDataBCMeshQuad4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataBCMeshQuad4::_numCells = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -99,7 +99,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -107,7 +107,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatabcmeshquad4_hh)
#define pylith_meshio_datawritervtkdatabcmeshquad4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataBCMeshQuad4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataBCMeshQuad4 : public DataWriterData
{ // DataWriterVTKDataBCMeshQuad4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -47,7 +47,7 @@
const int pylith::meshio::DataWriterVTKDataBCMeshTet4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataBCMeshTet4::_numVertices = 6;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -76,7 +76,7 @@
const int pylith::meshio::DataWriterVTKDataBCMeshTet4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataBCMeshTet4::_numCells = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -111,7 +111,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -119,7 +119,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatabcmeshtet4_hh)
#define pylith_meshio_datawritervtkdatabcmeshtet4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataBCMeshTet4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataBCMeshTet4 : public DataWriterData
{ // DataWriterVTKDataBCMeshTet4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -47,7 +47,7 @@
const int pylith::meshio::DataWriterVTKDataBCMeshTri3::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataBCMeshTri3::_numVertices = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -68,7 +68,7 @@
const int pylith::meshio::DataWriterVTKDataBCMeshTri3::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataBCMeshTri3::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -101,7 +101,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -109,7 +109,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatabcmeshtri3_hh)
#define pylith_meshio_datawritervtkdatabcmeshtri3_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataBCMeshTri3 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataBCMeshTri3 : public DataWriterData
{ // DataWriterVTKDataBCMeshTri3
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataFaultMeshHex8::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataFaultMeshHex8::_numVertices = 4;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -69,7 +69,7 @@
const int pylith::meshio::DataWriterVTKDataFaultMeshHex8::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataFaultMeshHex8::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -101,7 +101,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -109,7 +109,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatafaultmeshhex8_hh)
#define pylith_meshio_datawritervtkdatafaultmeshhex8_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataFaultMeshHex8 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataFaultMeshHex8 : public DataWriterData
{ // DataWriterVTKDataFaultMeshHex8
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_numVertices = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -65,7 +65,7 @@
const int pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -97,7 +97,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -105,7 +105,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatafaultmeshquad4_hh)
#define pylith_meshio_datawritervtkdatafaultmeshquad4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataFaultMeshQuad4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataFaultMeshQuad4 : public DataWriterData
{ // DataWriterVTKDataFaultMeshQuad4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataFaultMeshTet4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataFaultMeshTet4::_numVertices = 3;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -67,7 +67,7 @@
const int pylith::meshio::DataWriterVTKDataFaultMeshTet4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataFaultMeshTet4::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -99,7 +99,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -107,7 +107,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatafaultmeshtet4_hh)
#define pylith_meshio_datawritervtkdatafaultmeshtet4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataFaultMeshTet4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataFaultMeshTet4 : public DataWriterData
{ // DataWriterVTKDataFaultMeshTet4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataFaultMeshTri3::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataFaultMeshTri3::_numVertices = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -65,7 +65,7 @@
const int pylith::meshio::DataWriterVTKDataFaultMeshTri3::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataFaultMeshTri3::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -97,7 +97,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -105,7 +105,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatafaultmeshtri3_hh)
#define pylith_meshio_datawritervtkdatafaultmeshtri3_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataFaultMeshTri3 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataFaultMeshTri3 : public DataWriterData
{ // DataWriterVTKDataFaultMeshTri3
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -48,7 +48,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshHex8::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshHex8::_numVertices = 20;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -107,7 +107,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshHex8::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshHex8::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -141,7 +141,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -149,7 +149,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatamatmeshhex8_hh)
#define pylith_meshio_datawritervtkdatamatmeshhex8_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMatMeshHex8 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMatMeshHex8 : public DataWriterData
{ // DataWriterVTKDataMatMeshHex8
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -48,7 +48,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshLine2::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshLine2::_numVertices = 5;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 1 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -71,7 +71,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshLine2::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshLine2::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 1 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -105,7 +105,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -113,7 +113,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatamatmeshline2_hh)
#define pylith_meshio_datawritervtkdatamatmeshline2_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMatMeshLine2 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMatMeshLine2 : public DataWriterData
{ // DataWriterVTKDataMatMeshLine2
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshQuad4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshQuad4::_numVertices = 6;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -73,7 +73,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshQuad4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshQuad4::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -105,7 +105,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -113,7 +113,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatamatmeshquad4_hh)
#define pylith_meshio_datawritervtkdatamatmeshquad4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMatMeshQuad4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMatMeshQuad4 : public DataWriterData
{ // DataWriterVTKDataMatMeshQuad4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -48,7 +48,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshTet4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshTet4::_numVertices = 11;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -87,7 +87,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshTet4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshTet4::_numCells = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -123,7 +123,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -131,7 +131,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatamatmeshtet4_hh)
#define pylith_meshio_datawritervtkdatamatmeshtet4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMatMeshTet4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMatMeshTet4 : public DataWriterData
{ // DataWriterVTKDataMatMeshTet4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -48,7 +48,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshTri3::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshTri3::_numVertices = 8;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -81,7 +81,7 @@
const int pylith::meshio::DataWriterVTKDataMatMeshTri3::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMatMeshTri3::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -115,7 +115,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -123,7 +123,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatamatmeshtri3_hh)
#define pylith_meshio_datawritervtkdatamatmeshtri3_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMatMeshTri3 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMatMeshTri3 : public DataWriterData
{ // DataWriterVTKDataMatMeshTri3
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataMeshHex8::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshHex8::_numVertices = 20;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -103,7 +103,7 @@
const int pylith::meshio::DataWriterVTKDataMeshHex8::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshHex8::_numCells = 3;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshHex8::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -139,7 +139,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -147,7 +147,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatameshhex8_hh)
#define pylith_meshio_datawritervtkdatameshhex8_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMeshHex8 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMeshHex8 : public DataWriterData
{ // DataWriterVTKDataMeshHex8
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataMeshLine2::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshLine2::_numVertices = 5;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshLine2::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 1 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -67,7 +67,7 @@
const int pylith::meshio::DataWriterVTKDataMeshLine2::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshLine2::_numCells = 3;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshLine2::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 1 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -99,7 +99,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -107,7 +107,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatameshline2_hh)
#define pylith_meshio_datawritervtkdatameshline2_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMeshLine2 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMeshLine2 : public DataWriterData
{ // DataWriterVTKDataMeshLine2
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -40,7 +40,7 @@
const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numVertices = 6;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -69,7 +69,7 @@
const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numCells = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -101,7 +101,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -109,7 +109,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatameshquad4_hh)
#define pylith_meshio_datawritervtkdatameshquad4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMeshQuad4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMeshQuad4 : public DataWriterData
{ // DataWriterVTKDataMeshQuad4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataMeshTet4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshTet4::_numVertices = 11;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -83,7 +83,7 @@
const int pylith::meshio::DataWriterVTKDataMeshTet4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshTet4::_numCells = 3;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshTet4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -119,7 +119,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -127,7 +127,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatameshtet4_hh)
#define pylith_meshio_datawritervtkdatameshtet4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMeshTet4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMeshTet4 : public DataWriterData
{ // DataWriterVTKDataMeshTet4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -44,7 +44,7 @@
const int pylith::meshio::DataWriterVTKDataMeshTri3::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshTri3::_numVertices = 8;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -75,7 +75,7 @@
const int pylith::meshio::DataWriterVTKDataMeshTri3::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataMeshTri3::_numCells = 3;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataMeshTri3::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -111,7 +111,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -119,7 +119,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatameshtri3_hh)
#define pylith_meshio_datawritervtkdatameshtri3_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataMeshTri3 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataMeshTri3 : public DataWriterData
{ // DataWriterVTKDataMeshTri3
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -46,7 +46,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshHex8::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshHex8::_numVertices = 12;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -87,7 +87,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshHex8::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshHex8::_numCells = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -122,7 +122,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -130,7 +130,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatasubmeshhex8_hh)
#define pylith_meshio_datawritervtkdatasubmeshhex8_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataSubMeshHex8 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataSubMeshHex8 : public DataWriterData
{ // DataWriterVTKDataSubMeshHex8
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -47,7 +47,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshLine2::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshLine2::_numVertices = 5;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -74,7 +74,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshLine2::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshLine2::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -107,7 +107,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -115,7 +115,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatasubmeshline2_hh)
#define pylith_meshio_datawritervtkdatasubmeshline2_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataSubMeshLine2 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataSubMeshLine2 : public DataWriterData
{ // DataWriterVTKDataSubMeshLine2
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -43,7 +43,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshQuad4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshQuad4::_numVertices = 6;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -72,7 +72,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshQuad4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshQuad4::_numCells = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -105,7 +105,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -113,7 +113,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatasubmeshquad4_hh)
#define pylith_meshio_datawritervtkdatasubmeshquad4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataSubMeshQuad4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataSubMeshQuad4 : public DataWriterData
{ // DataWriterVTKDataSubMeshQuad4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -46,7 +46,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshTet4::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshTet4::_numVertices = 5;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -73,7 +73,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshTet4::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshTet4::_numCells = 2;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 3 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -108,7 +108,7 @@
numVertexFields = _numVertexFields;
assert(3 == numVertexFields);
numVertices = _numVertices;
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -116,7 +116,7 @@
numCellFields = _numCellFields;
assert(3 == numCellFields);
numCells = _numCells;
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatasubmeshtet4_hh)
#define pylith_meshio_datawritervtkdatasubmeshtet4_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataSubMeshTet4 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataSubMeshTet4 : public DataWriterData
{ // DataWriterVTKDataSubMeshTet4
public:
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.cc 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.cc 2010-09-16 22:58:45 UTC (rev 17199)
@@ -47,7 +47,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshTri3::_numVertexFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshTri3::_numVertices = 8;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexFields[] = {
{ "displacements", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -80,7 +80,7 @@
const int pylith::meshio::DataWriterVTKDataSubMeshTri3::_numCellFields = 3;
const int pylith::meshio::DataWriterVTKDataSubMeshTri3::_numCells = 1;
-const pylith::meshio::DataWriterVTKData::FieldStruct
+const pylith::meshio::DataWriterData::FieldStruct
pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellFields[] = {
{ "traction", topology::FieldBase::VECTOR, 2 },
{ "pressure", topology::FieldBase::SCALAR, 1 },
@@ -113,7 +113,7 @@
numVertexFields = _numVertexFields;
numVertices = _numVertices;
assert(3 == numVertexFields);
- vertexFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_vertexFields);
+ vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
vertexFields[0] = const_cast<double*>(_vertexField0);
vertexFields[1] = const_cast<double*>(_vertexField1);
vertexFields[2] = const_cast<double*>(_vertexField2);
@@ -121,7 +121,7 @@
numCellFields = _numCellFields;
numCells = _numCells;
assert(3 == numCellFields);
- cellFieldsInfo = const_cast<DataWriterVTKData::FieldStruct*>(_cellFields);
+ cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
cellFields[0] = const_cast<double*>(_cellField0);
cellFields[1] = const_cast<double*>(_cellField1);
cellFields[2] = const_cast<double*>(_cellField2);
Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.hh 2010-09-16 22:57:09 UTC (rev 17198)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.hh 2010-09-16 22:58:45 UTC (rev 17199)
@@ -19,7 +19,7 @@
#if !defined(pylith_meshio_datawritervtkdatasubmeshtri3_hh)
#define pylith_meshio_datawritervtkdatasubmeshtri3_hh
-#include "DataWriterVTKData.hh" // ISA DataWriterVTKData
+#include "DataWriterData.hh" // ISA DataWriterData
namespace pylith {
namespace meshio {
@@ -27,7 +27,7 @@
} // meshio
} // pylith
-class pylith::meshio::DataWriterVTKDataSubMeshTri3 : public DataWriterVTKData
+class pylith::meshio::DataWriterVTKDataSubMeshTri3 : public DataWriterData
{ // DataWriterVTKDataSubMeshTri3
public:
More information about the CIG-COMMITS
mailing list