[MOAB-dev] commit/MOAB: danwu: Renamed a few member functions of NCHelper classes.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Mar 14 17:53:37 CDT 2014
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/601ac5fba7d4/
Changeset: 601ac5fba7d4
Branch: error_handling_enhancement
User: danwu
Date: 2014-03-14 23:53:13
Summary: Renamed a few member functions of NCHelper classes.
Affected #: 6 files
diff --git a/src/io/NCHelper.cpp b/src/io/NCHelper.cpp
index 85afdba..58e9e16 100644
--- a/src/io/NCHelper.cpp
+++ b/src/io/NCHelper.cpp
@@ -301,7 +301,7 @@ ErrorCode NCHelper::create_conventional_tags(const std::vector<int>& tstep_nums)
return MB_SUCCESS;
}
-ErrorCode NCHelper::read_variable_setup(std::vector<std::string>& var_names, std::vector<int>& tstep_nums,
+ErrorCode NCHelper::read_variables_setup(std::vector<std::string>& var_names, std::vector<int>& tstep_nums,
std::vector<ReadNC::VarData>& vdatas, std::vector<ReadNC::VarData>& vsetdatas)
{
std::map<std::string, ReadNC::VarData>& varInfo = _readNC->varInfo;
@@ -381,12 +381,12 @@ ErrorCode NCHelper::read_variable_setup(std::vector<std::string>& var_names, std
return MB_SUCCESS;
}
-ErrorCode NCHelper::read_variable_to_set(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode NCHelper::read_variables_to_set(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
Interface*& mbImpl = _readNC->mbImpl;
DebugOutput& dbgOut = _readNC->dbgOut;
- ErrorCode rval = read_variable_to_set_allocate(vdatas, tstep_nums); \
+ ErrorCode rval = read_variables_to_set_allocate(vdatas, tstep_nums); \
CHK_ERR1(rval, "Trouble allocating space to read set variables");
// Finally, read into that space
@@ -784,7 +784,7 @@ ErrorCode NCHelper::create_dummy_variables()
return MB_SUCCESS;
}
-ErrorCode NCHelper::read_variable_to_set_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode NCHelper::read_variables_to_set_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
std::vector<int>& dimLens = _readNC->dimLens;
DebugOutput& dbgOut = _readNC->dbgOut;
@@ -1006,7 +1006,7 @@ ErrorCode ScdNCHelper::read_variables(std::vector<std::string>& var_names, std::
std::vector<ReadNC::VarData> vdatas;
std::vector<ReadNC::VarData> vsetdatas;
- ErrorCode rval = read_variable_setup(var_names, tstep_nums, vdatas, vsetdatas); \
+ ErrorCode rval = read_variables_setup(var_names, tstep_nums, vdatas, vsetdatas); \
CHK_ERR1(rval, "Trouble setting up read variable");
// Create COORDS tag for quads
@@ -1014,12 +1014,12 @@ ErrorCode ScdNCHelper::read_variables(std::vector<std::string>& var_names, std::
CHK_ERR1(rval, "Trouble creating coordinate tags to entities quads");
if (!vsetdatas.empty()) {
- rval = read_variable_to_set(vsetdatas, tstep_nums); \
+ rval = read_variables_to_set(vsetdatas, tstep_nums); \
CHK_ERR1(rval, "Trouble read variables to set");
}
if (!vdatas.empty()) {
- rval = read_scd_variable_to_nonset(vdatas, tstep_nums);
+ rval = read_scd_variables_to_nonset(vdatas, tstep_nums);
if (MB_SUCCESS != rval)
SET_ERR(rval, "Trouble reading variables to entities verts/edges/faces");
}
@@ -1027,7 +1027,7 @@ ErrorCode ScdNCHelper::read_variables(std::vector<std::string>& var_names, std::
return MB_SUCCESS;
}
-ErrorCode ScdNCHelper::read_scd_variable_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode ScdNCHelper::read_scd_variables_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
Interface*& mbImpl = _readNC->mbImpl;
std::vector<int>& dimLens = _readNC->dimLens;
@@ -1149,11 +1149,11 @@ ErrorCode ScdNCHelper::read_scd_variable_to_nonset_allocate(std::vector<ReadNC::
return rval;
}
-ErrorCode ScdNCHelper::read_scd_variable_to_nonset(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode ScdNCHelper::read_scd_variables_to_nonset(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
DebugOutput& dbgOut = _readNC->dbgOut;
- ErrorCode rval = read_scd_variable_to_nonset_allocate(vdatas, tstep_nums); \
+ ErrorCode rval = read_scd_variables_to_nonset_allocate(vdatas, tstep_nums); \
CHK_ERR1(rval, "Trouble allocating space to read non-set variables");
// Finally, read into that space
@@ -1340,22 +1340,22 @@ ErrorCode UcdNCHelper::read_variables(std::vector<std::string>& var_names, std::
std::vector<ReadNC::VarData> vdatas;
std::vector<ReadNC::VarData> vsetdatas;
- ErrorCode rval = read_variable_setup(var_names, tstep_nums, vdatas, vsetdatas); \
+ ErrorCode rval = read_variables_setup(var_names, tstep_nums, vdatas, vsetdatas); \
CHK_ERR1(rval, "Trouble setting up to read variables");
if (!vsetdatas.empty()) {
- rval = read_variable_to_set(vsetdatas, tstep_nums); \
+ rval = read_variables_to_set(vsetdatas, tstep_nums); \
CHK_ERR1(rval, "Trouble reading variables to set");
}
if (!vdatas.empty()) {
#ifdef PNETCDF_FILE
// With pnetcdf support, we will use async read
- rval = read_ucd_variable_to_nonset_async(vdatas, tstep_nums); \
+ rval = read_ucd_variables_to_nonset_async(vdatas, tstep_nums); \
CHK_ERR1(rval, "Trouble reading variables to entities verts/edges/faces");
#else
// Without pnetcdf support, we will use old read
- rval = read_ucd_variable_to_nonset(vdatas, tstep_nums); \
+ rval = read_ucd_variables_to_nonset(vdatas, tstep_nums); \
CHK_ERR1(rval, "Trouble reading variables to entities verts/edges/faces");
#endif
}
diff --git a/src/io/NCHelper.hpp b/src/io/NCHelper.hpp
index 817257c..25103a3 100644
--- a/src/io/NCHelper.hpp
+++ b/src/io/NCHelper.hpp
@@ -37,15 +37,15 @@ public:
protected:
//! Separate set and non-set variables (common to scd mesh and ucd mesh)
- ErrorCode read_variable_setup(std::vector<std::string>& var_names,
+ ErrorCode read_variables_setup(std::vector<std::string>& var_names,
std::vector<int>& tstep_nums,
std::vector<ReadNC::VarData>& vdatas,
std::vector<ReadNC::VarData>& vsetdatas);
//! Read set variables (common to scd mesh and ucd mesh)
- ErrorCode read_variable_to_set(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums);
+ ErrorCode read_variables_to_set(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums);
- //! Convert variables in place
+ //! Convert a variable in place
ErrorCode convert_variable(ReadNC::VarData& var_data, int tstep_num);
ErrorCode read_coordinate(const char* var_name, int lmin, int lmax,
@@ -69,8 +69,8 @@ protected:
ErrorCode create_dummy_variables();
private:
- //! Used by read_variable_to_set()
- ErrorCode read_variable_to_set_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums);
+ //! Used by read_variables_to_set()
+ ErrorCode read_variables_to_set_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums);
protected:
//! Allow NCHelper to directly access members of ReadNC
@@ -126,9 +126,9 @@ private:
virtual ErrorCode read_variables(std::vector<std::string>& var_names, std::vector<int>& tstep_nums);
//! Read non-set variables for scd mesh
- ErrorCode read_scd_variable_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
+ ErrorCode read_scd_variables_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums);
- ErrorCode read_scd_variable_to_nonset(std::vector<ReadNC::VarData>& vdatas,
+ ErrorCode read_scd_variables_to_nonset(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums);
//! Create COORDS tag for quads coordinate
@@ -194,13 +194,13 @@ private:
std::vector<int> &tstep_nums);
//! Read non-set variables for ucd mesh (implemented differently in child classes)
- virtual ErrorCode read_ucd_variable_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
+ virtual ErrorCode read_ucd_variables_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums) = 0;
#ifdef PNETCDF_FILE
- virtual ErrorCode read_ucd_variable_to_nonset_async(std::vector<ReadNC::VarData>& vdatas,
+ virtual ErrorCode read_ucd_variables_to_nonset_async(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums) = 0;
#else
- virtual ErrorCode read_ucd_variable_to_nonset(std::vector<ReadNC::VarData>& vdatas,
+ virtual ErrorCode read_ucd_variables_to_nonset(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums) = 0;
#endif
diff --git a/src/io/NCHelperHOMME.cpp b/src/io/NCHelperHOMME.cpp
index 53fa9ad..b2dea5e 100644
--- a/src/io/NCHelperHOMME.cpp
+++ b/src/io/NCHelperHOMME.cpp
@@ -551,7 +551,7 @@ ErrorCode NCHelperHOMME::create_mesh(Range& faces)
return MB_SUCCESS;
}
-ErrorCode NCHelperHOMME::read_ucd_variable_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode NCHelperHOMME::read_ucd_variables_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
Interface*& mbImpl = _readNC->mbImpl;
std::vector<int>& dimLens = _readNC->dimLens;
@@ -634,11 +634,11 @@ ErrorCode NCHelperHOMME::read_ucd_variable_to_nonset_allocate(std::vector<ReadNC
}
#ifdef PNETCDF_FILE
-ErrorCode NCHelperHOMME::read_ucd_variable_to_nonset_async(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode NCHelperHOMME::read_ucd_variables_to_nonset_async(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
DebugOutput& dbgOut = _readNC->dbgOut;
- ErrorCode rval = read_ucd_variable_to_nonset_allocate(vdatas, tstep_nums);
+ ErrorCode rval = read_ucd_variables_to_nonset_allocate(vdatas, tstep_nums);
ERRORR(rval, "Trouble allocating read variables.");
// Finally, read into that space
@@ -796,11 +796,11 @@ ErrorCode NCHelperHOMME::read_ucd_variable_to_nonset_async(std::vector<ReadNC::V
return rval;
}
#else
-ErrorCode NCHelperHOMME::read_ucd_variable_to_nonset(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode NCHelperHOMME::read_ucd_variables_to_nonset(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
DebugOutput& dbgOut = _readNC->dbgOut;
- ErrorCode rval = read_ucd_variable_to_nonset_allocate(vdatas, tstep_nums);
+ ErrorCode rval = read_ucd_variables_to_nonset_allocate(vdatas, tstep_nums);
ERRORR(rval, "Trouble allocating read variables.");
// Finally, read into that space
diff --git a/src/io/NCHelperHOMME.hpp b/src/io/NCHelperHOMME.hpp
index a6d50f0..4c383bb 100644
--- a/src/io/NCHelperHOMME.hpp
+++ b/src/io/NCHelperHOMME.hpp
@@ -30,16 +30,16 @@ private:
//! Implementation of NCHelper::get_mesh_type_name()
virtual std::string get_mesh_type_name() { return "CAM_SE"; }
- //! Implementation of UcdNCHelper::read_ucd_variable_to_nonset_allocate()
- virtual ErrorCode read_ucd_variable_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
+ //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_allocate()
+ virtual ErrorCode read_ucd_variables_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums);
#ifdef PNETCDF_FILE
- //! Implementation of UcdNCHelper::read_ucd_variable_to_nonset_async()
- virtual ErrorCode read_ucd_variable_to_nonset_async(std::vector<ReadNC::VarData>& vdatas,
+ //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_async()
+ virtual ErrorCode read_ucd_variables_to_nonset_async(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums);
#else
- //! Implementation of UcdNCHelper::read_ucd_variable_to_nonset()
- virtual ErrorCode read_ucd_variable_to_nonset(std::vector<ReadNC::VarData>& vdatas,
+ //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset()
+ virtual ErrorCode read_ucd_variables_to_nonset(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums);
#endif
diff --git a/src/io/NCHelperMPAS.cpp b/src/io/NCHelperMPAS.cpp
index 9c70b80..58093e3 100644
--- a/src/io/NCHelperMPAS.cpp
+++ b/src/io/NCHelperMPAS.cpp
@@ -509,7 +509,7 @@ ErrorCode NCHelperMPAS::create_mesh(Range& faces)
return MB_SUCCESS;
}
-ErrorCode NCHelperMPAS::read_ucd_variable_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode NCHelperMPAS::read_ucd_variables_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
Interface*& mbImpl = _readNC->mbImpl;
std::vector<int>& dimLens = _readNC->dimLens;
@@ -646,13 +646,13 @@ ErrorCode NCHelperMPAS::read_ucd_variable_to_nonset_allocate(std::vector<ReadNC:
}
#ifdef PNETCDF_FILE
-ErrorCode NCHelperMPAS::read_ucd_variable_to_nonset_async(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode NCHelperMPAS::read_ucd_variables_to_nonset_async(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
Interface*& mbImpl = _readNC->mbImpl;
bool& noEdges = _readNC->noEdges;
DebugOutput& dbgOut = _readNC->dbgOut;
- ErrorCode rval = read_ucd_variable_to_nonset_allocate(vdatas, tstep_nums);
+ ErrorCode rval = read_ucd_variables_to_nonset_allocate(vdatas, tstep_nums);
ERRORR(rval, "Trouble allocating read variables.");
// Finally, read into that space
@@ -803,13 +803,13 @@ ErrorCode NCHelperMPAS::read_ucd_variable_to_nonset_async(std::vector<ReadNC::Va
return rval;
}
#else
-ErrorCode NCHelperMPAS::read_ucd_variable_to_nonset(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
+ErrorCode NCHelperMPAS::read_ucd_variables_to_nonset(std::vector<ReadNC::VarData>& vdatas, std::vector<int>& tstep_nums)
{
Interface*& mbImpl = _readNC->mbImpl;
bool& noEdges = _readNC->noEdges;
DebugOutput& dbgOut = _readNC->dbgOut;
- ErrorCode rval = read_ucd_variable_to_nonset_allocate(vdatas, tstep_nums);
+ ErrorCode rval = read_ucd_variables_to_nonset_allocate(vdatas, tstep_nums);
ERRORR(rval, "Trouble allocating read variables.");
// Finally, read into that space
diff --git a/src/io/NCHelperMPAS.hpp b/src/io/NCHelperMPAS.hpp
index 6c6dc99..b4a3c01 100644
--- a/src/io/NCHelperMPAS.hpp
+++ b/src/io/NCHelperMPAS.hpp
@@ -30,16 +30,16 @@ private:
//! Implementation of NCHelper::get_mesh_type_name()
virtual std::string get_mesh_type_name() { return "MPAS"; }
- //! Implementation of UcdNCHelper::read_ucd_variable_to_nonset_allocate()
- virtual ErrorCode read_ucd_variable_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
+ //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_allocate()
+ virtual ErrorCode read_ucd_variables_to_nonset_allocate(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums);
#ifdef PNETCDF_FILE
- //! Implementation of UcdNCHelper::read_ucd_variable_to_nonset_async()
- virtual ErrorCode read_ucd_variable_to_nonset_async(std::vector<ReadNC::VarData>& vdatas,
+ //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset_async()
+ virtual ErrorCode read_ucd_variables_to_nonset_async(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums);
#else
- //! Implementation of UcdNCHelper::read_ucd_variable_to_nonset()
- virtual ErrorCode read_ucd_variable_to_nonset(std::vector<ReadNC::VarData>& vdatas,
+ //! Implementation of UcdNCHelper::read_ucd_variables_to_nonset()
+ virtual ErrorCode read_ucd_variables_to_nonset(std::vector<ReadNC::VarData>& vdatas,
std::vector<int>& tstep_nums);
#endif
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