[MOAB-dev] r4874 - in MOAB/trunk/src: . io moab parallel
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Tue May 24 17:26:36 CDT 2011
Author: tautges
Date: 2011-05-24 17:26:36 -0500 (Tue, 24 May 2011)
New Revision: 4874
Modified:
MOAB/trunk/src/Core.cpp
MOAB/trunk/src/ScdInterface.cpp
MOAB/trunk/src/io/ReadNC.cpp
MOAB/trunk/src/moab/Core.hpp
MOAB/trunk/src/moab/ScdInterface.hpp
MOAB/trunk/src/parallel/ReadParallel.cpp
Log:
Changes related to ScdInterface and ReadNC.
- in Core, make ScdInterface persistent, like reader/writer interfaces
- enhance Core::list_entities, to list multiple-value tags if the # values
is reasonably small (<= 10)
- allow creation of structured vertex meshes with NULL coordinate field input;
apps can get direct pointer to coords memory later, which allows them to not
allocate twice for this data
- put both vertices and hexes in structured mesh set created with construct_box
- use construct_box in ReadNC instead of separate calls to create_scd_sequence
Passes make check.
Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp 2011-05-24 22:13:26 UTC (rev 4873)
+++ MOAB/trunk/src/Core.cpp 2011-05-24 22:26:36 UTC (rev 4874)
@@ -153,9 +153,12 @@
delete mMBWriteUtil;
if(mMBReadUtil)
delete mMBReadUtil;
+ if (scdInterface)
+ delete scdInterface;
mMBWriteUtil = NULL;
mMBReadUtil = NULL;
+ scdInterface = NULL;
deinitialize();
}
@@ -199,7 +202,8 @@
mMBWriteUtil = NULL;
mMBReadUtil = NULL;
-
+ scdInterface = NULL;
+
// Readers and writers try to get pointers to above utils.
// Do this after pointers are initialized. (Pointers should
// really be initialized in constructor to avoid this kind
@@ -296,7 +300,9 @@
}
else if(iface_name == "ScdInterface")
{
- *iface = (void*)(ScdInterface*) new ScdInterface(this);
+ if (!scdInterface)
+ *iface = (void*)(ScdInterface*) new ScdInterface(this);
+ *iface = scdInterface;
return MB_SUCCESS;
}
return MB_FAILURE;
@@ -321,7 +327,9 @@
ptr = static_cast<ExoIIInterface*>(new ExoIIUtil(this));
}
else if (type == typeid(ScdInterface)) {
- ptr = new ScdInterface(this);
+ if(!scdInterface)
+ scdInterface = new ScdInterface(this);
+ ptr = scdInterface;
}
else {
ptr = 0;
@@ -356,7 +364,6 @@
}
More information about the moab-dev
mailing list