[cig-commits] r5191 - in short/3D/PyLith/trunk: libsrc/meshio
modulesrc/meshio
brad at geodynamics.org
brad at geodynamics.org
Mon Nov 6 20:24:26 PST 2006
Author: brad
Date: 2006-11-06 20:24:26 -0800 (Mon, 06 Nov 2006)
New Revision: 5191
Modified:
short/3D/PyLith/trunk/libsrc/meshio/Makefile.am
short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc
short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.hh
short/3D/PyLith/trunk/modulesrc/meshio/meshio.pyxe
Log:
Fixed misc trivial compilation problems with MeshIO. Updated module to sync with C++ interface for MeshIO.
Modified: short/3D/PyLith/trunk/libsrc/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/Makefile.am 2006-11-07 02:30:04 UTC (rev 5190)
+++ short/3D/PyLith/trunk/libsrc/meshio/Makefile.am 2006-11-07 04:24:26 UTC (rev 5191)
@@ -16,12 +16,12 @@
lib_LTLIBRARIES = libpylithmeshio.la
libpylithmeshio_la_SOURCES = \
- MeshIO.cc
+ MeshIO.cc \
MeshIOAscii.cc
subpkginclude_HEADERS = \
MeshIO.hh \
- MeshIO.icc
+ MeshIO.icc \
MeshIOAscii.hh \
MeshIOAscii.icc
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc 2006-11-07 02:30:04 UTC (rev 5190)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc 2006-11-07 04:24:26 UTC (rev 5191)
@@ -85,31 +85,31 @@
useIndexZero(false);
} else if (0 == strcasecmp(token.c_str(), "vertices")) {
filein.ignore(maxIgnore, '{');
- _readVertices(filein, &coordinates, &numVertices, &numDims);
+ _readVertices(filein, &coordinates, &numVertices, &spaceDim);
readVertices = true;
} else if (0 == strcasecmp(token.c_str(), "cells")) {
filein.ignore(maxIgnore, '{');
_readCells(filein, &cells, &numCells, &numCorners);
readCells = true;
} else if (0 == strcasecmp(token.c_str(), "group")) {
- if (!builtTopology)
+ if (!builtMesh)
throw std::runtime_error("Both 'vertices' and 'cells' must "
"precede any groups in mesh file.");
filein.ignore(maxIgnore, '{');
- _readGroup(filein, mesh);
+ //_readGroup(filein, mesh);
} else {
std::ostringstream msg;
msg << "Could not parse '" << token << "' into a mesh setting.";
throw std::runtime_error(msg.str());
} // else
- if (readDim && readCells && readVertices && !builtTopology) {
+ if (readDim && readCells && readVertices && !builtMesh) {
// Can now build mesh
_buildMesh(coordinates, numVertices, spaceDim,
cells, numCells, numCorners, meshDim);
delete[] coordinates; coordinates = 0;
delete[] cells; cells = 0;
- builtTopology = true;
+ builtMesh = true;
} // if
filein >> token;
@@ -120,7 +120,7 @@
// ----------------------------------------------------------------------
// Write mesh to file.
void
-pylith::meshio::MeshIOAscii::_write(void)
+pylith::meshio::MeshIOAscii::_write(void) const
{ // write
std::ofstream fileout(_filename.c_str());
if (!fileout.is_open() || !fileout.good()) {
Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.hh 2006-11-07 02:30:04 UTC (rev 5190)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.hh 2006-11-07 04:24:26 UTC (rev 5191)
@@ -16,13 +16,15 @@
#include <iosfwd> // USES std::istream, std::ostream
#include <string> // HASA std::string
+#include "MeshIO.hh"
+
namespace pylith {
namespace meshio {
class MeshIOAscii;
} // meshio
} // pylith
-class pylith::meshio::MeshIOAscii : public pylith::meshio::MeshIO
+class pylith::meshio::MeshIOAscii : public MeshIO
{ // MeshIOAscii
// PUBLIC METHODS -------------------------------------------------------
public :
Modified: short/3D/PyLith/trunk/modulesrc/meshio/meshio.pyxe
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/meshio.pyxe 2006-11-07 02:30:04 UTC (rev 5190)
+++ short/3D/PyLith/trunk/modulesrc/meshio/meshio.pyxe 2006-11-07 04:24:26 UTC (rev 5191)
@@ -51,7 +51,7 @@
return
- def read(self, interpolate):
+ def read(self):
"""
Read mesh from file.
@@ -59,15 +59,15 @@
topology elements.
"""
# create shim for method 'read'
- #embed{ void MeshIO_read(void* pObj, void** ppMeshObj, int interpolate)
+ #embed{ void MeshIO_read(void* pObj, void** ppMeshObj)
ALE::Obj<ALE::Mesh>* pMesh = new ALE::Obj<ALE::Mesh>;
- ((pylith::meshio::MeshIO*) pObj)->read(*pMesh, interpolate);
+ ((pylith::meshio::MeshIO*) pObj)->read(pMesh);
*ppMeshObj = (void*) pMesh;
#}embed
cdef void* pMeshObj
pMeshObj = NULL
- MeshIO_read(self.thisptr, &pMeshObj, interpolate)
+ MeshIO_read(self.thisptr, &pMeshObj)
return PyCObject_FromVoidPtr(pMeshObj, ALEMesh_destructor)
@@ -78,7 +78,7 @@
# create shim for method 'write'
#embed{ void MeshIO_write(void* pObj, void* pMeshObj)
ALE::Obj<ALE::Mesh>* pMesh = (ALE::Obj<ALE::Mesh>*) pMeshObj;
- ((pylith::meshio::MeshIO*) pObj)->write(*pMesh);
+ ((pylith::meshio::MeshIO*) pObj)->write(pMesh);
#}embed
cdef void* pMeshObj
pMeshObj = <void*> PyCObject_AsVoidPtr(mesh)
More information about the cig-commits
mailing list