[MOAB-dev] r3243 - MOAB/trunk

bmsmith6 at wisc.edu bmsmith6 at wisc.edu
Mon Oct 26 10:42:27 CDT 2009


Author: bmsmith
Date: 2009-10-26 10:42:27 -0500 (Mon, 26 Oct 2009)
New Revision: 3243

Modified:
   MOAB/trunk/MBCore.cpp
   MOAB/trunk/MBCore.hpp
   MOAB/trunk/MBInterface.hpp
Log:
Add interface function to change the options of a meshset.



Modified: MOAB/trunk/MBCore.cpp
===================================================================
--- MOAB/trunk/MBCore.cpp	2009-10-26 14:36:13 UTC (rev 3242)
+++ MOAB/trunk/MBCore.cpp	2009-10-26 15:42:27 UTC (rev 3243)
@@ -2436,6 +2436,17 @@
   return MB_SUCCESS;
 }
 
+MBErrorCode MBCore::set_meshset_options( const MBEntityHandle ms_handle, 
+                                         const unsigned int options)
+{
+  MBMeshSet* set = get_mesh_set( sequence_manager(), ms_handle );
+  if (!set)
+    return MB_ENTITY_NOT_FOUND;
+  
+  return set->set_flags(options, ms_handle, a_entity_factory());
+}
+
+
 MBErrorCode MBCore::clear_meshset( const MBEntityHandle *ms_handles,
                                     const int num_meshsets)
 {

Modified: MOAB/trunk/MBCore.hpp
===================================================================
--- MOAB/trunk/MBCore.hpp	2009-10-26 14:36:13 UTC (rev 3242)
+++ MOAB/trunk/MBCore.hpp	2009-10-26 15:42:27 UTC (rev 3243)
@@ -845,6 +845,10 @@
   virtual MBErrorCode get_meshset_options(const MBEntityHandle ms_handle, 
                                            unsigned int& options) const;
 
+  //! set the options of a mesh set
+  virtual MBErrorCode set_meshset_options(const MBEntityHandle ms_handle, 
+                                          const unsigned int options);
+
   //! subtracts meshset2 from meshset1 - modifies meshset1
   virtual MBErrorCode subtract_meshset(MBEntityHandle meshset1, 
                                         const MBEntityHandle meshset2);

Modified: MOAB/trunk/MBInterface.hpp
===================================================================
--- MOAB/trunk/MBInterface.hpp	2009-10-26 14:36:13 UTC (rev 3242)
+++ MOAB/trunk/MBInterface.hpp	2009-10-26 15:42:27 UTC (rev 3243)
@@ -1316,6 +1316,14 @@
   virtual MBErrorCode get_meshset_options(const MBEntityHandle ms_handle, 
                                           unsigned int& options) const = 0;
 
+    //! Set the options of a mesh set
+    /** Set the options of a mesh set.
+        \param ms_handle Handle for meshset whose options are being changed
+        \param options Bit mask of options to be used
+    */
+  virtual MBErrorCode set_meshset_options(const MBEntityHandle ms_handle, 
+                                          const unsigned int options) = 0;
+
     //! Subtract meshsets
     /** Subtract <em>meshset2</em> from <em>meshset1</em>, placing the results in meshset1.
         \param meshset1 Mesh set being subtracted from, also used to pass back result



More information about the moab-dev mailing list