[MOAB-dev] r2883 - MOAB/trunk

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue May 12 13:15:10 CDT 2009


Author: tautges
Date: 2009-05-12 13:15:10 -0500 (Tue, 12 May 2009)
New Revision: 2883

Modified:
   MOAB/trunk/MBCore.cpp
   MOAB/trunk/MBCore.hpp
Log:
Changes by Milad to enable creation of structured mesh through MBCore.

Haven't added functions to MBInterface yet, that should probably be done next.



Modified: MOAB/trunk/MBCore.cpp
===================================================================
--- MOAB/trunk/MBCore.cpp	2009-05-11 19:46:19 UTC (rev 2882)
+++ MOAB/trunk/MBCore.cpp	2009-05-12 18:15:10 UTC (rev 2883)
@@ -208,6 +208,15 @@
 
 void MBCore::deinitialize()
 {
+
+#ifdef USE_MPI    
+  std::vector<MBParallelComm*> pc_list;
+  MBErrorCode result = MBParallelComm::get_all_pcomm(this, pc_list);
+  for (std::vector<MBParallelComm*>::iterator vit = pc_list.begin();
+       vit != pc_list.end(); vit++) 
+    delete *vit;
+#endif
+  
   if (aEntityFactory)
     delete aEntityFactory;
 
@@ -3243,3 +3252,34 @@
     }
   }
 }
+
+MBErrorCode MBCore::create_scd_sequence(const HomCoord & coord_min,
+					const HomCoord &  coord_max,
+					MBEntityType  type,
+					MBEntityID  start_id_hint,
+					MBEntityHandle &  first_handle_out,
+					EntitySequence *&  sequence_out )
+{
+  return sequence_manager()->create_scd_sequence(coord_min, coord_max, type,
+						 start_id_hint, 
+						 first_handle_out,
+						 sequence_out);
+}
+
+MBErrorCode MBCore::add_vsequence(EntitySequence *    vert_seq,
+				  EntitySequence *  elem_seq,
+				  const HomCoord &  p1,
+				  const HomCoord &  q1,
+				  const HomCoord &  p2,
+				  const HomCoord &  q2,
+				  const HomCoord &  p3,
+				  const HomCoord &  q3,
+				  bool  bb_input,
+				  const HomCoord *  bb_min,
+				  const HomCoord *  bb_max )
+{
+  return sequence_manager()->add_vsequence(vert_seq, elem_seq, 
+					   p1, q1, p2, q2, p3, q3,
+					   bb_input, bb_min, bb_max);
+
+}

Modified: MOAB/trunk/MBCore.hpp
===================================================================
--- MOAB/trunk/MBCore.hpp	2009-05-11 19:46:19 UTC (rev 2882)
+++ MOAB/trunk/MBCore.hpp	2009-05-12 18:15:10 UTC (rev 2883)
@@ -25,7 +25,9 @@
 class SequenceManager;
 class TagServer;
 class MBError;
+class HomCoord;
 class MBReaderWriterSet;
+class EntitySequence;
 class FileOptions;
 
 #ifdef XPCOM_MB
@@ -966,6 +968,26 @@
   SequenceManager* sequence_manager() { return sequenceManager; }
   const SequenceManager* sequence_manager() const { return sequenceManager; }
 
+    /// create structured sequence
+  MBErrorCode create_scd_sequence(const HomCoord &    coord_min,
+                                  const HomCoord &  coord_max,
+                                  MBEntityType  type,
+                                  MBEntityID  start_id_hint,
+                                  MBEntityHandle &  first_handle_out,
+                                  EntitySequence *&  sequence_out );
+
+  MBErrorCode add_vsequence(EntitySequence *    vert_seq,
+                            EntitySequence *  elem_seq,
+                            const HomCoord &  p1,
+                            const HomCoord &  q1,
+                            const HomCoord &  p2,
+                            const HomCoord &  q2,
+                            const HomCoord &  p3,
+                            const HomCoord &  q3,
+                            bool  bb_input = false,
+                            const HomCoord *  bb_min = NULL,
+                            const HomCoord *  bb_max = NULL);
+   
     //! return the a_entity_factory pointer
   AEntityFactory *a_entity_factory() { return aEntityFactory; }
   const AEntityFactory *a_entity_factory() const { return aEntityFactory; }



More information about the moab-dev mailing list