[MOAB-dev] r5458 - MOAB/branches/Version4.5/itaps/imesh

tautges at mcs.anl.gov tautges at mcs.anl.gov
Mon Apr 2 14:11:09 CDT 2012


Author: tautges
Date: 2012-04-02 14:11:08 -0500 (Mon, 02 Apr 2012)
New Revision: 5458

Modified:
   MOAB/branches/Version4.5/itaps/imesh/iMesh_MOAB.cpp
Log:
Backporting v5457 changes to 4.5.



Modified: MOAB/branches/Version4.5/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/branches/Version4.5/itaps/imesh/iMesh_MOAB.cpp	2012-04-02 19:00:36 UTC (rev 5457)
+++ MOAB/branches/Version4.5/itaps/imesh/iMesh_MOAB.cpp	2012-04-02 19:11:08 UTC (rev 5458)
@@ -1950,7 +1950,7 @@
   {
     CHKTAGTYPE(tag_handle, iBase_INTEGER);
     *tag_values_allocated *= sizeof(int);
-    *tag_values_size *= sizeof(int);
+    if (tag_values_size != tag_values_allocated) *tag_values_size *= sizeof(int);
     iMesh_getArrData(instance, entity_handles,
                      entity_handles_size, tag_handle,
                      tag_values,
@@ -1970,7 +1970,7 @@
   {
     CHKTAGTYPE(tag_handle, iBase_DOUBLE);
     *tag_values_allocated *= sizeof(double);
-    *tag_values_size *= sizeof(double);
+    if (tag_values_size != tag_values_allocated) *tag_values_size *= sizeof(double);
     iMesh_getArrData(instance, entity_handles,
                      entity_handles_size, tag_handle,
                      tag_values,
@@ -1989,7 +1989,7 @@
   {
     CHKTAGTYPE(tag_handle, iBase_ENTITY_HANDLE);
     *tag_value_allocated *= sizeof(iBase_EntityHandle);
-    *tag_value_size *= sizeof(iBase_EntityHandle);
+    if (tag_value_size != tag_value_allocated) *tag_value_size *= sizeof(iBase_EntityHandle);
     iMesh_getArrData(instance, entity_handles,
                      entity_handles_size, tag_handle,
                      reinterpret_cast<void**>(tag_value),
@@ -2009,7 +2009,7 @@
   {
     CHKTAGTYPE(tag_handle, iBase_ENTITY_SET_HANDLE);
     *tag_value_allocated *= sizeof(iBase_EntityHandle);
-    *tag_value_size *= sizeof(iBase_EntityHandle);
+    if (tag_value_size != tag_value_allocated) *tag_value_size *= sizeof(iBase_EntityHandle);
     iMesh_getArrData(instance, entity_handles,
                      entity_handles_size, tag_handle,
                      reinterpret_cast<void**>(tag_value),













More information about the moab-dev mailing list