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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Fri Sep 7 18:19:27 CDT 2012


Author: iulian
Date: 2012-09-07 18:19:27 -0500 (Fri, 07 Sep 2012)
New Revision: 5729

Added:
   MOAB/trunk/examples/IntxMeshesOnSphere.cpp
   MOAB/trunk/examples/eulerHomme.vtk
   MOAB/trunk/examples/lagrangeHomme.vtk
Log:
example of intersection of quad meshes on a sphere
all edges are great circle arcs
intersection is done in 6 gnomonic planes, and projected back on the sphere


Added: MOAB/trunk/examples/IntxMeshesOnSphere.cpp
===================================================================
--- MOAB/trunk/examples/IntxMeshesOnSphere.cpp	                        (rev 0)
+++ MOAB/trunk/examples/IntxMeshesOnSphere.cpp	2012-09-07 23:19:27 UTC (rev 5729)
@@ -0,0 +1,1201 @@
+/*
+ * IntxMeshesOnSphere.cpp
+ *
+ *  This test is for intersection of 2d meshes on the same sphere; the meshes are formed by quads
+ *
+ *  inputs are 2 meshes, vtk format, output will be another mesh, m3, with the common part
+ *    intersected
+ *
+ *  Created on: Sep 2, 2012
+ *      Author: iulian
+ */
+
+#include <iostream>
+#include <sstream>
+#include <time.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "moab/Core.hpp"
+#include "moab/Interface.hpp"
+#include "moab/Range.hpp"
+#include "moab/CartVect.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 maybe check that the meshes are correct, completely
+// covering spheres and not leaving gaps
+EntityHandle mbs1; // set 1, blue triangles
+EntityHandle mbs2;
+EntityHandle outSet;
+Interface * mb; // global
+double R; // radius; should be input to the problem;
+
+Tag BlueFlagTag; // to mark blue quads already considered
+


More information about the moab-dev mailing list