[MOAB-dev] r4883 - MOAB/trunk/src/moab

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu May 26 08:49:16 CDT 2011


Author: kraftche
Date: 2011-05-26 08:49:07 -0500 (Thu, 26 May 2011)
New Revision: 4883

Added:
   MOAB/trunk/src/moab/ReorderTool.hpp
Log:
forgot this.  sorry.

Added: MOAB/trunk/src/moab/ReorderTool.hpp
===================================================================
--- MOAB/trunk/src/moab/ReorderTool.hpp	                        (rev 0)
+++ MOAB/trunk/src/moab/ReorderTool.hpp	2011-05-26 13:49:07 UTC (rev 4883)
@@ -0,0 +1,195 @@
+/** \file   ReorderTool.hpp
+ *  \author Jason Kraftcheck 
+ *  \date   2011-05-23
+ */
+
+#ifndef moab_REORDER_TOOL_HPP
+#define moab_REORDER_TOOL_HPP
+
+#include "moab/Types.hpp"
+#include <vector>
+
+namespace moab {
+
+class Core;
+class Range;
+
+class ReorderTool 
+{
+  public:
+  
+    ReorderTool( Core* moab ) : mMB(moab) {}
+    
+
+    /**\brief Calculate new handle order by tag value.
+     *
+     * Given a tag containing integer values, calculate new order for entities 
+     * in the database (except entity sets) such that all entities
+     * with tag value A occur before all entities with tag value B
+     * in the handle space where A < B.  Ordering will be stable for
+     * entities with the same tag value.
+     *
+     *\param ordering_tag  Sinlge integer tag, where value on each entity
+     *                     determines the new position in the handle ordering.
+     *                     Entities may have duplicate values.  
+     *\param ordering_tag_skip_value Do not reorder entities with this tag
+     *                     value. This is typically the default value of
+     *                     ordering_tag.  Specifying this limits the re-ordering
+     *                     to only those entities for which ordering_tag has 
+     *                     been set.
+     *\param new_handle_tag_out  Passed back new tag handle containing the 
+     *                     entity mapping.  The returned tag will be anonymous.
+     *                     The caller is responsible for releasing the tag.  
+     *                     The value of this tag on each handle is the new 
+     *                     handle that the entity will will be moved to. The 
+     *                     tag value will be zero for entities that were not 
+     *                     re-ordered.


More information about the moab-dev mailing list