[MOAB-dev] r5424 - MOAB/trunk/src/io

tautges at mcs.anl.gov tautges at mcs.anl.gov
Mon Mar 12 11:24:22 CDT 2012


Author: tautges
Date: 2012-03-12 11:24:22 -0500 (Mon, 12 Mar 2012)
New Revision: 5424

Modified:
   MOAB/trunk/src/io/WriteDamsel.cpp
   MOAB/trunk/src/io/WriteDamsel.hpp
Log:
Updated Damsel code.



Modified: MOAB/trunk/src/io/WriteDamsel.cpp
===================================================================
--- MOAB/trunk/src/io/WriteDamsel.cpp	2012-03-12 07:15:39 UTC (rev 5423)
+++ MOAB/trunk/src/io/WriteDamsel.cpp	2012-03-12 16:24:22 UTC (rev 5424)
@@ -87,8 +87,8 @@
 
 WriteDamsel::WriteDamsel(Interface *impl) 
         : mbImpl(impl), mWriteIface(NULL), mError(NULL), sequenceManager(NULL),
-          mGlobalIdTag(0), dmslLib(DAMSEL_ID_INVALID), dmslModel(DAMSEL_ID_INVALID),
-          dmslXcoord(DAMSEL_ID_INVALID), dmslYcoord(DAMSEL_ID_INVALID), dmslZcoord(DAMSEL_ID_INVALID),
+          mGlobalIdTag(0), dmslLib(DAMSEL_LIBRARY_INVALID), dmslModel(DAMSEL_MODEL_INVALID),
+          dmslXcoord(DAMSEL_TAG_INVALID), dmslYcoord(DAMSEL_TAG_INVALID), dmslZcoord(DAMSEL_TAG_INVALID),
           moabHandleType(DAMSEL_HANDLE_TYPE_INVALID)
 {
   assert(impl != NULL);
@@ -108,19 +108,11 @@
   moabHandleType = (sizeof(EntityHandle) == 64 ? DAMSEL_HANDLE_TYPE_HANDLE64 :
                     DAMSEL_HANDLE_TYPE_HANDLE32);
   
-  dmslLib = DMSLlib_init();
-
-  moab_to_damsel_data_type[MB_TYPE_OPAQUE] = DAMSEL_DATA_TYPE_BYTES;
-  moab_to_damsel_data_type[MB_TYPE_INTEGER] = DAMSEL_DATA_TYPE_INTEGER;
-  moab_to_damsel_data_type[MB_TYPE_DOUBLE] = DAMSEL_DATA_TYPE_DOUBLE;
-  moab_to_damsel_data_type[MB_TYPE_BIT] = DAMSEL_DATA_TYPE_INVALID;
-  moab_to_damsel_data_type[MB_TYPE_HANDLE] = DAMSEL_DATA_TYPE_HANDLE;
 }
 
 WriteDamsel::~WriteDamsel() 
 {
   mbImpl->release_interface(mWriteIface);
-  DMSLlib_finalize(dmslLib);
 }
 
 ErrorCode WriteDamsel::write_file(const char *file_name, 
@@ -138,7 +130,13 @@
   ErrorCode rval;
   damsel_err_t err;
 
-  DMSLlib_init();
+  dmslLib = DMSLlib_init();
+
+  moab_to_damsel_data_type[MB_TYPE_OPAQUE] = DAMSEL_DATA_TYPE_BYTES;
+  moab_to_damsel_data_type[MB_TYPE_INTEGER] = DAMSEL_DATA_TYPE_INTEGER;
+  moab_to_damsel_data_type[MB_TYPE_DOUBLE] = DAMSEL_DATA_TYPE_DOUBLE;
+  moab_to_damsel_data_type[MB_TYPE_BIT] = DAMSEL_DATA_TYPE_INVALID;
+  moab_to_damsel_data_type[MB_TYPE_HANDLE] = DAMSEL_DATA_TYPE_HANDLE;
   
     // create a damsel model
   dmslModel = DMSLmodel_create(sizeof(EntityHandle) == 8 ? DAMSEL_HANDLE_TYPE_HANDLE64 : 
@@ -185,6 +183,10 @@


More information about the moab-dev mailing list