[MOAB-dev] commit/MOAB: danwu: MPAS reader should get local edges only when NO_EDGES read option is not set.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Mar 25 13:45:21 CDT 2014


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/438f9d0c3e88/
Changeset:   438f9d0c3e88
Branch:      error_handling_enhancement
User:        danwu
Date:        2014-03-25 19:45:04
Summary:     MPAS reader should get local edges only when NO_EDGES read option is not set.

Affected #:  1 file

diff --git a/src/io/NCHelperMPAS.cpp b/src/io/NCHelperMPAS.cpp
index 305257e..349e17a 100644
--- a/src/io/NCHelperMPAS.cpp
+++ b/src/io/NCHelperMPAS.cpp
@@ -521,10 +521,14 @@ ErrorCode NCHelperMPAS::read_ucd_variables_to_nonset_allocate(std::vector<ReadNC
   assert("Should only have a single vertex subrange, since they were read in one shot" &&
       verts.psize() == 1);
 
-  // Get edges in set
+  // Get edges in set (unless NO_EDGES read option is set)
   Range edges;
-  rval = mbImpl->get_entities_by_dimension(_fileSet, 1, edges); \
-  CHK_ERR1(rval, "Trouble getting edges in current file set");
+  if (!noEdges) {
+    rval = mbImpl->get_entities_by_dimension(_fileSet, 1, edges); \
+    CHK_ERR1(rval, "Trouble getting edges in current file set");
+    assert("Should only have a single edge subrange, since they were read in one shot" &&
+        edges.psize() == 1);
+  }
 
   // Get faces in set
   Range faces;

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