[MOAB-dev] commit/MOAB: danwu: Merged master into error_handling_enhancement
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Jun 4 13:49:12 CDT 2014
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/3fb22dc1cc6c/
Changeset: 3fb22dc1cc6c
Branch: error_handling_enhancement
User: danwu
Date: 2014-06-04 20:49:05
Summary: Merged master into error_handling_enhancement
Affected #: 65 files
diff --git a/.gitignore b/.gitignore
index 8acb6bb..6f98827 100644
--- a/.gitignore
+++ b/.gitignore
@@ -100,9 +100,9 @@ Makefile
Makefile.in
moab.config
MOABConfig.cmake
-moab.creator*
-moab.files
-moab.includes
+*.creator*
+*.files
+*.includes
moab.make
*.o
.project
@@ -154,15 +154,18 @@ test/io/*.ccmg
test/io/ccmio_test
test/io/cub_file_test
test/io/exodus_test
+test/io/*.h5m
test/io/*.g
test/io/gmsh_test
test/io/ideas_test
test/io/nastran_test
+test/io/*.nc
test/io/read_cgm_basic_test
test/io/read_cgm_connectivity_test
test/io/read_cgm_group_test
test/io/read_cgm_load_test
test/io/read_cgm_senses_test
+test/io/read_gcrm_nc
test/io/read_mpas_nc
test/io/read_nc
test/io/read_ucd_nc
@@ -171,6 +174,7 @@ test/io/smf_test
test/io/stl_test
test/io/tqdcfr
test/io/vtk_test
+test/io/write_nc
test/kd_tree_test
test/kd_tree_time
test/kd_tree_tool
@@ -186,10 +190,12 @@ test/obb/obb_time
test/obb/obb_tree_tool
test/obb_test
test/oldinc/test_oldinc
+test/parallel/gcrm_par
test/parallel/*.h5m
test/parallel/mbparallelcomm_test
test/parallel/mhdf_parallel
test/parallel/mpastrvpart
+test/parallel/*.nc
test/parallel/par_coupler_test
test/parallel/par_intx_sph
test/parallel/parallel_hdf5_test
@@ -209,6 +215,7 @@ test/parallel/structured3
test/parallel/uber_parallel_test
test/parallel/ucdtrvpart
test/parallel/*.vtk
+test/parallel/write_nc_par
test/perf/adj_time
test/perf/perf
test/perf/perftool
diff --git a/MeshFiles/unittest/io/Makefile.am b/MeshFiles/unittest/io/Makefile.am
index 3b767aa..94704c1 100644
--- a/MeshFiles/unittest/io/Makefile.am
+++ b/MeshFiles/unittest/io/Makefile.am
@@ -2,7 +2,10 @@ EXTRA_DIST = HommeMapping.nc \
brick_cubit10.1.cub \
brick_cubit10.2.cub \
brick_cubit10.cub \
- camEul26x48x96.t3.nc \
+ eul26x48x96.t0.nc \
+ eul26x48x96.t1.nc \
+ eul26x48x96.t2.nc \
+ eul26x48x96.t.3.nc \
fv26x46x72.t.3.nc \
cubtest12.cub \
cubtest14.cub \
@@ -22,6 +25,10 @@ EXTRA_DIST = HommeMapping.nc \
sample.stl \
three.smf \
mpasx1.642.t.2.nc \
- 2d_naca0012.cgns
-
+ 2d_naca0012.cgns \
+ cube.sat \
+ cube.stp \
+ cylcube.sat \
+ cylcube.stp \
+ gcrm_r3.nc
diff --git a/MeshFiles/unittest/io/camEul26x48x96.t3.nc b/MeshFiles/unittest/io/camEul26x48x96.t3.nc
deleted file mode 100644
index fafba2a..0000000
Binary files a/MeshFiles/unittest/io/camEul26x48x96.t3.nc and /dev/null differ
diff --git a/MeshFiles/unittest/io/eul26x48x96.t.3.nc b/MeshFiles/unittest/io/eul26x48x96.t.3.nc
new file mode 100644
index 0000000..fafba2a
Binary files /dev/null and b/MeshFiles/unittest/io/eul26x48x96.t.3.nc differ
diff --git a/MeshFiles/unittest/io/eul26x48x96.t0.nc b/MeshFiles/unittest/io/eul26x48x96.t0.nc
new file mode 100644
index 0000000..453105a
Binary files /dev/null and b/MeshFiles/unittest/io/eul26x48x96.t0.nc differ
diff --git a/MeshFiles/unittest/io/eul26x48x96.t1.nc b/MeshFiles/unittest/io/eul26x48x96.t1.nc
new file mode 100644
index 0000000..61a7c8f
Binary files /dev/null and b/MeshFiles/unittest/io/eul26x48x96.t1.nc differ
diff --git a/MeshFiles/unittest/io/eul26x48x96.t2.nc b/MeshFiles/unittest/io/eul26x48x96.t2.nc
new file mode 100644
index 0000000..239bd83
Binary files /dev/null and b/MeshFiles/unittest/io/eul26x48x96.t2.nc differ
diff --git a/MeshFiles/unittest/io/gcrm_r3.nc b/MeshFiles/unittest/io/gcrm_r3.nc
new file mode 100644
index 0000000..1c7328b
Binary files /dev/null and b/MeshFiles/unittest/io/gcrm_r3.nc differ
diff --git a/examples/ReadWriteTest.cpp b/examples/ReadWriteTest.cpp
new file mode 100644
index 0000000..3ae6567
--- /dev/null
+++ b/examples/ReadWriteTest.cpp
@@ -0,0 +1,112 @@
+/** @example ReadWriteTest.cpp \n
+ * \brief Read mesh into MOAB and write some back \n
+ *
+ * <b>To run</b>: mpiexec -np 4 ReadWriteTest [input] [output] -O <read_opts> -o <write_opts>\n
+ *
+ * used for stress test of reader/writer
+ * report times to read and write
+ *
+ * example ReadWriteTest ../MeshFiles/io/fv26x46x72.t.3.nc out.nc \
+ * -O PARALLEL=READ_PART;PARTITION_METHOD=SQIJ;PARALLEL_RESOLVE_SHARED_ENTS;VARIABLE=T,U; \
+ * -o PARALLEL=WRITE_PART;VARIABLE=T,U
+ */
+
+#include "moab/ParallelComm.hpp"
+#include "MBParallelConventions.h"
+#include "moab/Core.hpp"
+#include <iostream>
+#include <time.h>
+
+using namespace moab;
+using namespace std;
+
+
+int main(int argc, char **argv)
+{
+ MPI_Init(&argc, &argv);
+
+ string options;
+
+ // Need option handling here for input filename
+ if (argc < 3 ){
+ return 1;
+ }
+
+ char * input_file = argv[1];
+ char * output_file = argv[2];
+ char * read_opts = NULL;
+ char * write_opts = NULL; // tags to write, separated by commas; it is the name of the tag
+
+ if (argc>3)
+ {
+ int index=3;
+ while (index<argc)
+ {
+ if (!strcmp( argv[index], "-O")) // this is for reading options, optional
+ {
+ read_opts=argv[++index];
+ }
+ if (!strcmp( argv[index], "-o"))
+ {
+ write_opts=argv[++index];
+ }
+ index++;
+ }
+ }
+
+
+ // Get MOAB instance and read the file with the specified options
+ Interface* mb = new Core;
+ if (NULL == mb)
+ return 1;
+
+ // Get the ParallelComm instance
+ ParallelComm* pcomm = new ParallelComm(mb, MPI_COMM_WORLD);
+ int nprocs = pcomm->proc_config().proc_size();
+ int rank = pcomm->proc_config().proc_rank();
+
+
+ EntityHandle set;
+ ErrorCode rval = mb->create_meshset(MESHSET_SET, set);
+
+ clock_t tt = clock();
+
+ if (rank == 0)
+ cout << "Reading file " << input_file << "\n with options: " << read_opts << endl
+ << " on " << nprocs << " processors\n";
+
+ rval = mb->load_file(input_file, &set, read_opts);
+ if (rval != MB_SUCCESS) {
+ delete mb;
+ return 1;
+ }
+
+ if (0==rank)
+ {
+ std::cout << "Time: "
+ << (clock() - tt) / (double) CLOCKS_PER_SEC << " seconds" << std::endl;
+ tt = clock();
+ }
+
+ rval = mb->write_file(output_file, 0, write_opts, &set, 1);
+ if (rval != MB_SUCCESS)
+ {
+ delete mb;
+ return 1;
+ }
+
+ if (0 == rank)
+ {
+ cout << "Writing file " << output_file << "\n with options: " << write_opts << endl;
+ cout << "Time: " << (clock() - tt) / (double) CLOCKS_PER_SEC
+ << " seconds" << std::endl;
+ tt = clock();
+ }
+
+
+ delete mb;
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/examples/VisTags.cpp b/examples/VisTags.cpp
new file mode 100644
index 0000000..efba608
--- /dev/null
+++ b/examples/VisTags.cpp
@@ -0,0 +1,181 @@
+/** @example VisTags.cpp \n
+ * \brief tool for visualizing multi level tags \n
+ * <b>To run</b>: VisTags <inp_file><outfile> -O <read_opts> -t <tags> -l <levels> -d <dim> \n
+ *
+ * In this example, it is shown how to create some simple tags for those tags that come from
+ * climate data, multiple levels.
+ * you can read directly nc data, or *.h5m file that will have the tag with multi levels
+ * output will be a vtk file with dense tags of form tag_name_<level>
+ * the tag name might contain a time index too, like T0 or U0
+ * <tag> is a list of tags, separated by commas, no spaces
+ * <levels> is a list of levels, separated by commas, no spaces
+ * dimension of entities with the tags will be specified with -d (default 2)
+ *
+ * an example of use
+ *
+ * VisTags gcrm_rc.nc out.vtk -O VARIABLE=u -t u0,u1 -l 0,1,2 -d 2
+ * (we knew that it had variable u in the file, that it had 256 levels, that there are 2 time
+ * steps, etc)
+ *
+ * or
+ * VisTags gcrm_rc.nc out.vtk -t u0 -l 0,1,2 -d 2
+ * (it will read all variables, but we need to know that u0 will be created as a tag)
+ *
+ * the out.vtk file will contain u0_0, u0_1, as simple dense double tags
+ */
+
+#include <iostream>
+#include <vector>
+#include <sstream>
+#include <string>
+
+// Include header for MOAB instance and tag conventions for
+#include "moab/Core.hpp"
+#include "MBTagConventions.hpp"
+#include "moab/FileOptions.hpp"
+
+
+int main(int argc, char **argv) {
+
+ // instantiate & load a file
+ moab::Interface *mb = new moab::Core();
+
+ moab::ErrorCode rval;
+ if (argc <= 1)
+ return 0;
+
+ int dimension = 2;
+ char * file_input = argv[1];
+ char * file_output = argv[2];
+ char * read_opts = NULL;
+ char * tags = NULL; // tags to write, separated by commas; it is the name of the tag
+ // in moab, it may have index after reading (T0, T1, etc)
+ char * levels = NULL; // levels, separated by commas, no spaces ( like 0,1,19 )
+ if (argc>3)
+ {
+ int index=3;
+ while (index<argc)
+ {
+ if (!strcmp( argv[index], "-O")) // this is for reading options, optional
+ {
+ read_opts=argv[++index];
+ }
+ if (!strcmp( argv[index], "-t"))
+ {
+ tags=argv[++index];
+ }
+ if (!strcmp( argv[index], "-l"))
+ {
+ levels=argv[++index];
+ }
+ if (!strcmp( argv[index], "-d"))
+ {
+ dimension=atoi(argv[++index]);
+ }
+ index++;
+ }
+ }
+ std::ostringstream opts;
+ opts << ";;TAGS=" << tags << ";LEVELS=" << levels << "\0" ;
+ moab::FileOptions fo(opts.str().c_str());
+
+ std::vector<std::string> tagsNames;
+ std::vector<int> levelsArray;
+ fo.get_strs_option("TAGS", tagsNames);
+ fo.get_ints_option("LEVELS", levelsArray);
+
+ // now create double tags for entities of dimension
+
+ rval = mb->load_file(file_input, 0, read_opts);
+ if (rval != moab::MB_SUCCESS) {
+ std::cout <<"not loading file\n";
+ return 1;
+ }
+ moab::Range ents;
+ rval = mb->get_entities_by_dimension(0, dimension, ents);
+ if (rval != moab::MB_SUCCESS) {
+ std::cout <<"not getting ents\n";
+ return 1;
+ }
+ for (size_t i=0; i<tagsNames.size(); i++)
+ {
+ std::string tagName = tagsNames[i];
+ moab::Tag tagh;
+ rval = mb->tag_get_handle(tagName.c_str(), tagh);
+
+ if (rval != moab::MB_SUCCESS) {
+ std::cout <<"not getting tag " << tagName.c_str()<<"\n";
+ continue;
+ }
+ int len=0;
+ rval = mb->tag_get_length(tagh, len);
+ if (rval != moab::MB_SUCCESS) {
+ std::cout <<"not getting tag len" << tagName.c_str()<<"\n";
+ continue;
+ }
+ moab::DataType type;
+ rval = mb->tag_get_data_type(tagh, type) ;
+ if (rval != moab::MB_SUCCESS) {
+ std::cout <<"not getting tag type " << tagName.c_str()<<"\n";
+ continue;
+ }
+ int count;
+ void * dataptr;// assume double tags, for simplicity
+ rval = mb->tag_iterate( tagh,
+ ents.begin(),
+ ents.end(),
+ count,
+ dataptr);
+ if (rval != moab::MB_SUCCESS || count != (int)ents.size()) {
+ std::cout <<"not getting tag iterate right " << tagName.c_str()<<"\n";
+ continue;
+ }
+
+ // now create a new tag, with a new name, concatenated, and copy data there , for each level
+ for (size_t j=0; j<levelsArray.size();j++)
+ {
+ int level=levelsArray[j];
+ if (level >= len)
+ {
+ std::cout << "level too big at "<< level << "\n";
+ continue;
+ }
+ std::ostringstream newTagName;
+ newTagName << tagName <<"_" << level ;
+ moab::Tag newTagh;
+ rval = mb->tag_get_handle(newTagName.str().c_str(), 1, type, newTagh,
+ moab::MB_TAG_DENSE | moab::MB_TAG_CREAT);
+ if (rval != moab::MB_SUCCESS ) {
+ std::cout <<"not getting new tag " << newTagName.str() <<"\n";
+ continue;
+ }
+ void * newDataPtr;
+ rval = mb->tag_iterate( newTagh,
+ ents.begin(),
+ ents.end(),
+ count,
+ newDataPtr);
+ if (rval != moab::MB_SUCCESS || count !=(int) ents.size()) {
+ std::cout <<"not getting new tag iterate" << newTagName.str() <<"\n";
+ continue;
+ }
+ if (type==moab::MB_TYPE_DOUBLE)
+ {
+ double * ptrD = (double*) newDataPtr;
+ double *oldData = (double*)dataptr;
+ for (int k=0; k<count; k++, ptrD++)
+ {
+ *ptrD = oldData[level+count*k];
+ }
+ }
+ }
+ mb->tag_delete(tagh);// no need for the tag anymore, write it to the new file
+ }
+
+ rval = mb->write_file(file_output);
+ if (rval != moab::MB_SUCCESS)
+ std::cout <<"can't write file " << file_output << "\n";
+ else
+ std::cout <<"successfully wrote file " << file_output<< "\n";
+ return 0;
+}
diff --git a/itaps/igeom/testSmooth2.cc b/itaps/igeom/testSmooth2.cc
index 7e4fbf4..e6f678b 100644
--- a/itaps/igeom/testSmooth2.cc
+++ b/itaps/igeom/testSmooth2.cc
@@ -173,11 +173,14 @@ int main(int argc, char *argv[]) {
iBase_EntitySetHandle root_set;
iMesh_createEntSet(mesh, 0, &root_set, &err);
- CHECK( "Failed to create a model root set.\n");
+ if (err != iBase_SUCCESS)
+ std::cerr << " Error code: " << err << " failed to create a model set"
+ << " At : " << __FILE__ << ':' << __LINE__ << std::endl;
iMesh_load(mesh, root_set, filename.c_str(), NULL, &err, filename.length(), 0);
- CHECK( "Failed to create a model root set.\n");
-
+ if (err != iBase_SUCCESS)
+ std::cerr << " Error code: " << err << " failed load the file"
+ << " At : " << __FILE__ << ':' << __LINE__ << std::endl;
std::string opts("SMOOTH;");
// new constructor
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 40f7a59..5b5cd8f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -73,7 +73,6 @@
io/GmshUtil.cpp
io/ReadABAQUS.cpp
io/ReadGmsh.cpp
- io/ReadGCRM.cpp
io/ReadIDEAS.cpp
io/ReadMCNP5.cpp
io/ReadNASTRAN.cpp
@@ -132,6 +131,7 @@
io/NCHelperFV.cpp
io/NCHelperHOMME.cpp
io/NCHelperMPAS.cpp
+ io/NCHelperGCRM.cpp
SpectralMeshTool.cpp
)
include_directories(
diff --git a/src/LocalDiscretization/SpectralQuad.cpp b/src/LocalDiscretization/SpectralQuad.cpp
index d7355e6..7b581cb 100644
--- a/src/LocalDiscretization/SpectralQuad.cpp
+++ b/src/LocalDiscretization/SpectralQuad.cpp
@@ -109,7 +109,10 @@ bool SpectralQuad::reverseEvalFcn(const double *posn, const double *verts, const
double dist = opt_findpt_2(&_data, (const double **)_xyz, x_star, r, &c);
// if it did not converge, get out with throw...
if (dist > 0.9e+30)
- throw Map::EvaluationError();
+ {
+ std::vector<CartVect> dummy;
+ throw Map::EvaluationError(CartVect(x_star), dummy);
+ }
//c tells us if we landed inside the element or exactly on a face, edge, or node
// also, dist shows the distance to the computed point.
//copy parametric coords back
diff --git a/src/ReaderWriterSet.cpp b/src/ReaderWriterSet.cpp
index 5015a7f..47c4c2b 100644
--- a/src/ReaderWriterSet.cpp
+++ b/src/ReaderWriterSet.cpp
@@ -48,15 +48,14 @@
#ifdef NETCDF_FILE
# include "ReadNCDF.hpp"
# include "WriteNCDF.hpp"
+# include "WriteNC.hpp"
# include "WriteSLAC.hpp"
# include "ReadNC.hpp"
-# include "ReadGCRM.hpp"
#endif
// 2nd include of ReadNC in case we have pnetcdf and not netcdf
#ifdef PNETCDF_FILE
# include "ReadNC.hpp"
-# include "ReadGCRM.hpp"
#endif
#ifdef CGNS_FILE
@@ -104,8 +103,7 @@ ReaderWriterSet::ReaderWriterSet( Core* mdb, Error* handler )
#ifdef NETCDF_FILE
const char* exo_sufxs[] = { "exo", "exoII", "exo2", "g", "gen", NULL };
register_factory( ReadNCDF::factory, WriteNCDF::factory, "Exodus II", exo_sufxs, "EXODUS" );
- register_factory( ReadGCRM::factory, NULL, "GCRM NC", "nc", "GCRM" );
- register_factory( ReadNC::factory, NULL, "Climate NC", "nc", "NC" );
+ register_factory( ReadNC::factory, WriteNC::factory, "Climate NC", "nc", "NC" );
#endif
#ifdef CGNS_FILE
diff --git a/src/TupleList.cpp b/src/TupleList.cpp
index 113e826..095a01d 100644
--- a/src/TupleList.cpp
+++ b/src/TupleList.cpp
@@ -267,7 +267,7 @@ int TupleList::find(unsigned int key_num, sint value)
else
{
// Sequential search: if tuple_list is not sorted
- for (long index = 0; index < n; index++)
+ for (uint index = 0; index < n; index++)
{
if (vi[index * mi + key_num] == (long) uvalue)
return index;
diff --git a/src/io/Makefile.am b/src/io/Makefile.am
index f556335..c0ab2ca 100644
--- a/src/io/Makefile.am
+++ b/src/io/Makefile.am
@@ -17,12 +17,19 @@ if NETCDF_FILE
WriteNCDF.cpp WriteNCDF.hpp \
WriteSLAC.cpp WriteSLAC.hpp \
ReadNC.cpp ReadNC.hpp \
+ WriteNC.cpp WriteNC.hpp \
NCHelper.cpp NCHelper.hpp \
NCHelperEuler.cpp NCHelperEuler.hpp \
NCHelperFV.cpp NCHelperFV.hpp \
NCHelperHOMME.cpp NCHelperHOMME.hpp \
NCHelperMPAS.cpp NCHelperMPAS.hpp \
- ReadGCRM.cpp ReadGCRM.hpp
+ NCHelperGCRM.cpp NCHelperGCRM.hpp \
+ NCWriteHelper.cpp NCWriteHelper.hpp \
+ NCWriteEuler.cpp NCWriteEuler.hpp \
+ NCWriteFV.cpp NCWriteFV.hpp \
+ NCWriteHOMME.cpp NCWriteHOMME.hpp \
+ NCWriteMPAS.cpp NCWriteMPAS.hpp \
+ NCWriteGCRM.cpp NCWriteGCRM.hpp
else
MOAB_NETCDF_SRCS =
endif
@@ -30,12 +37,19 @@ endif
if PNETCDF_FILE
if !NETCDF_FILE
MOAB_NETCDF_SRCS += ReadNC.cpp ReadNC.hpp \
+ WriteNC.cpp WriteNC.hpp \
NCHelper.cpp NCHelper.hpp \
NCHelperEuler.cpp NCHelperEuler.hpp \
NCHelperFV.cpp NCHelperFV.hpp \
NCHelperHOMME.cpp NCHelperHOMME.hpp \
NCHelperMPAS.cpp NCHelperMPAS.hpp \
- ReadGCRM.cpp ReadGCRM.hpp
+ NCHelperGCRM.cpp NCHelperGCRM.hpp \
+ NCWriteHelper.cpp NCWriteHelper.hpp \
+ NCWriteEuler.cpp NCWriteEuler.hpp \
+ NCWriteFV.cpp NCWriteFV.hpp \
+ NCWriteHOMME.cpp NCWriteHOMME.hpp \
+ NCWriteMPAS.cpp NCWriteMPAS.hpp \
+ NCWriteGCRM.cpp NCWriteGCRM.hpp
endif
endif
diff --git a/src/io/NCHelper.hpp b/src/io/NCHelper.hpp
index 12e3b0e..c6c73c6 100644
--- a/src/io/NCHelper.hpp
+++ b/src/io/NCHelper.hpp
@@ -35,6 +35,9 @@ public:
//! Create NC conventional tags
ErrorCode create_conventional_tags(const std::vector<int>& tstep_nums);
+ //! Update time tag values if timesteps spread across files
+ ErrorCode update_time_tag_vals();
+
protected:
//! Separate set and non-set variables (common to scd mesh and ucd mesh)
ErrorCode read_variables_setup(std::vector<std::string>& var_names,
diff --git a/src/io/NCHelperEuler.cpp b/src/io/NCHelperEuler.cpp
index 9f67a71..ce0856f 100644
--- a/src/io/NCHelperEuler.cpp
+++ b/src/io/NCHelperEuler.cpp
@@ -317,14 +317,14 @@ ErrorCode NCHelperEuler::init_mesh_vals()
for (mit = varInfo.begin(); mit != varInfo.end(); ++mit) {
ReadNC::VarData& vd = (*mit).second;
- vd.entLoc = ReadNC::ENTLOCSET;
+ // Default entLoc is ENTLOCSET
if (std::find(vd.varDims.begin(), vd.varDims.end(), tDim) != vd.varDims.end()) {
if ((std::find(vd.varDims.begin(), vd.varDims.end(), iCDim) != vd.varDims.end()) &&
(std::find(vd.varDims.begin(), vd.varDims.end(), jCDim) != vd.varDims.end()))
vd.entLoc = ReadNC::ENTLOCFACE;
}
- vd.numLev = 1;
+ // Default numLev is 0
if (std::find(vd.varDims.begin(), vd.varDims.end(), levDim) != vd.varDims.end())
vd.numLev = nLevels;
}
diff --git a/src/io/NCHelperFV.cpp b/src/io/NCHelperFV.cpp
index a85e834..2dc0fb3 100644
--- a/src/io/NCHelperFV.cpp
+++ b/src/io/NCHelperFV.cpp
@@ -316,7 +316,7 @@ ErrorCode NCHelperFV::init_mesh_vals()
for (mit = varInfo.begin(); mit != varInfo.end(); ++mit) {
ReadNC::VarData& vd = (*mit).second;
- vd.entLoc = ReadNC::ENTLOCSET;
+ // Default entLoc is ENTLOCSET
if (std::find(vd.varDims.begin(), vd.varDims.end(), tDim) != vd.varDims.end()) {
if ((std::find(vd.varDims.begin(), vd.varDims.end(), iCDim) != vd.varDims.end()) &&
(std::find(vd.varDims.begin(), vd.varDims.end(), jCDim) != vd.varDims.end()))
@@ -329,7 +329,7 @@ ErrorCode NCHelperFV::init_mesh_vals()
vd.entLoc = ReadNC::ENTLOCEWEDGE;
}
- vd.numLev = 1;
+ // Default numLev is 0
if (std::find(vd.varDims.begin(), vd.varDims.end(), levDim) != vd.varDims.end())
vd.numLev = nLevels;
}
This diff is so big that we needed to truncate the remainder.
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