[MOAB-dev] r4971 - in MOAB/trunk: . src/io test/io

tautges at mcs.anl.gov tautges at mcs.anl.gov
Wed Jun 8 12:56:29 CDT 2011


Author: tautges
Date: 2011-06-08 12:56:28 -0500 (Wed, 08 Jun 2011)
New Revision: 4971

Modified:
   MOAB/trunk/moab.make.in
   MOAB/trunk/src/io/ReadNC.cpp
   MOAB/trunk/src/io/ReadNC.hpp
   MOAB/trunk/test/io/read_nc.cpp
Log:
Implement the ability to not read any variables from an NC file (accessed using "VARIABLE=" option, where
no variable names are specified).

Also, removing the duplicate CGM_LIBS argument I'd put in earlier today.



Modified: MOAB/trunk/moab.make.in
===================================================================
--- MOAB/trunk/moab.make.in	2011-06-08 17:54:06 UTC (rev 4970)
+++ MOAB/trunk/moab.make.in	2011-06-08 17:56:28 UTC (rev 4971)
@@ -12,7 +12,7 @@
 MOAB_CFLAGS = @CFLAGS@ @AM_CFLAGS@
 MOAB_LDFLAGS = @EXPORT_LDFLAGS@
 
-MOAB_LIBS_LINK = ${MOAB_LDFLAGS} -L${MOAB_LIBDIR} -lMOAB @LIBS@ @CGM_LIBS@ @PNETCDF_LIBS@ @NETCDF_LIBS@ @HDF5_LIBS@ @CCMIO_LIBS@ @CGM_LIBS@
+MOAB_LIBS_LINK = ${MOAB_LDFLAGS} -L${MOAB_LIBDIR} -lMOAB @LIBS@ @PNETCDF_LIBS@ @NETCDF_LIBS@ @HDF5_LIBS@ @CCMIO_LIBS@ @CGM_LIBS@
 
 # Override MOAB_LIBDIR and MOAB_INCLUDES from above with the correct
 # values for the installed MOAB.

Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp	2011-06-08 17:54:06 UTC (rev 4970)
+++ MOAB/trunk/src/io/ReadNC.cpp	2011-06-08 17:56:28 UTC (rev 4971)
@@ -98,9 +98,9 @@
       return rval;
   }
   
-  bool nomesh = false;
+  bool nomesh = false, novars = false;
   std::string partition_tag_name;
-  rval = parse_options(opts, var_names, tstep_nums, tstep_vals, nomesh, partition_tag_name);
+  rval = parse_options(opts, var_names, tstep_nums, tstep_vals, nomesh, novars, partition_tag_name);
   ERRORR(rval, "Trouble parsing option string.");
 
   // Open the file
@@ -139,19 +139,21 @@
 
     // Create structured mesh vertex/hex sequences
   Range hexes;
-  if (nomesh) {
+  if (nomesh && !novars) {
     rval = check_verts_hexes(tmp_set);
     ERRORR(rval, "Mesh characteristics didn't match from last read.\n");
   }
-  else {
+  else if (!nomesh) {
     rval = create_verts_hexes(tmp_set, hexes);
     ERRORR(rval, "Trouble creating vertices.");
   }
 
     // Read variables onto grid
-  rval = read_variables(tmp_set, var_names, tstep_nums, nomesh);
-  if (MB_FAILURE == rval) return rval;
-
+  if (!novars) {
+    rval = read_variables(tmp_set, var_names, tstep_nums);


More information about the moab-dev mailing list