[MOAB-dev] r5582 - MOAB/trunk/examples

iulian at mcs.anl.gov iulian at mcs.anl.gov
Mon Jun 18 01:38:24 CDT 2012


Author: iulian
Date: 2012-06-18 01:38:24 -0500 (Mon, 18 Jun 2012)
New Revision: 5582

Added:
   MOAB/trunk/examples/IntxMeshes.cpp
   MOAB/trunk/examples/m1.vtk
   MOAB/trunk/examples/m2.vtk
Modified:
   MOAB/trunk/examples/Makefile.am
Log:
move intersect 2d meshes code from MeshKit to MOAB
 temporarily is an example
 works with triangles in 2d
 output is now a set of convex MBPOLYGON elements
 use one moab instance, instead of three in meshkit
 TODO: 1) do not duplicate nodes
       2) extend to quads 
       3) extend to meshes in spherical coordinates
       4) find a proper place in moab library/src (is it a utility, tool, or
            even a separate climate-related-stuff library?)
       5) encapsulate properly


Added: MOAB/trunk/examples/IntxMeshes.cpp
===================================================================
--- MOAB/trunk/examples/IntxMeshes.cpp	                        (rev 0)
+++ MOAB/trunk/examples/IntxMeshes.cpp	2012-06-18 06:38:24 UTC (rev 5582)
@@ -0,0 +1,882 @@
+/*
+ * IntersectMesh_test.cpp
+ *
+ *  This test is for intersection of 2d meshes, on top of each other, for
+ *   a domain decomposition algorithm; it leverages the method from ProjectShell algorithm.
+ *
+ *  inputs are 2 meshes, vtk format, output will be another mesh, m3, with the common part
+ *    intersected
+ *
+ *  Created on: Aug 19, 2010
+ *      Author: iulian
+ */
+
+#include <iostream>
+#include <time.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "moab/Core.hpp"
+#include "moab/Interface.hpp"
+#include "moab/Range.hpp"
+
+using namespace std;
+using namespace moab;
+
+#define STRINGIFY_(X) #X
+#define STRINGIFY(X) STRINGIFY_(X)
+
+#include <queue>
+//#include <map>
+#include <vector>
+#include <iostream>
+#include <fstream>
+#include <math.h>
+
+// we should really work only with triangles in their sets;
+// can we get adjacencies limited to a set?
+// how do we check if a triangle is really part of a set?
+EntityHandle mbs1;// set 1, blue triangles
+EntityHandle mbs2;
+EntityHandle outSet;
+Interface * mb;// global
+
+Tag BlueFlagTag; // to mark blue triangles already considered
+
+Tag RedFlagTag; // to mark blue triangles already considered


More information about the moab-dev mailing list