[cig-commits] r6852 - in short/3D/PyLith/trunk/libsrc: . meshio

brad at geodynamics.org brad at geodynamics.org
Thu May 10 21:45:20 PDT 2007


Author: brad
Date: 2007-05-10 21:45:20 -0700 (Thu, 10 May 2007)
New Revision: 6852

Added:
   short/3D/PyLith/trunk/libsrc/meshio/SolutionIO.cc
   short/3D/PyLith/trunk/libsrc/meshio/SolutionIO.hh
   short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.cc
   short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.hh
Modified:
   short/3D/PyLith/trunk/libsrc/Makefile.am
   short/3D/PyLith/trunk/libsrc/meshio/Makefile.am
Log:
Started work on C++ code for SolutionIO.

Modified: short/3D/PyLith/trunk/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/Makefile.am	2007-05-11 02:02:00 UTC (rev 6851)
+++ short/3D/PyLith/trunk/libsrc/Makefile.am	2007-05-11 04:45:20 UTC (rev 6852)
@@ -59,7 +59,8 @@
 	meshio/MeshIOLagrit.cc \
 	meshio/PsetFile.cc \
 	meshio/PsetFileAscii.cc \
-	meshio/PsetFileBinary.cc
+	meshio/PsetFileBinary.cc \
+	meshio/SolutionIO.cc
 
 if ENABLE_CUBIT
   libpylith_la_SOURCES += \

Modified: short/3D/PyLith/trunk/libsrc/meshio/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/Makefile.am	2007-05-11 02:02:00 UTC (rev 6851)
+++ short/3D/PyLith/trunk/libsrc/meshio/Makefile.am	2007-05-11 04:45:20 UTC (rev 6852)
@@ -19,7 +19,8 @@
 	MeshIOAscii.hh \
 	MeshIOAscii.icc \
 	MeshIOLagrit.hh \
-	MeshIOLagrit.icc
+	MeshIOLagrit.icc \
+	SolutionIO.hh
 
 if ENABLE_CUBIT
   subpkginclude_HEADERS += \

Added: short/3D/PyLith/trunk/libsrc/meshio/SolutionIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/SolutionIO.cc	2007-05-11 02:02:00 UTC (rev 6851)
+++ short/3D/PyLith/trunk/libsrc/meshio/SolutionIO.cc	2007-05-11 04:45:20 UTC (rev 6852)
@@ -0,0 +1,30 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include <portinfo>
+
+#include "SolutionIO.hh" // implementation of class methods
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::meshio::SolutionIO::SolutionIO(void)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::meshio::SolutionIO::~SolutionIO(void)
+{ // destructor
+} // destructor  
+
+
+// End of file 

Added: short/3D/PyLith/trunk/libsrc/meshio/SolutionIO.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/SolutionIO.hh	2007-05-11 02:02:00 UTC (rev 6851)
+++ short/3D/PyLith/trunk/libsrc/meshio/SolutionIO.hh	2007-05-11 04:45:20 UTC (rev 6852)
@@ -0,0 +1,47 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_solutionio_solutionio_hh)
+#define pylith_solutionio_solutionio_hh
+
+#include "pylith/utils/sievefwd.hh" // USES ALE::Obj, ALE::Mesh
+
+namespace pylith {
+  namespace meshio {
+    class SolutionIO;
+  } // meshio
+} // pylith
+
+class pylith::meshio::SolutionIO
+{ // SolutionIO
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public :
+  /// Constructor
+  SolutionIO(void);
+
+  /// Destructor
+  virtual
+  ~SolutionIO(void);
+
+  /** Write solution to file.
+   *
+   * @param mesh PETSc mesh object
+   */
+  virtual
+  void write(const ALE::Obj<ALE::Mesh>& mesh) = 0;
+
+}; // SolutionIO
+
+#endif // pylith_solutionio_solutionio_hh
+
+// End of file 

Added: short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.cc	2007-05-11 02:02:00 UTC (rev 6851)
+++ short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.cc	2007-05-11 04:45:20 UTC (rev 6852)
@@ -0,0 +1,30 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#include <portinfo>
+
+#include "SolutionIOVTK.hh" // implementation of class methods
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::meshio::SolutionIOVTK::SolutionIOVTK(void)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::meshio::SolutionIOVTK::~SolutionIOVTK(void)
+{ // destructor
+} // destructor  
+
+
+// End of file 

Added: short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.hh	2007-05-11 02:02:00 UTC (rev 6851)
+++ short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.hh	2007-05-11 04:45:20 UTC (rev 6852)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+//                           Brad T. Aagaard
+//                        U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+#if !defined(pylith_solutionio_solutioniovtk_hh)
+#define pylith_solutionio_solutioniovtk_hh
+
+#include "SolutionIO.hh" // ISA SolutionIO
+
+namespace pylith {
+  namespace meshio {
+    class SolutionIOVTK;
+  } // meshio
+} // pylith
+
+class pylith::meshio::SolutionIOVTK : public SolutionIO
+{ // SolutionIOVTK
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+
+  /// Constructor
+  SolutionIOVTK(void);
+
+  /// Destructor
+  virtual
+  ~SolutionIOVTK(void);
+
+  /** Set filename for VTK file.
+   *
+   * @param filename Name of VTK file.
+   */
+  void filename(const char* filename);
+
+  /** Write solution to file.
+   *
+   * @param mesh PETSc mesh object
+   */
+  void write(const ALE::Obj<ALE::Mesh>& mesh);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+public :
+
+  std::string _filename; ///< Name of VTK file.
+
+}; // SolutionIOVTK
+
+#endif // pylith_solutionio_solutioniovtk_hh
+
+// End of file 



More information about the cig-commits mailing list