Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
moab::SpectralHex Class Reference

#include <SpectralHex.hpp>

+ Collaboration diagram for moab::SpectralHex:

Static Public Member Functions

static ErrorCode evalFcn (const double *params, const double *field, const int ndim, const int num_tuples, double *work, double *result)
 Forward-evaluation of field at parametric coordinates.
static ErrorCode reverseEvalFcn (EvalFcn eval, JacobianFcn jacob, InsideFcn ins, const double *posn, const double *verts, const int nverts, const int ndim, const double iter_tol, const double inside_tol, double *work, double *params, int *is_inside)
 Reverse-evaluation of parametric coordinates at physical space position.
static ErrorCode jacobianFcn (const double *params, const double *verts, const int nverts, const int ndim, double *work, double *result)
 Evaluate the jacobian at a specified parametric position.
static ErrorCode integrateFcn (const double *field, const double *verts, const int nverts, const int ndim, const int num_tuples, double *work, double *result)
 Forward-evaluation of field at parametric coordinates.
static ErrorCode initFcn (const double *verts, const int nverts, double *&work)
 Initialize this EvalSet.
static int insideFcn (const double *params, const int ndim, const double tol)
 Function that returns whether or not the parameters are inside the natural space of the element.
static EvalSet eval_set ()
static bool compatible (EntityType tp, int numv, EvalSet &eset)

Static Protected Attributes

static int _n
static double * _z [3]
static lagrange_data _ld [3]
static opt_data_3 _data
static double * _odwork
static bool init_

Detailed Description

Definition at line 12 of file SpectralHex.hpp.


Member Function Documentation

static bool moab::SpectralHex::compatible ( EntityType  tp,
int  numv,
EvalSet eset 
) [inline, static]

Definition at line 66 of file SpectralHex.hpp.

References eval_set(), and MBHEX.

    {
        if( tp != MBHEX ) return false;
        int i;
        for( i = 3; i * i * i == numv || i * i * i > numv; i++ )
            ;
        if( i * i * i != numv ) return false;
        eset = eval_set();
        return true;
    }
static EvalSet moab::SpectralHex::eval_set ( ) [inline, static]

Definition at line 61 of file SpectralHex.hpp.

Referenced by compatible().

static ErrorCode moab::SpectralHex::evalFcn ( const double *  params,
const double *  field,
const int  ndim,
const int  num_tuples,
double *  work,
double *  result 
) [static]

Forward-evaluation of field at parametric coordinates.

void moab::SpectralHex::initFcn ( const double *  verts,
const int  nverts,
double *&  work 
) [static]

Initialize this EvalSet.

Definition at line 18 of file SpectralHex.cpp.

References _data, _ld, _n, _odwork, _z, lagrange_setup(), lobatto_nodes(), opt_alloc_3(), and tmalloc.

{
    if( _init && _n == order ) return;
    if( _init && _n != order )
    {
        // TODO: free data cached
        freedata();
    }
    // compute stuff that depends only on order
    _init = true;
    _n    = order;
    // triplicates! n is the same in all directions !!!
    for( int d = 0; d < 3; d++ )
    {
        _z[d] = tmalloc( double, _n );
        lobatto_nodes( _z[d], _n );
        lagrange_setup( &_ld[d], _z[d], _n );
    }
    opt_alloc_3( &_data, _ld );

    unsigned int nf = _n * _n, ne = _n, nw = 2 * _n * _n + 3 * _n;
    _odwork = tmalloc( double, 6 * nf + 9 * ne + nw );
}
int moab::SpectralHex::insideFcn ( const double *  params,
const int  ndim,
const double  tol 
) [static]

Function that returns whether or not the parameters are inside the natural space of the element.

Definition at line 183 of file SpectralHex.cpp.

{
    return EvalSet::inside( params, ndim, tol );
}
static ErrorCode moab::SpectralHex::integrateFcn ( const double *  field,
const double *  verts,
const int  nverts,
const int  ndim,
const int  num_tuples,
double *  work,
double *  result 
) [static]

Forward-evaluation of field at parametric coordinates.

static ErrorCode moab::SpectralHex::jacobianFcn ( const double *  params,
const double *  verts,
const int  nverts,
const int  ndim,
double *  work,
double *  result 
) [static]

Evaluate the jacobian at a specified parametric position.

static ErrorCode moab::SpectralHex::reverseEvalFcn ( EvalFcn  eval,
JacobianFcn  jacob,
InsideFcn  ins,
const double *  posn,
const double *  verts,
const int  nverts,
const int  ndim,
const double  iter_tol,
const double  inside_tol,
double *  work,
double *  params,
int *  is_inside 
) [static]

Reverse-evaluation of parametric coordinates at physical space position.


Member Data Documentation

int moab::SpectralHex::_n [static, protected]

Definition at line 78 of file SpectralHex.hpp.

Referenced by initFcn().

real * moab::SpectralHex::_z [static, protected]

Definition at line 79 of file SpectralHex.hpp.

Referenced by moab::Element::SpectralHex::freedata(), and initFcn().

bool moab::SpectralHex::init_ [static, protected]

Definition at line 83 of file SpectralHex.hpp.

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines