[MOAB-dev] r5702 - MOAB/trunk/tools/mbcoupler

iulian at mcs.anl.gov iulian at mcs.anl.gov
Fri Aug 17 02:10:31 CDT 2012


Author: iulian
Date: 2012-08-17 02:10:31 -0500 (Fri, 17 Aug 2012)
New Revision: 5702

Modified:
   MOAB/trunk/tools/mbcoupler/Coupler.cpp
   MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
   MOAB/trunk/tools/mbcoupler/ElemUtil.hpp
Log:
introduce a 27-node quadratic hex for coupling
integration is not done yet, still need to decide 
an integration scheme. probably a 2x2x2 gaussian is fine


Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp	2012-08-16 06:28:45 UTC (rev 5701)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp	2012-08-17 07:10:31 UTC (rev 5702)
@@ -707,14 +707,31 @@
       }
 
       if (etype == MBHEX) {
-        Element::LinearHex hexmap(coords_vert);
-        try {
-          tmp_nat_coords = hexmap.ievaluate(CartVect(xyz), epsilon);
+        if (8==num_connect)
+        {
+          Element::LinearHex hexmap(coords_vert);
+          try {
+            tmp_nat_coords = hexmap.ievaluate(CartVect(xyz), epsilon);
+          }
+          catch (Element::Map::EvaluationError) {
+            continue;
+          }
+          if (!hexmap.inside_nat_space(tmp_nat_coords, epsilon))
+            continue;
         }
-        catch (Element::Map::EvaluationError) {
-          continue;
+        else if (27==num_connect)
+        {
+          Element::QuadraticHex hexmap(coords_vert);
+          try {
+            tmp_nat_coords = hexmap.ievaluate(CartVect(xyz), epsilon);
+          }
+          catch (Element::Map::EvaluationError) {
+            continue;
+          }
+          if (!hexmap.inside_nat_space(tmp_nat_coords, epsilon))
+            continue;
         }
-        if (!hexmap.inside_nat_space(tmp_nat_coords, epsilon))
+        else // TODO this case not treated yet, no interpolation
           continue;
       }
       else if (etype == MBTET){
@@ -764,15 +781,27 @@
   }
   else
   {
-    double vfields[8]; // will work for Hexes or Tets
+    double vfields[27]; // will work for linear hex, quadratic hex or Tets
     moab::Element::Map *elemMap;
     int num_verts = 0;
     // get the EntityType


More information about the moab-dev mailing list