[MOAB-dev] r4384 - in MOAB/trunk/src: . moab

tautges at mcs.anl.gov tautges at mcs.anl.gov
Sat Dec 18 08:37:41 CST 2010


Author: tautges
Date: 2010-12-18 08:37:41 -0600 (Sat, 18 Dec 2010)
New Revision: 4384

Added:
   MOAB/trunk/src/ScdInterface.cpp
   MOAB/trunk/src/moab/ScdInterface.hpp
Log:
Sorry for breaking the build so frequently lately... this is the
structured mesh interface.



Added: MOAB/trunk/src/ScdInterface.cpp
===================================================================
--- MOAB/trunk/src/ScdInterface.cpp	                        (rev 0)
+++ MOAB/trunk/src/ScdInterface.cpp	2010-12-18 14:37:41 UTC (rev 4384)
@@ -0,0 +1,365 @@
+#include "moab/ScdInterface.hpp"
+#include "moab/Core.hpp"
+#include "SequenceManager.hpp"
+#include "EntitySequence.hpp"
+#include "StructuredElementSeq.hpp"
+#include "VertexSequence.hpp"
+#include "ScdVertexData.hpp"
+#include "assert.h"
+#include <iostream>
+
+#define ERRORR(rval, str) {if (MB_SUCCESS != rval)                    \
+      {std::cerr << str; return rval; }}
+
+        
+namespace moab 
+{
+    
+ScdInterface::ScdInterface(Core *impl, bool boxes) 
+        : mbImpl(impl), searchedBoxes(false)
+{
+  if (boxes) find_boxes(scdBoxes);
+}
+
+  // Destructor
+ScdInterface::~ScdInterface() 
+{
+  for (Range::iterator rit = scdBoxes.begin(); rit != scdBoxes.end(); rit++)
+    delete get_scd_box(*rit);
+
+  if (box_set_tag(false)) 
+    mbImpl->tag_delete(box_set_tag());
+
+}
+
+Interface *ScdInterface::impl() const
+{
+  return mbImpl;
+}
+
+ErrorCode ScdInterface::find_boxes(std::vector<ScdBox*> &scd_boxes) 
+{
+  Range tmp_boxes;
+  ErrorCode rval = find_boxes(tmp_boxes);
+  if (MB_SUCCESS != rval) return rval;
+
+  for (Range::iterator rit = tmp_boxes.begin(); rit != tmp_boxes.end(); rit++) {


More information about the moab-dev mailing list