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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Sun Apr 22 08:31:41 CDT 2012


Author: iulian
Date: 2012-04-22 08:31:40 -0500 (Sun, 22 Apr 2012)
New Revision: 5488

Modified:
   MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
   MOAB/trunk/tools/mbcoupler/ElemUtil.hpp
   MOAB/trunk/tools/mbcoupler/ElemUtilTest.cpp
Log:
first pass at spectral element in coupler
preferred constructor for SpectralHex is the one in which the coordinates of the
GL points are passed in blocked form. No data is copied, only pointers 
need to add test



Modified: MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/ElemUtil.cpp	2012-04-19 16:14:17 UTC (rev 5487)
+++ MOAB/trunk/tools/mbcoupler/ElemUtil.cpp	2012-04-22 13:31:40 UTC (rev 5488)
@@ -207,14 +207,14 @@
 // xyz: input, point to find
 // rst: output: parametric coords of xyz inside the element. If xyz is outside the element, rst will be the coords of the closest point
 // dist: output: distance between xyz and the point with parametric coords rst
-extern "C"{
+/*extern "C"{
 #include "types.h"
 #include "poly.h"
 #include "tensor.h"
 #include "findpt.h"
 #include "extrafindpt.h"
 #include "errmem.h"
-}
+}*/
 
 void hex_findpt(real *xm[3],
                 int n,
@@ -591,7 +591,116 @@
     return I;
   }// LinearTet::integrate_scalar_field()
 
+  // SpectralHex
 
+  // filescope for static member data that is cached
+  int SpectralHex::_n;
+  real *SpectralHex::_z[3];
+  lagrange_data SpectralHex::_ld[3];
+  opt_data_3 SpectralHex::_data;
+  real * SpectralHex::_odwork;
+
+  bool SpectralHex::_init = false;
+
+  SpectralHex::SpectralHex() : Map(0)
+  {
+  }
+  // the preferred constructor takes pointers to GL blocked positions
+  SpectralHex::SpectralHex(int order, double * x, double *y, double *z) : Map(0)
+  {
+    Init(order);
+    _xyz[0]=x; _xyz[1]=y; _xyz[2]=z;
+  }
+  SpectralHex::~SpectralHex()
+  {
+    if (_init)
+      freedata();
+    _init=false;
+  }


More information about the moab-dev mailing list