[MOAB-dev] commit/MOAB: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Jun 5 13:09:37 CDT 2013


3 new commits in MOAB:

https://bitbucket.org/fathomteam/moab/commits/830bae48d199/
Changeset:   830bae48d199
Branch:      None
User:        danwu
Date:        2013-06-05 18:53:12
Summary:     Merged fathomteam/moab into master
Affected #:  1 file

diff --git a/config/compiler.m4 b/config/compiler.m4
index 81596a6..6a7e2ed 100644
--- a/config/compiler.m4
+++ b/config/compiler.m4
@@ -102,15 +102,27 @@ if test "xno" != "x$WITH_MPI"; then
   DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --with-mpi=\"${withval}\""
   
   if test "xyes" == "x$WITH_MPI"; then
+    if test "xno" != "x$CHECK_CC"; then  
     FATHOM_SET_MPI_COMPILER([CC],  [$CC_LIST])
+    fi
+    if test "xno" != "x$CHECK_CXX"; then  
     FATHOM_SET_MPI_COMPILER([CXX],[$CXX_LIST])
-    FATHOM_SET_MPI_COMPILER([FC],  [$FC_LIST])
-    FATHOM_SET_MPI_COMPILER([F77],[$F77_LIST])
+    fi
+    if test "xno" != "x$CHECK_FC"; then  
+      FATHOM_SET_MPI_COMPILER([FC],  [$FC_LIST])
+      FATHOM_SET_MPI_COMPILER([F77],[$F77_LIST])
+    fi
   else
+    if test "xno" != "x$CHECK_CC"; then  
     FATHOM_SET_MPI_COMPILER([CC],  [$CC_LIST],[${WITH_MPI}/bin])
+    fi
+    if test "xno" != "x$CHECK_CXX"; then  
     FATHOM_SET_MPI_COMPILER([CXX],[$CXX_LIST],[${WITH_MPI}/bin])
-    FATHOM_SET_MPI_COMPILER([FC],  [$FC_LIST],[${WITH_MPI}/bin])
-    FATHOM_SET_MPI_COMPILER([F77],[$F77_LIST],[${WITH_MPI}/bin])
+    fi
+    if test "xno" != "x$CHECK_FC"; then
+      FATHOM_SET_MPI_COMPILER([FC],  [$FC_LIST],[${WITH_MPI}/bin])
+      FATHOM_SET_MPI_COMPILER([F77],[$F77_LIST],[${WITH_MPI}/bin])
+    fi
     WITH_MPI=yes
   fi
 fi


https://bitbucket.org/fathomteam/moab/commits/616f193a6bae/
Changeset:   616f193a6bae
Branch:      None
User:        danwu
Date:        2013-06-05 19:51:28
Summary:     Small changes after refactoring of ReadNC class

Affected #:  4 files

diff --git a/src/io/NCHelperEuler.cpp b/src/io/NCHelperEuler.cpp
index 9346d22..a01d4b8 100644
--- a/src/io/NCHelperEuler.cpp
+++ b/src/io/NCHelperEuler.cpp
@@ -19,7 +19,7 @@ bool NCHelperEuler::can_read_file(ReadNC* readNC, int fileId)
 
   // If dimension names "lon" AND "lat' exist then it could be either the Eulerian Spectral grid or the FV grid
   if ((std::find(dimNames.begin(), dimNames.end(), std::string("lon")) != dimNames.end()) && (std::find(dimNames.begin(),
-    dimNames.end(), std::string("lat")) != dimNames.end())) {
+      dimNames.end(), std::string("lat")) != dimNames.end())) {
     // If dimension names "lon" AND "lat" AND "slon" AND "slat" exist then it should be the FV grid
     if ((std::find(dimNames.begin(), dimNames.end(), std::string("slon")) != dimNames.end()) && (std::find(dimNames.begin(),
         dimNames.end(), std::string("slat")) != dimNames.end()))

diff --git a/src/io/NCHelperFV.cpp b/src/io/NCHelperFV.cpp
index b086102..566b719 100644
--- a/src/io/NCHelperFV.cpp
+++ b/src/io/NCHelperFV.cpp
@@ -19,7 +19,7 @@ bool NCHelperFV::can_read_file(ReadNC* readNC, int fileId)
       dimNames.end(), std::string("lat")) != dimNames.end()) && (std::find(dimNames.begin(), dimNames.end(), std::string("slon"))
       != dimNames.end()) && (std::find(dimNames.begin(), dimNames.end(), std::string("slat")) != dimNames.end())) {
     // Make sure it is CAM grid
-	std::map<std::string, ReadNC::AttData>::iterator attIt = readNC->globalAtts.find("source");
+    std::map<std::string, ReadNC::AttData>::iterator attIt = readNC->globalAtts.find("source");
     if (attIt == readNC->globalAtts.end()) {
       readNC->readMeshIface->report_error("%s", "File does not have source global attribute.");
       return false;

diff --git a/src/io/ReadNC.cpp b/src/io/ReadNC.cpp
index 8c77431..514f724 100644
--- a/src/io/ReadNC.cpp
+++ b/src/io/ReadNC.cpp
@@ -41,7 +41,7 @@ ReadNC::ReadNC(Interface* impl) :
 #ifdef USE_MPI
   myPcomm(NULL), 
 #endif
-  noMesh(false), noVars(false), spectralMesh(false), helper(NULL)
+  noMesh(false), noVars(false), spectralMesh(false), myHelper(NULL)
 {
   assert(impl != NULL);
 
@@ -90,8 +90,8 @@ void ReadNC::reset() {
 
 ReadNC::~ReadNC() {
   mbImpl->release_interface(readMeshIface);
-  if (helper != NULL)
-    delete helper;
+  if (myHelper != NULL)
+    delete myHelper;
 }
 
 ErrorCode ReadNC::load_file(const char *file_name, const EntityHandle* file_set, const FileOptions& opts,
@@ -194,15 +194,15 @@ ErrorCode ReadNC::load_file(const char *file_name, const EntityHandle* file_set,
     ERRORR(MB_FAILURE, "File not following known conventions.");
   }
 
-  if (helper != NULL)
-    delete helper;
+  if (myHelper != NULL)
+    delete myHelper;
 
-  helper = NCHelper::get_nc_helper(this, fileId, opts);
-  if (helper == NULL) {
+  myHelper = NCHelper::get_nc_helper(this, fileId, opts);
+  if (myHelper == NULL) {
     ERRORR(MB_FAILURE, "Failed to get NCHelper class instance.");
   }
 
-  rval = helper->init_mesh_vals(opts, tmp_set);
+  rval = myHelper->init_mesh_vals(opts, tmp_set);
   ERRORR(rval, "Trouble initializing mesh values.");
 
   // Create mesh vertex/quads sequences
@@ -212,15 +212,15 @@ ErrorCode ReadNC::load_file(const char *file_name, const EntityHandle* file_set,
     ERRORR(rval, "Mesh characteristics didn't match from last read.\n");
   }
   else if (!noMesh) {
-    rval = helper->create_verts_quads(scdi, opts, tmp_set, quads);
+    rval = myHelper->create_verts_quads(scdi, opts, tmp_set, quads);
     ERRORR(rval, "Trouble creating vertices and quads.");
   }
 
-  bool scdMesh = helper->is_scd_mesh();
+  bool scd_mesh = myHelper->is_scd_mesh();
 
   // Read variables onto grid
   if (!noVars) {
-    rval = read_variables(tmp_set, var_names, tstep_nums, scdMesh);
+    rval = read_variables(tmp_set, var_names, tstep_nums, scd_mesh);
     if (MB_FAILURE == rval)
       return rval;
   }
@@ -232,7 +232,7 @@ ErrorCode ReadNC::load_file(const char *file_name, const EntityHandle* file_set,
       if (mit != varInfo.end())
         filteredDimNames.push_back(dimNames[i]);
     }
-    rval = read_variables(tmp_set, filteredDimNames, tstep_nums, scdMesh);
+    rval = read_variables(tmp_set, filteredDimNames, tstep_nums, scd_mesh);
     if (MB_FAILURE == rval)
       return rval;
   }
@@ -593,10 +593,10 @@ ErrorCode ReadNC::create_scd_verts_quads(ScdInterface *scdi, EntityHandle tmp_se
 }
 
 ErrorCode ReadNC::read_variable_setup(std::vector<std::string> &var_names, std::vector<int> &tstep_nums,
-    std::vector<VarData> &vdatas, std::vector<VarData> &vsetdatas, bool scdMesh) {
+    std::vector<VarData> &vdatas, std::vector<VarData> &vsetdatas, bool scd_mesh) {
   std::map<std::string, VarData>::iterator mit;
 
-  if (scdMesh) { // scd mesh
+  if (scd_mesh) { // scd mesh
     // if empty read them all
     if (var_names.empty()) {
       for (mit = varInfo.begin(); mit != varInfo.end(); mit++) {
@@ -697,7 +697,7 @@ ErrorCode ReadNC::read_variable_setup(std::vector<std::string> &var_names, std::
   return MB_SUCCESS;
 }
 
-ErrorCode ReadNC::read_variable_allocate(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scdMesh) {
+ErrorCode ReadNC::read_variable_allocate(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scd_mesh) {
   ErrorCode rval = MB_SUCCESS;
 
   std::vector<EntityHandle>* ehandles = NULL;
@@ -795,7 +795,7 @@ ErrorCode ReadNC::read_variable_allocate(EntityHandle file_set, std::vector<VarD
       switch (vdatas[i].entLoc) {
         case 0:
           // vertices
-          if (scdMesh) {
+          if (scd_mesh) {
             // only structured mesh has j parameter that multiplies i to get total # vertices
             vdatas[i].readDims[t].push_back(lDims[1]);
             vdatas[i].readCounts[t].push_back(lDims[4] - lDims[1] + 1);
@@ -897,33 +897,33 @@ ErrorCode ReadNC::read_variable_allocate(EntityHandle file_set, std::vector<VarD
   return rval;
 }
 
-ErrorCode ReadNC::read_variables(EntityHandle file_set, std::vector<std::string> &var_names, std::vector<int> &tstep_nums, bool scdMesh) {
+ErrorCode ReadNC::read_variables(EntityHandle file_set, std::vector<std::string> &var_names, std::vector<int> &tstep_nums, bool scd_mesh) {
   std::vector<VarData> vdatas;
   std::vector<VarData> vsetdatas;
 
-  ErrorCode rval = read_variable_setup(var_names, tstep_nums, vdatas, vsetdatas, scdMesh);
+  ErrorCode rval = read_variable_setup(var_names, tstep_nums, vdatas, vsetdatas, scd_mesh);
   ERRORR(rval, "Trouble setting up read variable.");
 
-  if (scdMesh) {
+  if (scd_mesh) {
     // create COORDS tag for quads
     rval = create_quad_coordinate_tag(file_set);
     ERRORR(rval, "Trouble creating coordinate tags to entities quads");
   }
 
   if (!vsetdatas.empty()) {
-    rval = read_variable_to_set(file_set, vsetdatas, tstep_nums, scdMesh);
+    rval = read_variable_to_set(file_set, vsetdatas, tstep_nums, scd_mesh);
     ERRORR(rval, "Trouble read variables to set.");
   }
 
   if (!vdatas.empty()) {
 #ifdef PNETCDF_FILE
-    if (!scdMesh) // in serial, we will use the old read, everything is contiguous
+    if (!scd_mesh) // in serial, we will use the old read, everything is contiguous
       // in parallel, we will use async read in pnetcdf
       // the other mechanism is not working, forget about it
       rval = read_variable_to_nonset_async(file_set, vdatas, tstep_nums);
     else
 #endif
-      rval = read_variable_to_nonset(file_set, vdatas, tstep_nums, scdMesh);
+      rval = read_variable_to_nonset(file_set, vdatas, tstep_nums, scd_mesh);
 
     ERRORR(rval, "Trouble read variables to entities verts/edges/quads.");
   }
@@ -1011,7 +1011,7 @@ ErrorCode ReadNC::read_variable_to_set_allocate(std::vector<VarData> &vdatas, st
   return rval;
 }
 
-ErrorCode ReadNC::read_variable_to_set(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scdMesh) {
+ErrorCode ReadNC::read_variable_to_set(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scd_mesh) {
   ErrorCode rval = read_variable_to_set_allocate(vdatas, tstep_nums);
   ERRORR(rval, "Trouble allocating read variables to set.");
 
@@ -1075,7 +1075,7 @@ ErrorCode ReadNC::read_variable_to_set(EntityHandle file_set, std::vector<VarDat
   for (unsigned int i = 0; i < vdatas.size(); i++) {
     for (unsigned int t = 0; t < tstep_nums.size(); t++) {
       dbgOut.tprintf(2, "Converting variable %s, time step %d\n", vdatas[i].varName.c_str(), tstep_nums[t]);
-      ErrorCode tmp_rval = convert_variable(vdatas[i], t, scdMesh);
+      ErrorCode tmp_rval = convert_variable(vdatas[i], t, scd_mesh);
       if (MB_SUCCESS != tmp_rval)
         rval = tmp_rval;
       if (vdatas[i].varDims.size() <= 1)
@@ -1104,8 +1104,8 @@ ErrorCode ReadNC::read_variable_to_set(EntityHandle file_set, std::vector<VarDat
   return rval;
 }
 
-ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scdMesh) {
-  ErrorCode rval = read_variable_allocate(file_set, vdatas, tstep_nums, scdMesh);
+ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scd_mesh) {
+  ErrorCode rval = read_variable_allocate(file_set, vdatas, tstep_nums, scd_mesh);
   ERRORR(rval, "Trouble allocating read variables.");
 
   // finally, read into that space
@@ -1116,7 +1116,7 @@ ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<Var
       void *data = vdatas[i].varDatas[t];
       std::size_t sz = 1;
       size_t ni = vdatas[i].readCounts[t][2], nj = vdatas[i].readCounts[t][3], nk = vdatas[i].readCounts[t][1];
-      if (scdMesh) {
+      if (scd_mesh) {
         for (std::size_t idx = 0; idx != vdatas[i].readCounts[t].size(); ++idx)
           sz *= vdatas[i].readCounts[t][idx];
       }
@@ -1158,7 +1158,7 @@ ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<Var
         case NC_FLOAT: {
           std::vector<float> tmpfloatdata(sz);
 
-          if (scdMesh)
+          if (scd_mesh)
           {
             success = NCFUNCAG(_vara_float)(fileId, vdatas[i].varId, &vdatas[i].readDims[t][0], &vdatas[i].readCounts[t][0],
                 &tmpfloatdata[0] NCREQ);
@@ -1252,7 +1252,7 @@ ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<Var
   for (unsigned int i = 0; i < vdatas.size(); i++) {
     for (unsigned int t = 0; t < tstep_nums.size(); t++) {
       dbgOut.tprintf(2, "Converting variable %s, time step %d\n", vdatas[i].varName.c_str(), tstep_nums[t]);
-      ErrorCode tmp_rval = convert_variable(vdatas[i], t, scdMesh);
+      ErrorCode tmp_rval = convert_variable(vdatas[i], t, scd_mesh);
       if (MB_SUCCESS != tmp_rval)
         rval = tmp_rval;
     }
@@ -1440,12 +1440,12 @@ ErrorCode ReadNC::read_variable_to_nonset_async(EntityHandle file_set, std::vect
 }
 #endif
 
-ErrorCode ReadNC::convert_variable(VarData &var_data, int tstep_num, bool scdMesh) {
+ErrorCode ReadNC::convert_variable(VarData &var_data, int tstep_num, bool scd_mesh) {
   // get ptr to tag space
   void *data = var_data.varDatas[tstep_num];
 
   std::size_t sz = 1;
-  if (scdMesh) {
+  if (scd_mesh) {
     for (std::size_t idx = 0; idx != var_data.readCounts[tstep_num].size(); ++idx)
       sz *= var_data.readCounts[tstep_num][idx];
   }
@@ -2022,7 +2022,7 @@ ErrorCode ReadNC::create_tags(ScdInterface *scdi, EntityHandle file_set, const s
   // <__MESH_TYPE>
   Tag meshTypeTag = 0;
   tag_name = "__MESH_TYPE";
-  std::string meshTypeName = helper->get_mesh_type_name();
+  std::string meshTypeName = myHelper->get_mesh_type_name();
 
   rval = mbImpl->tag_get_handle(tag_name.c_str(), 0, MB_TYPE_OPAQUE, meshTypeTag, MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_VARLEN);
   ERRORR(rval, "Trouble creating __MESH_TYPE tag.");

diff --git a/src/io/ReadNC.hpp b/src/io/ReadNC.hpp
index 87ed049..cd1ca6b 100644
--- a/src/io/ReadNC.hpp
+++ b/src/io/ReadNC.hpp
@@ -176,10 +176,10 @@ private:
                                           std::vector<int> &tstep_nums);
 
   ErrorCode read_variable_to_set(EntityHandle file_set, std::vector<VarData> &vdatas,
-				 std::vector<int> &tstep_nums, bool scdMesh); 
+				 std::vector<int> &tstep_nums, bool scd_mesh);
 
   ErrorCode read_variable_to_nonset(EntityHandle file_set, std::vector<VarData> &vdatas,
-				    std::vector<int> &tstep_nums, bool scdMesh);
+				    std::vector<int> &tstep_nums, bool scd_mesh);
 
 #ifdef PNETCDF_FILE
   ErrorCode read_variable_to_nonset_async(EntityHandle file_set, std::vector<VarData> &vdatas,
@@ -187,18 +187,18 @@ private:
 #endif
 
   ErrorCode read_variables(EntityHandle file_set, std::vector<std::string> &var_names,
-                           std::vector<int> &tstep_nums, bool scdMesh);
+                           std::vector<int> &tstep_nums, bool scd_mesh);
 
   ErrorCode read_variable_allocate(EntityHandle file_set, std::vector<VarData> &vdatas,
-                                   std::vector<int> &tstep_nums, bool scdMesh);
+                                   std::vector<int> &tstep_nums, bool scd_mesh);
 
   ErrorCode read_variable_setup(std::vector<std::string> &var_names,
                                 std::vector<int> &tstep_nums, 
                                 std::vector<VarData> &vdatas,
                                 std::vector<VarData> &vsetdatas,
-                                bool scdMesh);
+                                bool scd_mesh);
 
-  ErrorCode convert_variable(VarData &var_data, int tstep_num, bool scdMesh);
+  ErrorCode convert_variable(VarData &var_data, int tstep_num, bool scd_mesh);
 
   ErrorCode get_tag_to_set(VarData &var_data, int tstep_num, Tag &tagh);
 
@@ -387,7 +387,7 @@ private:
   std::string partitionTagName;
 
     //! Helper class instance
-  NCHelper* helper;
+  NCHelper* myHelper;
 };
 
 // inline functions


https://bitbucket.org/fathomteam/moab/commits/44c9debf15e5/
Changeset:   44c9debf15e5
Branch:      master
User:        tautges
Date:        2013-06-05 20:09:30
Summary:     Merged in danwu/moab (pull request #6)

Minor code changes for ReadNC and NCHelper
Affected #:  4 files

diff --git a/src/io/NCHelperEuler.cpp b/src/io/NCHelperEuler.cpp
index 9346d22..a01d4b8 100644
--- a/src/io/NCHelperEuler.cpp
+++ b/src/io/NCHelperEuler.cpp
@@ -19,7 +19,7 @@ bool NCHelperEuler::can_read_file(ReadNC* readNC, int fileId)
 
   // If dimension names "lon" AND "lat' exist then it could be either the Eulerian Spectral grid or the FV grid
   if ((std::find(dimNames.begin(), dimNames.end(), std::string("lon")) != dimNames.end()) && (std::find(dimNames.begin(),
-    dimNames.end(), std::string("lat")) != dimNames.end())) {
+      dimNames.end(), std::string("lat")) != dimNames.end())) {
     // If dimension names "lon" AND "lat" AND "slon" AND "slat" exist then it should be the FV grid
     if ((std::find(dimNames.begin(), dimNames.end(), std::string("slon")) != dimNames.end()) && (std::find(dimNames.begin(),
         dimNames.end(), std::string("slat")) != dimNames.end()))

diff --git a/src/io/NCHelperFV.cpp b/src/io/NCHelperFV.cpp
index b086102..566b719 100644
--- a/src/io/NCHelperFV.cpp
+++ b/src/io/NCHelperFV.cpp
@@ -19,7 +19,7 @@ bool NCHelperFV::can_read_file(ReadNC* readNC, int fileId)
       dimNames.end(), std::string("lat")) != dimNames.end()) && (std::find(dimNames.begin(), dimNames.end(), std::string("slon"))
       != dimNames.end()) && (std::find(dimNames.begin(), dimNames.end(), std::string("slat")) != dimNames.end())) {
     // Make sure it is CAM grid
-	std::map<std::string, ReadNC::AttData>::iterator attIt = readNC->globalAtts.find("source");
+    std::map<std::string, ReadNC::AttData>::iterator attIt = readNC->globalAtts.find("source");
     if (attIt == readNC->globalAtts.end()) {
       readNC->readMeshIface->report_error("%s", "File does not have source global attribute.");
       return false;

diff --git a/src/io/ReadNC.cpp b/src/io/ReadNC.cpp
index 8c77431..514f724 100644
--- a/src/io/ReadNC.cpp
+++ b/src/io/ReadNC.cpp
@@ -41,7 +41,7 @@ ReadNC::ReadNC(Interface* impl) :
 #ifdef USE_MPI
   myPcomm(NULL), 
 #endif
-  noMesh(false), noVars(false), spectralMesh(false), helper(NULL)
+  noMesh(false), noVars(false), spectralMesh(false), myHelper(NULL)
 {
   assert(impl != NULL);
 
@@ -90,8 +90,8 @@ void ReadNC::reset() {
 
 ReadNC::~ReadNC() {
   mbImpl->release_interface(readMeshIface);
-  if (helper != NULL)
-    delete helper;
+  if (myHelper != NULL)
+    delete myHelper;
 }
 
 ErrorCode ReadNC::load_file(const char *file_name, const EntityHandle* file_set, const FileOptions& opts,
@@ -194,15 +194,15 @@ ErrorCode ReadNC::load_file(const char *file_name, const EntityHandle* file_set,
     ERRORR(MB_FAILURE, "File not following known conventions.");
   }
 
-  if (helper != NULL)
-    delete helper;
+  if (myHelper != NULL)
+    delete myHelper;
 
-  helper = NCHelper::get_nc_helper(this, fileId, opts);
-  if (helper == NULL) {
+  myHelper = NCHelper::get_nc_helper(this, fileId, opts);
+  if (myHelper == NULL) {
     ERRORR(MB_FAILURE, "Failed to get NCHelper class instance.");
   }
 
-  rval = helper->init_mesh_vals(opts, tmp_set);
+  rval = myHelper->init_mesh_vals(opts, tmp_set);
   ERRORR(rval, "Trouble initializing mesh values.");
 
   // Create mesh vertex/quads sequences
@@ -212,15 +212,15 @@ ErrorCode ReadNC::load_file(const char *file_name, const EntityHandle* file_set,
     ERRORR(rval, "Mesh characteristics didn't match from last read.\n");
   }
   else if (!noMesh) {
-    rval = helper->create_verts_quads(scdi, opts, tmp_set, quads);
+    rval = myHelper->create_verts_quads(scdi, opts, tmp_set, quads);
     ERRORR(rval, "Trouble creating vertices and quads.");
   }
 
-  bool scdMesh = helper->is_scd_mesh();
+  bool scd_mesh = myHelper->is_scd_mesh();
 
   // Read variables onto grid
   if (!noVars) {
-    rval = read_variables(tmp_set, var_names, tstep_nums, scdMesh);
+    rval = read_variables(tmp_set, var_names, tstep_nums, scd_mesh);
     if (MB_FAILURE == rval)
       return rval;
   }
@@ -232,7 +232,7 @@ ErrorCode ReadNC::load_file(const char *file_name, const EntityHandle* file_set,
       if (mit != varInfo.end())
         filteredDimNames.push_back(dimNames[i]);
     }
-    rval = read_variables(tmp_set, filteredDimNames, tstep_nums, scdMesh);
+    rval = read_variables(tmp_set, filteredDimNames, tstep_nums, scd_mesh);
     if (MB_FAILURE == rval)
       return rval;
   }
@@ -593,10 +593,10 @@ ErrorCode ReadNC::create_scd_verts_quads(ScdInterface *scdi, EntityHandle tmp_se
 }
 
 ErrorCode ReadNC::read_variable_setup(std::vector<std::string> &var_names, std::vector<int> &tstep_nums,
-    std::vector<VarData> &vdatas, std::vector<VarData> &vsetdatas, bool scdMesh) {
+    std::vector<VarData> &vdatas, std::vector<VarData> &vsetdatas, bool scd_mesh) {
   std::map<std::string, VarData>::iterator mit;
 
-  if (scdMesh) { // scd mesh
+  if (scd_mesh) { // scd mesh
     // if empty read them all
     if (var_names.empty()) {
       for (mit = varInfo.begin(); mit != varInfo.end(); mit++) {
@@ -697,7 +697,7 @@ ErrorCode ReadNC::read_variable_setup(std::vector<std::string> &var_names, std::
   return MB_SUCCESS;
 }
 
-ErrorCode ReadNC::read_variable_allocate(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scdMesh) {
+ErrorCode ReadNC::read_variable_allocate(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scd_mesh) {
   ErrorCode rval = MB_SUCCESS;
 
   std::vector<EntityHandle>* ehandles = NULL;
@@ -795,7 +795,7 @@ ErrorCode ReadNC::read_variable_allocate(EntityHandle file_set, std::vector<VarD
       switch (vdatas[i].entLoc) {
         case 0:
           // vertices
-          if (scdMesh) {
+          if (scd_mesh) {
             // only structured mesh has j parameter that multiplies i to get total # vertices
             vdatas[i].readDims[t].push_back(lDims[1]);
             vdatas[i].readCounts[t].push_back(lDims[4] - lDims[1] + 1);
@@ -897,33 +897,33 @@ ErrorCode ReadNC::read_variable_allocate(EntityHandle file_set, std::vector<VarD
   return rval;
 }
 
-ErrorCode ReadNC::read_variables(EntityHandle file_set, std::vector<std::string> &var_names, std::vector<int> &tstep_nums, bool scdMesh) {
+ErrorCode ReadNC::read_variables(EntityHandle file_set, std::vector<std::string> &var_names, std::vector<int> &tstep_nums, bool scd_mesh) {
   std::vector<VarData> vdatas;
   std::vector<VarData> vsetdatas;
 
-  ErrorCode rval = read_variable_setup(var_names, tstep_nums, vdatas, vsetdatas, scdMesh);
+  ErrorCode rval = read_variable_setup(var_names, tstep_nums, vdatas, vsetdatas, scd_mesh);
   ERRORR(rval, "Trouble setting up read variable.");
 
-  if (scdMesh) {
+  if (scd_mesh) {
     // create COORDS tag for quads
     rval = create_quad_coordinate_tag(file_set);
     ERRORR(rval, "Trouble creating coordinate tags to entities quads");
   }
 
   if (!vsetdatas.empty()) {
-    rval = read_variable_to_set(file_set, vsetdatas, tstep_nums, scdMesh);
+    rval = read_variable_to_set(file_set, vsetdatas, tstep_nums, scd_mesh);
     ERRORR(rval, "Trouble read variables to set.");
   }
 
   if (!vdatas.empty()) {
 #ifdef PNETCDF_FILE
-    if (!scdMesh) // in serial, we will use the old read, everything is contiguous
+    if (!scd_mesh) // in serial, we will use the old read, everything is contiguous
       // in parallel, we will use async read in pnetcdf
       // the other mechanism is not working, forget about it
       rval = read_variable_to_nonset_async(file_set, vdatas, tstep_nums);
     else
 #endif
-      rval = read_variable_to_nonset(file_set, vdatas, tstep_nums, scdMesh);
+      rval = read_variable_to_nonset(file_set, vdatas, tstep_nums, scd_mesh);
 
     ERRORR(rval, "Trouble read variables to entities verts/edges/quads.");
   }
@@ -1011,7 +1011,7 @@ ErrorCode ReadNC::read_variable_to_set_allocate(std::vector<VarData> &vdatas, st
   return rval;
 }
 
-ErrorCode ReadNC::read_variable_to_set(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scdMesh) {
+ErrorCode ReadNC::read_variable_to_set(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scd_mesh) {
   ErrorCode rval = read_variable_to_set_allocate(vdatas, tstep_nums);
   ERRORR(rval, "Trouble allocating read variables to set.");
 
@@ -1075,7 +1075,7 @@ ErrorCode ReadNC::read_variable_to_set(EntityHandle file_set, std::vector<VarDat
   for (unsigned int i = 0; i < vdatas.size(); i++) {
     for (unsigned int t = 0; t < tstep_nums.size(); t++) {
       dbgOut.tprintf(2, "Converting variable %s, time step %d\n", vdatas[i].varName.c_str(), tstep_nums[t]);
-      ErrorCode tmp_rval = convert_variable(vdatas[i], t, scdMesh);
+      ErrorCode tmp_rval = convert_variable(vdatas[i], t, scd_mesh);
       if (MB_SUCCESS != tmp_rval)
         rval = tmp_rval;
       if (vdatas[i].varDims.size() <= 1)
@@ -1104,8 +1104,8 @@ ErrorCode ReadNC::read_variable_to_set(EntityHandle file_set, std::vector<VarDat
   return rval;
 }
 
-ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scdMesh) {
-  ErrorCode rval = read_variable_allocate(file_set, vdatas, tstep_nums, scdMesh);
+ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<VarData> &vdatas, std::vector<int> &tstep_nums, bool scd_mesh) {
+  ErrorCode rval = read_variable_allocate(file_set, vdatas, tstep_nums, scd_mesh);
   ERRORR(rval, "Trouble allocating read variables.");
 
   // finally, read into that space
@@ -1116,7 +1116,7 @@ ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<Var
       void *data = vdatas[i].varDatas[t];
       std::size_t sz = 1;
       size_t ni = vdatas[i].readCounts[t][2], nj = vdatas[i].readCounts[t][3], nk = vdatas[i].readCounts[t][1];
-      if (scdMesh) {
+      if (scd_mesh) {
         for (std::size_t idx = 0; idx != vdatas[i].readCounts[t].size(); ++idx)
           sz *= vdatas[i].readCounts[t][idx];
       }
@@ -1158,7 +1158,7 @@ ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<Var
         case NC_FLOAT: {
           std::vector<float> tmpfloatdata(sz);
 
-          if (scdMesh)
+          if (scd_mesh)
           {
             success = NCFUNCAG(_vara_float)(fileId, vdatas[i].varId, &vdatas[i].readDims[t][0], &vdatas[i].readCounts[t][0],
                 &tmpfloatdata[0] NCREQ);
@@ -1252,7 +1252,7 @@ ErrorCode ReadNC::read_variable_to_nonset(EntityHandle file_set, std::vector<Var
   for (unsigned int i = 0; i < vdatas.size(); i++) {
     for (unsigned int t = 0; t < tstep_nums.size(); t++) {
       dbgOut.tprintf(2, "Converting variable %s, time step %d\n", vdatas[i].varName.c_str(), tstep_nums[t]);
-      ErrorCode tmp_rval = convert_variable(vdatas[i], t, scdMesh);
+      ErrorCode tmp_rval = convert_variable(vdatas[i], t, scd_mesh);
       if (MB_SUCCESS != tmp_rval)
         rval = tmp_rval;
     }
@@ -1440,12 +1440,12 @@ ErrorCode ReadNC::read_variable_to_nonset_async(EntityHandle file_set, std::vect
 }
 #endif
 
-ErrorCode ReadNC::convert_variable(VarData &var_data, int tstep_num, bool scdMesh) {
+ErrorCode ReadNC::convert_variable(VarData &var_data, int tstep_num, bool scd_mesh) {
   // get ptr to tag space
   void *data = var_data.varDatas[tstep_num];
 
   std::size_t sz = 1;
-  if (scdMesh) {
+  if (scd_mesh) {
     for (std::size_t idx = 0; idx != var_data.readCounts[tstep_num].size(); ++idx)
       sz *= var_data.readCounts[tstep_num][idx];
   }
@@ -2022,7 +2022,7 @@ ErrorCode ReadNC::create_tags(ScdInterface *scdi, EntityHandle file_set, const s
   // <__MESH_TYPE>
   Tag meshTypeTag = 0;
   tag_name = "__MESH_TYPE";
-  std::string meshTypeName = helper->get_mesh_type_name();
+  std::string meshTypeName = myHelper->get_mesh_type_name();
 
   rval = mbImpl->tag_get_handle(tag_name.c_str(), 0, MB_TYPE_OPAQUE, meshTypeTag, MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_VARLEN);
   ERRORR(rval, "Trouble creating __MESH_TYPE tag.");

diff --git a/src/io/ReadNC.hpp b/src/io/ReadNC.hpp
index 87ed049..cd1ca6b 100644
--- a/src/io/ReadNC.hpp
+++ b/src/io/ReadNC.hpp
@@ -176,10 +176,10 @@ private:
                                           std::vector<int> &tstep_nums);
 
   ErrorCode read_variable_to_set(EntityHandle file_set, std::vector<VarData> &vdatas,
-				 std::vector<int> &tstep_nums, bool scdMesh); 
+				 std::vector<int> &tstep_nums, bool scd_mesh);
 
   ErrorCode read_variable_to_nonset(EntityHandle file_set, std::vector<VarData> &vdatas,
-				    std::vector<int> &tstep_nums, bool scdMesh);
+				    std::vector<int> &tstep_nums, bool scd_mesh);
 
 #ifdef PNETCDF_FILE
   ErrorCode read_variable_to_nonset_async(EntityHandle file_set, std::vector<VarData> &vdatas,
@@ -187,18 +187,18 @@ private:
 #endif
 
   ErrorCode read_variables(EntityHandle file_set, std::vector<std::string> &var_names,
-                           std::vector<int> &tstep_nums, bool scdMesh);
+                           std::vector<int> &tstep_nums, bool scd_mesh);
 
   ErrorCode read_variable_allocate(EntityHandle file_set, std::vector<VarData> &vdatas,
-                                   std::vector<int> &tstep_nums, bool scdMesh);
+                                   std::vector<int> &tstep_nums, bool scd_mesh);
 
   ErrorCode read_variable_setup(std::vector<std::string> &var_names,
                                 std::vector<int> &tstep_nums, 
                                 std::vector<VarData> &vdatas,
                                 std::vector<VarData> &vsetdatas,
-                                bool scdMesh);
+                                bool scd_mesh);
 
-  ErrorCode convert_variable(VarData &var_data, int tstep_num, bool scdMesh);
+  ErrorCode convert_variable(VarData &var_data, int tstep_num, bool scd_mesh);
 
   ErrorCode get_tag_to_set(VarData &var_data, int tstep_num, Tag &tagh);
 
@@ -387,7 +387,7 @@ private:
   std::string partitionTagName;
 
     //! Helper class instance
-  NCHelper* helper;
+  NCHelper* myHelper;
 };
 
 // inline functions

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list