[MOAB-dev] commit/MOAB: danwu: Compare the number of elements with correct expected result in ScdNCHelper::check_existing_mesh().

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Nov 11 11:33:37 CST 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/ac80582d4fc3/
Changeset:   ac80582d4fc3
Branch:      master
User:        danwu
Date:        2013-11-11 18:33:23
Summary:     Compare the number of elements with correct expected result in ScdNCHelper::check_existing_mesh().

Affected #:  1 file

diff --git a/src/io/NCHelper.cpp b/src/io/NCHelper.cpp
index bc8da0f..1465db2 100644
--- a/src/io/NCHelper.cpp
+++ b/src/io/NCHelper.cpp
@@ -793,16 +793,13 @@ ErrorCode ScdNCHelper::check_existing_mesh() {
   rval = mbImpl->get_number_entities_by_dimension(_fileSet, (-1 == lDims[2] ? 2 : 3), num_elems);
   ERRORR(rval, "Trouble getting number of elements.");
 
-  /*
   // Check against parameters
-  // The expected number of elements calculated below is incorrect (to be updated later)
   if (num_elems > 0) {
-    int expected_elems = (lDims[3] - lDims[0]) * (lDims[4] - lDims[1]) * (-1 == lDims[2] ? 1 : lDims[5] - lDims[2]);
+    int expected_elems = (lCDims[3] - lCDims[0] + 1) * (lCDims[4] - lCDims[1] + 1) * (-1 == lCDims[2] ? 1 : (lCDims[5] - lCDims[2] + 1));
     if (num_elems != expected_elems) {
       ERRORR(MB_FAILURE, "Number of elements doesn't match.");
     }
   }
-  */
 
   return MB_SUCCESS;
 }

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