[MOAB-dev] r2303 - in MOAB/trunk: . parallel

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Dec 3 12:15:50 CST 2008


Author: kraftche
Date: 2008-12-03 12:15:50 -0600 (Wed, 03 Dec 2008)
New Revision: 2303

Modified:
   MOAB/trunk/MBWriterIface.hpp
   MOAB/trunk/WriteAns.cpp
   MOAB/trunk/WriteAns.hpp
   MOAB/trunk/WriteGMV.cpp
   MOAB/trunk/WriteGMV.hpp
   MOAB/trunk/WriteHDF5.cpp
   MOAB/trunk/WriteHDF5.hpp
   MOAB/trunk/WriteNCDF.cpp
   MOAB/trunk/WriteNCDF.hpp
   MOAB/trunk/WriteSLAC.cpp
   MOAB/trunk/WriteSLAC.hpp
   MOAB/trunk/WriteSTL.cpp
   MOAB/trunk/WriteSTL.hpp
   MOAB/trunk/WriteTemplate.cpp
   MOAB/trunk/WriteTemplate.hpp
   MOAB/trunk/WriteVtk.cpp
   MOAB/trunk/WriteVtk.hpp
   MOAB/trunk/parallel/WriteHDF5Parallel.cpp
   MOAB/trunk/parallel/WriteHDF5Parallel.hpp
Log:
make qa_list argument to writers const

Modified: MOAB/trunk/MBWriterIface.hpp
===================================================================
--- MOAB/trunk/MBWriterIface.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/MBWriterIface.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -60,7 +60,7 @@
                                     const FileOptions& opts,
                                     const MBEntityHandle* meshset_list,
                                     const int num_sets,
-                                    std::vector<std::string>& qa_records,
+                                    const std::vector<std::string>& qa_records,
                                     int requested_output_dimension = 0 ) = 0;
 };
 

Modified: MOAB/trunk/WriteAns.cpp
===================================================================
--- MOAB/trunk/WriteAns.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteAns.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -90,7 +90,7 @@
                                       const FileOptions&,
                                       const MBEntityHandle *ent_handles,
                                       const int num_sets,
-                                      std::vector<std::string>&, int )
+                                      const std::vector<std::string>&, int )
 {
   assert(0 != mMaterialSetTag &&
          0 != mNeumannSetTag &&

Modified: MOAB/trunk/WriteAns.hpp
===================================================================
--- MOAB/trunk/WriteAns.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteAns.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -62,7 +62,7 @@
                          const FileOptions& opts,
                           const MBEntityHandle *output_list,
                           const int num_sets,
-                          std::vector<std::string>& qa_list,
+                          const std::vector<std::string>& qa_list,
                           int export_dimension);
   
 //! struct used to hold data for each block to be output; used by

Modified: MOAB/trunk/WriteGMV.cpp
===================================================================
--- MOAB/trunk/WriteGMV.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteGMV.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -135,7 +135,7 @@
                                   const FileOptions& opts,
                                   const MBEntityHandle* output_sets,
                                   const int num_output_sets,
-                                  std::vector<std::string>& ,
+                                  const std::vector<std::string>& ,
                                   int dimension )
 {
   MBEntityHandle output_set = 0;

Modified: MOAB/trunk/WriteGMV.hpp
===================================================================
--- MOAB/trunk/WriteGMV.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteGMV.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -52,7 +52,7 @@
                           const FileOptions& opts,
                           const MBEntityHandle* output_sets,
                           const int num_output_sets,
-                          std::vector<std::string>& qa_list,
+                          const std::vector<std::string>& qa_list,
                           int requested_dimension );
 
     //! writes out a mesh file

Modified: MOAB/trunk/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/WriteHDF5.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteHDF5.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -329,7 +329,7 @@
                                    const FileOptions& opts,
                                    const MBEntityHandle* set_array,
                                    const int num_sets,
-                                   std::vector<std::string>& qa_records,
+                                   const std::vector<std::string>& qa_records,
                                    int user_dimension )
 {
   mhdf_Status status;
@@ -384,7 +384,7 @@
                                         const FileOptions& opts,
                                         const MBEntityHandle* set_array,
                                         const int num_sets,
-                                        std::vector<std::string>& qa_records,
+                                        const std::vector<std::string>& qa_records,
                                         int user_dimension )
 {
   MBErrorCode result;
@@ -1822,7 +1822,7 @@
   return MB_SUCCESS;
 }
 
-MBErrorCode WriteHDF5::write_qa( std::vector<std::string>& list )
+MBErrorCode WriteHDF5::write_qa( const std::vector<std::string>& list )
 {
   const char* app = "MOAB";
   const char* vers = MB_VERSION;
@@ -2019,7 +2019,7 @@
   // then MOAB was not built with support for parallel HDF5 I/O.
 MBErrorCode WriteHDF5::parallel_create_file( const char* ,
                                     bool ,
-                                    std::vector<std::string>& ,
+                                    const std::vector<std::string>& ,
                                     int ,
                                     int  )
 {
@@ -2028,7 +2028,7 @@
 
 MBErrorCode WriteHDF5::serial_create_file( const char* filename,
                                     bool overwrite,
-                                    std::vector<std::string>& qa_records,
+                                    const std::vector<std::string>& qa_records,
                                     int dimension )
 {
   long first_id;

Modified: MOAB/trunk/WriteHDF5.hpp
===================================================================
--- MOAB/trunk/WriteHDF5.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteHDF5.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -65,7 +65,7 @@
                           const FileOptions& opts,
                           const MBEntityHandle* export_sets,
                           const int export_set_count,
-                          std::vector<std::string>& qa_records,
+                          const std::vector<std::string>& qa_records,
                           int user_dimension = 3 );
 
   /** Create attributes holding the HDF5 type handle for the 
@@ -77,7 +77,7 @@
   
   MBErrorCode serial_create_file( const char* filename,
                                   bool overwrite,
-                                  std::vector<std::string>& qa_records,
+                                  const std::vector<std::string>& qa_records,
                                   int dimension = 3 );
 
   /** Function to create the file.  Virtual to allow override
@@ -85,7 +85,7 @@
    */
   virtual MBErrorCode parallel_create_file( const char* filename,
                                             bool overwrite,
-                                            std::vector<std::string>& qa_records,
+                                            const std::vector<std::string>& qa_records,
                                             int dimension = 3,
                                             int pcomm_no = 0 );
 
@@ -147,7 +147,7 @@
                                  long parents_length );
 
   //! Write exodus-type QA info
-  MBErrorCode write_qa( std::vector<std::string>& list );
+  MBErrorCode write_qa( const std::vector<std::string>& list );
 
 
   //! Range of entities, grouped by type, to export 
@@ -252,7 +252,7 @@
                                const FileOptions& opts,
                                const MBEntityHandle* export_sets,
                                const int export_set_count,
-                               std::vector<std::string>& qa_records,
+                               const std::vector<std::string>& qa_records,
                                int user_dimension = 3 );
 
   MBErrorCode init();

Modified: MOAB/trunk/WriteNCDF.cpp
===================================================================
--- MOAB/trunk/WriteNCDF.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteNCDF.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -151,7 +151,7 @@
                                     const FileOptions&,
                                     const MBEntityHandle *ent_handles,
                                     const int num_sets,
-                                    std::vector<std::string> &qa_records,
+                                    const std::vector<std::string> &qa_records,
                                     int user_dimension)
 {
   assert(0 != mMaterialSetTag &&
@@ -308,7 +308,7 @@
     return MB_FAILURE;
 
   // copy the qa records into the argument
-  mesh_info.qaRecords.swap(qa_records);
+  //mesh_info.qaRecords.swap(qa_records);
   
   return MB_SUCCESS;
 }

Modified: MOAB/trunk/WriteNCDF.hpp
===================================================================
--- MOAB/trunk/WriteNCDF.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteNCDF.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -101,7 +101,7 @@
                          const FileOptions& opts,
                           const MBEntityHandle *output_list,
                           const int num_sets,
-                          std::vector<std::string> &qa_records, 
+                          const std::vector<std::string> &qa_records, 
                           int user_dimension);
   
 protected:

Modified: MOAB/trunk/WriteSLAC.cpp
===================================================================
--- MOAB/trunk/WriteSLAC.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteSLAC.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -128,7 +128,7 @@
                                   const FileOptions&,
                                   const MBEntityHandle *ent_handles,
                                   const int num_sets,
-                                  std::vector<std::string>&, int )
+                                  const std::vector<std::string>&, int )
 {
   assert(0 != mMaterialSetTag &&
          0 != mNeumannSetTag &&

Modified: MOAB/trunk/WriteSLAC.hpp
===================================================================
--- MOAB/trunk/WriteSLAC.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteSLAC.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -64,7 +64,7 @@
                          const FileOptions& opts,
                           const MBEntityHandle *output_list,
                           const int num_sets,
-                          std::vector<std::string>& qa_list,
+                          const std::vector<std::string>& qa_list,
                           int export_dimension);
   
 //! struct used to hold data for each block to be output; used by

Modified: MOAB/trunk/WriteSTL.cpp
===================================================================
--- MOAB/trunk/WriteSTL.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteSTL.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -82,7 +82,7 @@
                                  const FileOptions& opts,
                                  const MBEntityHandle *ent_handles,
                                  const int num_sets,
-                                 std::vector<std::string>& qa_list, 
+                                 const std::vector<std::string>& qa_list, 
                                  int  )
 {
   char header[81];
@@ -183,12 +183,13 @@
   return result;
 }
 
-MBErrorCode WriteSTL::make_header( char header[81], std::vector<std::string>& qa_list )
+MBErrorCode WriteSTL::make_header( char header[81], 
+                                   const std::vector<std::string>& qa_list )
 {
   memset( header, 0, 81 );
   
   std::string result;
-  for (std::vector<std::string>::iterator i = qa_list.begin(); i != qa_list.end(); ++i)
+  for (std::vector<std::string>::const_iterator i = qa_list.begin(); i != qa_list.end(); ++i)
   {
     result += " ";
     result += *i;

Modified: MOAB/trunk/WriteSTL.hpp
===================================================================
--- MOAB/trunk/WriteSTL.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteSTL.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -59,7 +59,7 @@
                          const FileOptions& opts,
                          const MBEntityHandle *output_list,
                          const int num_sets,
-                         std::vector<std::string>& qa_list,
+                         const std::vector<std::string>& qa_list,
                          int export_dimension);  
 
 protected:
@@ -94,7 +94,7 @@
 
     //! Construct 80-byte, null-terminated description string from
     //! qa_list.  Unused space in header will be null-char padded.
-  MBErrorCode make_header( char header[82], std::vector<std::string>& qa_list );
+  MBErrorCode make_header( char header[82], const std::vector<std::string>& qa_list );
   
     //! Get triangles to write from input array of entity sets.  If
     //! no sets, gets all triangles.

Modified: MOAB/trunk/WriteTemplate.cpp
===================================================================
--- MOAB/trunk/WriteTemplate.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteTemplate.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -122,7 +122,7 @@
                                       const FileOptions& opts,
                                       const MBEntityHandle *ent_handles,
                                       const int num_sets,
-                                      std::vector<std::string>&, int )
+                                      const std::vector<std::string>&, int )
 {
   assert(0 != mMaterialSetTag &&
          0 != mNeumannSetTag &&

Modified: MOAB/trunk/WriteTemplate.hpp
===================================================================
--- MOAB/trunk/WriteTemplate.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteTemplate.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -63,7 +63,7 @@
                          const FileOptions& opts,
                           const MBEntityHandle *output_list,
                           const int num_sets,
-                          std::vector<std::string>& qa_list,
+                          const std::vector<std::string>& qa_list,
                           int export_dimension);
   
 //! struct used to hold data for each block to be output; used by

Modified: MOAB/trunk/WriteVtk.cpp
===================================================================
--- MOAB/trunk/WriteVtk.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteVtk.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -79,7 +79,7 @@
                                  const FileOptions& opts,
                                  const MBEntityHandle *output_list,
                                  const int num_sets,
-                                 std::vector<std::string>& ,
+                                 const std::vector<std::string>& ,
                                  int )
 {
   MBErrorCode rval;

Modified: MOAB/trunk/WriteVtk.hpp
===================================================================
--- MOAB/trunk/WriteVtk.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/WriteVtk.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -44,7 +44,7 @@
                          const FileOptions& opts,
                          const MBEntityHandle *output_list,
                          const int num_sets,
-                         std::vector<std::string>& qa_list,
+                         const std::vector<std::string>& qa_list,
                          int export_dimension);
 
 private:

Modified: MOAB/trunk/parallel/WriteHDF5Parallel.cpp
===================================================================
--- MOAB/trunk/parallel/WriteHDF5Parallel.cpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/parallel/WriteHDF5Parallel.cpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -353,7 +353,7 @@
 
 MBErrorCode WriteHDF5Parallel::parallel_create_file( const char* filename,
                                             bool overwrite,
-                                            std::vector<std::string>& qa_records,
+                                            const std::vector<std::string>& qa_records,
                                             int dimension,
                                             int pcomm_no)
 {

Modified: MOAB/trunk/parallel/WriteHDF5Parallel.hpp
===================================================================
--- MOAB/trunk/parallel/WriteHDF5Parallel.hpp	2008-12-03 17:29:55 UTC (rev 2302)
+++ MOAB/trunk/parallel/WriteHDF5Parallel.hpp	2008-12-03 18:15:50 UTC (rev 2303)
@@ -102,7 +102,7 @@
       //! necessary data for parallel write.
     virtual MBErrorCode parallel_create_file( const char* filename,
                                      bool overwrite,
-                                     std::vector<std::string>& qa_records,
+                                     const std::vector<std::string>& qa_records,
                                      int dimension = 3,
                                      int pcomm_no = 0);
     




More information about the moab-dev mailing list