[cig-commits] r14672 - short/3D/PyLith/branches/pylith-swig/modulesrc/meshio
brad at geodynamics.org
brad at geodynamics.org
Sun Apr 12 15:35:36 PDT 2009
Author: brad
Date: 2009-04-12 15:35:35 -0700 (Sun, 12 Apr 2009)
New Revision: 14672
Modified:
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/CellFilter.i
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/CellFilterAvg.i
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/DataWriter.i
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/DataWriterVTK.i
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/OutputManager.i
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/OutputSolnSubset.i
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/VertexFilter.i
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/VertexFilterVecNorm.i
short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/meshio.i
Log:
Updated meshio module for change in template arguments.
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/CellFilter.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/CellFilter.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/CellFilter.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -19,7 +19,7 @@
namespace pylith {
namespace meshio {
- template<typename mesh_type>
+ template<typename mesh_type, typename field_type>
class pylith::meshio::CellFilter
{ // CellFilter
@@ -54,10 +54,9 @@
* @returns Averaged field.
*/
virtual
- const pylith::topology::Field<mesh_type>&
- filter(const pylith::topology::Field<mesh_type>& fieldIn,
- const char* label =0,
- const int labelId =0) = 0;
+ const field_type& filter(const field_type& fieldIn,
+ const char* label =0,
+ const int labelId =0) = 0;
}; // CellFilter
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/CellFilterAvg.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/CellFilterAvg.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/CellFilterAvg.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -19,8 +19,9 @@
namespace pylith {
namespace meshio {
- template<typename mesh_type>
- class pylith::meshio::CellFilterAvg : public CellFilter<mesh_type>
+ template<typename mesh_type, typename field_type>
+ class pylith::meshio::CellFilterAvg :
+ public CellFilter<mesh_type, field_type>
{ // CellFilterAvg
// PUBLIC METHODS /////////////////////////////////////////////////
@@ -36,7 +37,7 @@
*
* @returns Copy of filter.
*/
- CellFilter<mesh_type>* clone(void) const;
+ CellFilter<mesh_type, field_type>* clone(void) const;
/** Filter field over cells.
*
@@ -46,10 +47,9 @@
*
* @returns Averaged field.
*/
- const pylith::topology::Field<mesh_type>&
- filter(const pylith::topology::Field<mesh_type>& fieldIn,
- const char* label =0,
- const int labelId =0);
+ const field_type& filter(const field_type& fieldIn,
+ const char* label =0,
+ const int labelId =0);
}; // CellFilterAvg
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/DataWriter.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/DataWriter.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/DataWriter.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -19,7 +19,7 @@
namespace pylith {
namespace meshio {
- template<typename mesh_type>
+ template<typename mesh_type, typename field_type>
class pylith::meshio::DataWriter
{ // DataWriter
@@ -83,7 +83,7 @@
*/
virtual
void writeVertexField(const double t,
- const pylith::topology::Field<mesh_type>& field) = 0;
+ const field_type& field) = 0;
/** Write field over cells to file.
*
@@ -95,7 +95,7 @@
*/
virtual
void writeCellField(const double t,
- const pylith::topology::Field<mesh_type>& field,
+ const field_type& field,
const char* label =0,
const int labelId =0) = 0;
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/DataWriterVTK.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/DataWriterVTK.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/DataWriterVTK.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -19,8 +19,9 @@
namespace pylith {
namespace meshio {
- template<typename mesh_type>
- class pylith::meshio::DataWriterVTK : public DataWriter<mesh_type>
+ template<typename mesh_type, typenam field_type>
+ class pylith::meshio::DataWriterVTK :
+ public DataWriter<mesh_type, field_type>
{ // DataWriterVTK
// PUBLIC METHODS /////////////////////////////////////////////////
@@ -36,7 +37,7 @@
*
* @returns Copy of this.
*/
- DataWriter<mesh_type>* clone(void) const;
+ DataWriter<mesh_type, field_type>* clone(void) const;
/** Set filename for VTK file.
*
@@ -81,7 +82,7 @@
* @param field Field over vertices.
*/
void writeVertexField(const double t,
- const pylith::topology::Field<mesh_type>& field);
+ const field_type& field);
/** Write field over cells to file.
*
@@ -92,7 +93,7 @@
* @param labelId Value of label defining which cells to include.
*/
void writeCellField(const double t,
- const pylith::topology::Field<mesh_type>& field,
+ const field_type& field,
const char* label =0,
const int labelId =0);
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/OutputManager.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/OutputManager.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/OutputManager.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -19,7 +19,7 @@
namespace pylith {
namespace meshio {
- template<typename mesh_type>
+ template<typename mesh_type, typename field_type>
class pylith::meshio::OutputManager
{ // OutputManager
@@ -44,19 +44,19 @@
*
* @param datawriter Writer for data.
*/
- void writer(DataWriter<mesh_type>* const datawriter);
+ void writer(DataWriter<mesh_type, field_type>* const datawriter);
/** Set filter for vertex data.
*
* @param filter Filter to apply to vertex data before writing.
*/
- void vertexFilter(VertexFilter<mesh_type>* const filter);
+ void vertexFilter(VertexFilter<field_type>* const filter);
/** Set filter for cell data.
*
* @param filter Filter to apply to cell data before writing.
*/
- void cellFilter(CellFilter<mesh_type>* const filter);
+ void cellFilter(CellFilter<mesh_type, field_type>* const filter);
/** Prepare for output.
*
@@ -96,7 +96,7 @@
* @param field Vertex field.
*/
void appendVertexField(const double t,
- const pylith::topology::Field<mesh_type>& field);
+ const field_type& field);
/** Append finite-element cell field to file.
*
@@ -107,7 +107,7 @@
* @param labelId Value of label defining which cells to include.
*/
void appendCellField(const double t,
- const pylith::topology::Field<mesh_type>& field,
+ const field_type& field,
const char* label =0,
const int labelId =0);
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/OutputSolnSubset.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/OutputSolnSubset.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/OutputSolnSubset.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -16,12 +16,12 @@
* @brief Python interface to C++ OutputSolnSubset object.
*/
-%template(_SubMeshOutputManager) pylith::meshio::OutputManager<pylith::topology::SubMesh>;
+%template(_SubMeshOutputManager) pylith::meshio::OutputManager<pylith::topology::SubMesh, pylith::topology::Field<pylith::topology::Mesh> >;
namespace pylith {
namespace meshio {
- class pylith::meshio::OutputSolnSubset : public OutputManager<pylith::topology::SubMesh>
+ class pylith::meshio::OutputSolnSubset : public OutputManager<pylith::topology::SubMesh, pylith::topology::Field<pylith::topology::Mesh> >
{ // OutputSolnSubset
// PUBLIC METHODS /////////////////////////////////////////////////
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/VertexFilter.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/VertexFilter.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/VertexFilter.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -19,7 +19,7 @@
namespace pylith {
namespace meshio {
- template<typename mesh_type>
+ template<typename field_type>
class pylith::meshio::VertexFilter
{ // VertexFilter
@@ -44,8 +44,7 @@
* @param fieldIn Field to filter.
*/
virtual
- const pylith::topology::Field<mesh_type>&
- filter(const pylith::topology::Field<mesh_type>& fieldIn) = 0;
+ const field_type& filter(const field_type& fieldIn) = 0;
}; // VertexFilter
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/VertexFilterVecNorm.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/VertexFilterVecNorm.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/VertexFilterVecNorm.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -19,8 +19,8 @@
namespace pylith {
namespace meshio {
- template<typename mesh_type>
- class pylith::meshio::VertexFilterVecNorm : public VertexFilter<mesh_type>
+ template<typename field_type>
+ class pylith::meshio::VertexFilterVecNorm : public VertexFilter<field_type>
{ // VertexFilterVecNorm
// PUBLIC METHODS /////////////////////////////////////////////////
@@ -36,14 +36,13 @@
*
* @returns Copy of filter.
*/
- VertexFilter<mesh_type>* clone(void) const;
+ VertexFilter<field_type>* clone(void) const;
/** Filter vertex field.
*
* @param fieldIn Field to filter.
*/
- const pylith::topology::Field<mesh_type>&
- filter(const pylith::topology::Field<mesh_type>& fieldIn);
+ const field_type& filter(const field_type& fieldIn);
}; // VertexFilterVecNorm
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/meshio.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/meshio.i 2009-04-12 22:14:02 UTC (rev 14671)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/meshio/meshio.i 2009-04-12 22:35:35 UTC (rev 14672)
@@ -59,22 +59,25 @@
%include "OutputSolnSubset.i"
// Template instatiation
-%template(MeshVertexFilter) pylith::meshio::VertexFilter<pylith::topology::Mesh>;
-%template(SubMeshVertexFilter) pylith::meshio::VertexFilter<pylith::topology::SubMesh>;
-%template(MeshVertexFilterVecNorm) pylith::meshio::VertexFilterVecNorm<pylith::topology::Mesh>;
-%template(SubMeshVertexFilterVecNorm) pylith::meshio::VertexFilterVecNorm<pylith::topology::SubMesh>;
+%template(MeshVertexFilter) pylith::meshio::VertexFilter<pylith::topology::Field<pylith::topology::Mesh> >;
+%template(SubMeshVertexFilter) pylith::meshio::VertexFilter<pylith::topology::Field<pylith::topology::SubMesh> >;
+%template(MeshVertexFilterVecNorm) pylith::meshio::VertexFilterVecNorm<pylith::topology::Field<pylith::topology::Mesh> >;
+%template(SubMeshVertexFilterVecNorm) pylith::meshio::VertexFilterVecNorm<pylith::topology::Field<pylith::topology::SubMesh> >;
-%template(MeshCellFilter) pylith::meshio::CellFilter<pylith::topology::Mesh>;
-%template(SubMeshCellFilter) pylith::meshio::CellFilter<pylith::topology::SubMesh>;
-%template(MeshCellFilterAvg) pylith::meshio::CellFilterAvg<pylith::topology::Mesh>;
-%template(SubMeshCellFilterAvg) pylith::meshio::CellFilterAvg<pylith::topology::SubMesh>;
+%template(MeshCellFilter) pylith::meshio::CellFilter<pylith::topology::Mesh, pylith::topology::Field<pylith::topology::Mesh> >;
+%template(SubMeshCellFilter) pylith::meshio::CellFilter<pylith::topology::SubMesh, pylith::topology::Field<pylith::topology::SubMesh> >;
+%template(MeshCellFilterAvg) pylith::meshio::CellFilterAvg<pylith::topology::Mesh, pylith::topology::Field<pylith::topology::Mesh> >;
+%template(SubMeshCellFilterAvg) pylith::meshio::CellFilterAvg<pylith::topology::SubMesh, pylith::topology::Field<pylith::topology::SubMesh> >;
-%template(MeshDataWriter) pylith::meshio::DataWriter<pylith::topology::Mesh>;
-%template(SubMeshDataWriter) pylith::meshio::DataWriter<pylith::topology::SubMesh>;
-%template(MeshDataWriterVTK) pylith::meshio::DataWriterVTK<pylith::topology::Mesh>;
-%template(SubMeshDataWriterVTK) pylith::meshio::DataWriterVTK<pylith::topology::SubMesh>;
+%template(MeshDataWriter) pylith::meshio::DataWriter<pylith::topology::Mesh, pylith::topology::Field<pylith::topology::Mesh> >;
+%template(SubMeshDataWriter) pylith::meshio::DataWriter<pylith::topology::SubMesh, pylith::topology::Field<pylith::topology::Mesh> >;
+%template(SubSubMeshDataWriter) pylith::meshio::DataWriter<pylith::topology::SubMesh, pylith::topology::Field<pylith::topology::SubMesh> >;
-%template(MeshOutputManager) pylith::meshio::OutputManager<pylith::topology::Mesh>;
-%template(SubMeshOutputManager) pylith::meshio::OutputManager<pylith::topology::SubMesh>;
+%template(MeshDataWriterVTK) pylith::meshio::DataWriterVTK<pylith::topology::Mesh, pylith::topology::Field<pylith::topology::Mesh> >;
+%template(SubMeshDataWriterVTK) pylith::meshio::DataWriterVTK<pylith::topology::SubMesh, pylith::topology::Field<pylith::topology::Mesh> >;
+%template(SubSubMeshDataWriterVTK) pylith::meshio::DataWriterVTK<pylith::topology::SubMesh, pylith::topology::Field<pylith::topology::SubMesh> >;
+
+%template(MeshOutputManager) pylith::meshio::OutputManager<pylith::topology::Mesh, pylith::topology::Field<pylith::topology::Mesh> >;
+
// End of file
More information about the CIG-COMMITS
mailing list