[MOAB-dev] r5713 - MOAB/trunk/src/moab/point_locater
rhl6856 at mcs.anl.gov
rhl6856 at mcs.anl.gov
Wed Aug 29 13:17:27 CDT 2012
Author: rhl6856
Date: 2012-08-29 13:17:27 -0500 (Wed, 29 Aug 2012)
New Revision: 5713
Modified:
MOAB/trunk/src/moab/point_locater/spectral_hex_map.hpp
Log:
spectral
Modified: MOAB/trunk/src/moab/point_locater/spectral_hex_map.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/spectral_hex_map.hpp 2012-08-29 18:17:26 UTC (rev 5712)
+++ MOAB/trunk/src/moab/point_locater/spectral_hex_map.hpp 2012-08-29 18:17:27 UTC (rev 5713)
@@ -1,5 +1,5 @@
-#ifndef MOAB_LINEAR_HEX_HPP
-#define MOAB_LINEAR_HEX_HPP
+#ifndef MOAB_SPECTRAL_HEX_HPP
+#define MOAB_SPECTRAL_HEX_HPP
#include "moab/Matrix3.hpp"
#include "moab/CartVect.hpp"
@@ -27,17 +27,34 @@
} //non-exported functionality
template< typename _Matrix>
-class Linear_hex_map {
+class Spectral_hex_map {
public:
typedef _Matrix Matrix;
private:
- typedef Linear_hex_map< Matrix> Self;
+ typedef Spectral_hex_map< Matrix> Self;
public:
//Constructor
- Linear_hex_map() {}
+ Spectral_hex_map() {}
+ Spectral_hex_map( const int order,const double x,
+ const double y, const double z){
+ initialize_spectral_hex(order);
+ _xyz[ 0] = x; _xyz[ 1] = y; _xyz[ 2] = z;
+ }
//Copy constructor
- Linear_hex_map( const Self & f ) {}
-
+ Spectral_hex_map( const Self & f ) {}
+ private:
+ void initialize_spectral_hex( int order){
+ if (_init && _n==order){ return; }
+ _init = true;
+ _n = order;
+ for( int d = 0; d < 3; d++){
+ lobatto_nodes(&_d[ d], _n);
+ lagrange_setup(&_ld[ d], _z[ d], _n);
+ }
+ opt_alloc_3(&_data, _ld);
+ std::size_t nf = _n*n, ne = _n, nw = 2*_n*_n + 3*_n;
+ _odwork.resize( 6*nf + 9*ne + nw);
+ }
public:
//Natural coordinates
More information about the moab-dev
mailing list