[cig-commits] r17133 - in short/3D/PyLith/trunk: libsrc/meshio modulesrc/meshio
brad at geodynamics.org
brad at geodynamics.org
Thu Aug 26 23:56:11 PDT 2010
Author: brad
Date: 2010-08-26 23:56:11 -0700 (Thu, 26 Aug 2010)
New Revision: 17133
Modified:
short/3D/PyLith/trunk/libsrc/meshio/CellFilter.hh
short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc
short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.hh
short/3D/PyLith/trunk/libsrc/meshio/DataWriter.hh
short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc
short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.hh
short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.hh
short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc
short/3D/PyLith/trunk/libsrc/meshio/OutputManager.hh
short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.hh
short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc
short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.hh
short/3D/PyLith/trunk/modulesrc/meshio/CellFilter.i
short/3D/PyLith/trunk/modulesrc/meshio/CellFilterAvg.i
short/3D/PyLith/trunk/modulesrc/meshio/DataWriter.i
short/3D/PyLith/trunk/modulesrc/meshio/DataWriterHDF5.i
short/3D/PyLith/trunk/modulesrc/meshio/DataWriterVTK.i
short/3D/PyLith/trunk/modulesrc/meshio/OutputManager.i
short/3D/PyLith/trunk/modulesrc/meshio/OutputSolnSubset.i
Log:
Updated interface for outputting fields (remove const restriction on field) for compatibility with HDF5 output (uses PETSc Vec and scatter).
Modified: short/3D/PyLith/trunk/libsrc/meshio/CellFilter.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/CellFilter.hh 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/CellFilter.hh 2010-08-27 06:56:11 UTC (rev 17133)
@@ -85,7 +85,7 @@
* @returns Averaged field.
*/
virtual
- const field_type&
+ field_type&
filter(const field_type& fieldIn,
const char* label =0,
const int labelId =0) = 0;
Modified: short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.cc 2010-08-27 06:56:11 UTC (rev 17133)
@@ -80,7 +80,7 @@
// ----------------------------------------------------------------------
// Filter field.
template<typename mesh_type, typename field_type>
-const field_type&
+field_type&
pylith::meshio::CellFilterAvg<mesh_type,field_type>::filter(
const field_type& fieldIn,
const char* label,
Modified: short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.hh 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/CellFilterAvg.hh 2010-08-27 06:56:11 UTC (rev 17133)
@@ -69,7 +69,7 @@
*
* @returns Averaged field.
*/
- const field_type&
+ field_type&
filter(const field_type& fieldIn,
const char* label =0,
const int labelId =0);
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriter.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriter.hh 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriter.hh 2010-08-27 06:56:11 UTC (rev 17133)
@@ -101,7 +101,7 @@
*/
virtual
void writeVertexField(const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh) = 0;
/** Write field over cells to file.
@@ -114,7 +114,7 @@
*/
virtual
void writeCellField(const double t,
- const field_type& field,
+ field_type& field,
const char* label =0,
const int labelId =0) = 0;
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.cc 2010-08-27 06:56:11 UTC (rev 17133)
@@ -142,7 +142,7 @@
void
pylith::meshio::DataWriterHDF5<mesh_type,field_type>::writeVertexField(
const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh)
{ // writeVertexField
try {
@@ -178,7 +178,7 @@
void
pylith::meshio::DataWriterHDF5<mesh_type,field_type>::writeCellField(
const double t,
- const field_type& field,
+ field_type& field,
const char* label,
const int labelId)
{ // writeCellField
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.hh 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterHDF5.hh 2010-08-27 06:56:11 UTC (rev 17133)
@@ -101,7 +101,7 @@
* @param mesh Mesh associated with output.
*/
void writeVertexField(const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh);
/** Write field over cells to file.
@@ -113,7 +113,7 @@
* @param labelId Value of label defining which cells to include.
*/
void writeCellField(const double t,
- const field_type& field,
+ field_type& field,
const char* label =0,
const int labelId =0);
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc 2010-08-27 06:56:11 UTC (rev 17133)
@@ -181,7 +181,7 @@
void
pylith::meshio::DataWriterVTK<mesh_type,field_type>::writeVertexField(
const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh)
{ // writeVertexField
typedef typename mesh_type::SieveMesh SieveMesh;
@@ -243,7 +243,7 @@
void
pylith::meshio::DataWriterVTK<mesh_type,field_type>::writeCellField(
const double t,
- const field_type& field,
+ field_type& field,
const char* label,
const int labelId)
{ // writeCellField
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.hh 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.hh 2010-08-27 06:56:11 UTC (rev 17133)
@@ -106,7 +106,7 @@
* @param mesh Mesh associated with output.
*/
void writeVertexField(const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh);
/** Write field over cells to file.
@@ -118,7 +118,7 @@
* @param labelId Value of label defining which cells to include.
*/
void writeCellField(const double t,
- const field_type& field,
+ field_type& field,
const char* label =0,
const int labelId =0);
Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputManager.cc 2010-08-27 06:56:11 UTC (rev 17133)
@@ -163,12 +163,12 @@
void
pylith::meshio::OutputManager<mesh_type, field_type>::appendVertexField(
const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh)
{ // appendVertexField
- const field_type& fieldFiltered =
+ field_type& fieldFiltered =
(0 == _vertexFilter) ? field : _vertexFilter->filter(field);
- const field_type& fieldDimensioned = _dimension(fieldFiltered);
+ field_type& fieldDimensioned = _dimension(fieldFiltered);
_writer->writeVertexField(t, fieldDimensioned, mesh);
} // appendVertexField
@@ -179,13 +179,13 @@
void
pylith::meshio::OutputManager<mesh_type, field_type>::appendCellField(
const double t,
- const field_type& field,
+ field_type& field,
const char* label,
const int labelId)
{ // appendCellField
- const field_type& fieldFiltered =
+ field_type& fieldFiltered =
(0 == _cellFilter) ? field : _cellFilter->filter(field, label, labelId);
- const field_type& fieldDimensioned = _dimension(fieldFiltered);
+ field_type& fieldDimensioned = _dimension(fieldFiltered);
_writer->writeCellField(t, fieldDimensioned, label, labelId);
} // appendCellField
@@ -193,8 +193,8 @@
// ----------------------------------------------------------------------
// Dimension field.
template<typename mesh_type, typename field_type>
-const field_type&
-pylith::meshio::OutputManager<mesh_type, field_type>::_dimension(const field_type& fieldIn)
+field_type&
+pylith::meshio::OutputManager<mesh_type, field_type>::_dimension(field_type& fieldIn)
{ // _dimension
if (1.0 == fieldIn.scale())
return fieldIn;
Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputManager.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputManager.hh 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputManager.hh 2010-08-27 06:56:11 UTC (rev 17133)
@@ -122,7 +122,7 @@
* @param mesh Mesh for output.
*/
void appendVertexField(const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh);
/** Append finite-element cell field to file.
@@ -134,7 +134,7 @@
* @param labelId Value of label defining which cells to include.
*/
void appendCellField(const double t,
- const field_type& field,
+ field_type& field,
const char* label =0,
const int labelId =0);
@@ -145,7 +145,7 @@
*
* @param fieldIn Field to dimensionalize.
*/
- const field_type& _dimension(const field_type& fieldIn);
+ field_type& _dimension(field_type& fieldIn);
// NOT IMPLEMENTED //////////////////////////////////////////////////////
private :
Modified: short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.hh 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/VertexFilter.hh 2010-08-27 06:56:11 UTC (rev 17133)
@@ -65,7 +65,7 @@
* @param fieldIn Field to filter.
*/
virtual
- const field_type&
+ field_type&
filter(const field_type& fieldIn) = 0;
// PROTECTED METHODS ////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.cc 2010-08-27 06:56:11 UTC (rev 17133)
@@ -68,7 +68,7 @@
// ----------------------------------------------------------------------
// Filter field.
template<typename field_type>
-const field_type&
+field_type&
pylith::meshio::VertexFilterVecNorm<field_type>::filter(
const field_type& fieldIn)
{ // filter
Modified: short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.hh 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/libsrc/meshio/VertexFilterVecNorm.hh 2010-08-27 06:56:11 UTC (rev 17133)
@@ -59,7 +59,7 @@
*
* @param fieldIn Field to filter.
*/
- const field_type&
+ field_type&
filter(const field_type& fieldIn);
// PROTECTED METHODS ////////////////////////////////////////////////////
Modified: short/3D/PyLith/trunk/modulesrc/meshio/CellFilter.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/CellFilter.i 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/modulesrc/meshio/CellFilter.i 2010-08-27 06:56:11 UTC (rev 17133)
@@ -65,9 +65,9 @@
* @returns Averaged field.
*/
virtual
- const field_type& filter(const field_type& fieldIn,
- const char* label =0,
- const int labelId =0) = 0;
+ field_type& filter(const field_type& fieldIn,
+ const char* label =0,
+ const int labelId =0) = 0;
}; // CellFilter
Modified: short/3D/PyLith/trunk/modulesrc/meshio/CellFilterAvg.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/CellFilterAvg.i 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/modulesrc/meshio/CellFilterAvg.i 2010-08-27 06:56:11 UTC (rev 17133)
@@ -62,9 +62,9 @@
*
* @returns Averaged field.
*/
- const field_type& filter(const field_type& fieldIn,
- const char* label =0,
- const int labelId =0);
+ field_type& filter(const field_type& fieldIn,
+ const char* label =0,
+ const int labelId =0);
}; // CellFilterAvg
Modified: short/3D/PyLith/trunk/modulesrc/meshio/DataWriter.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/DataWriter.i 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/modulesrc/meshio/DataWriter.i 2010-08-27 06:56:11 UTC (rev 17133)
@@ -94,7 +94,7 @@
*/
virtual
void writeVertexField(const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh) = 0;
/** Write field over cells to file.
@@ -107,7 +107,7 @@
*/
virtual
void writeCellField(const double t,
- const field_type& field,
+ field_type& field,
const char* label =0,
const int labelId =0) = 0;
Modified: short/3D/PyLith/trunk/modulesrc/meshio/DataWriterHDF5.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/DataWriterHDF5.i 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/modulesrc/meshio/DataWriterHDF5.i 2010-08-27 06:56:11 UTC (rev 17133)
@@ -77,7 +77,7 @@
* @param mesh Mesh for output.
*/
void writeVertexField(const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh);
/** Write field over cells to file.
@@ -89,7 +89,7 @@
* @param labelId Value of label defining which cells to include.
*/
void writeCellField(const double t,
- const field_type& field,
+ field_type& field,
const char* label =0,
const int labelId =0);
Modified: short/3D/PyLith/trunk/modulesrc/meshio/DataWriterVTK.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/DataWriterVTK.i 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/modulesrc/meshio/DataWriterVTK.i 2010-08-27 06:56:11 UTC (rev 17133)
@@ -98,7 +98,7 @@
* @param mesh Mesh for output.
*/
void writeVertexField(const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh);
/** Write field over cells to file.
@@ -110,7 +110,7 @@
* @param labelId Value of label defining which cells to include.
*/
void writeCellField(const double t,
- const field_type& field,
+ field_type& field,
const char* label =0,
const int labelId =0);
Modified: short/3D/PyLith/trunk/modulesrc/meshio/OutputManager.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/OutputManager.i 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/modulesrc/meshio/OutputManager.i 2010-08-27 06:56:11 UTC (rev 17133)
@@ -113,7 +113,7 @@
* @param mesh Mesh for output.
*/
void appendVertexField(const double t,
- const field_type& field,
+ field_type& field,
const mesh_type& mesh);
/** Append finite-element cell field to file.
@@ -125,7 +125,7 @@
* @param labelId Value of label defining which cells to include.
*/
void appendCellField(const double t,
- const field_type& field,
+ field_type& field,
const char* label =0,
const int labelId =0);
Modified: short/3D/PyLith/trunk/modulesrc/meshio/OutputSolnSubset.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/OutputSolnSubset.i 2010-08-27 06:54:59 UTC (rev 17132)
+++ short/3D/PyLith/trunk/modulesrc/meshio/OutputSolnSubset.i 2010-08-27 06:56:11 UTC (rev 17133)
@@ -60,18 +60,6 @@
*/
const pylith::topology::SubMesh& subdomainMesh(const pylith::topology::Mesh& mesh);
- /** Append finite-element vertex field to file.
- *
- * @param t Time associated with field.
- * @param field Vertex field.
- * @param mesh Mesh for output.
- */
- void appendVertexField(const double t,
- const pylith::topology::Field<pylith::topology::Mesh>& field,
- const pylith::topology::SubMesh& mesh);
-
-
-
}; // OutputSolnSubset
} // meshio
More information about the CIG-COMMITS
mailing list