MOAB: Mesh Oriented datABase
(version 5.2.1)
|
00001 #ifndef QUADRATIC_HEX_HPP 00002 #define QUADRATIC_HEX_HPP 00003 /**\brief Shape function space for trilinear hexahedron, obtained by a pushforward of the canonical 00004 * linear (affine) functions. */ 00005 00006 #include "moab/ElemEvaluator.hpp" 00007 00008 namespace moab 00009 { 00010 00011 class QuadraticHex 00012 { 00013 public: 00014 /** \brief Forward-evaluation of field at parametric coordinates */ 00015 static ErrorCode evalFcn( const double* params, const double* field, const int ndim, const int num_tuples, 00016 double* work, double* result ); 00017 00018 /** \brief Reverse-evaluation of parametric coordinates at physical space position */ 00019 static ErrorCode reverseEvalFcn( EvalFcn eval, JacobianFcn jacob, InsideFcn ins, const double* posn, 00020 const double* verts, const int nverts, const int ndim, const double iter_tol, 00021 const double inside_tol, double* work, double* params, int* is_inside ); 00022 00023 /** \brief Evaluate the normal at a specified facet*/ 00024 static ErrorCode normalFcn( const int ientDim, const int facet, const int nverts, const double* verts, 00025 double normal[] ); 00026 00027 /** \brief Evaluate the jacobian at a specified parametric position */ 00028 static ErrorCode jacobianFcn( const double* params, const double* verts, const int nverts, const int ndim, 00029 double* work, double* result ); 00030 00031 /** \brief Forward-evaluation of field at parametric coordinates */ 00032 static ErrorCode integrateFcn( const double* field, const double* verts, const int nverts, const int ndim, 00033 const int num_tuples, double* work, double* result ); 00034 00035 /** \brief Function that returns whether or not the parameters are inside the natural space of 00036 * the element */ 00037 static int insideFcn( const double* params, const int ndim, const double tol ); 00038 00039 static EvalSet eval_set() 00040 { 00041 return EvalSet( evalFcn, reverseEvalFcn, normalFcn, jacobianFcn, integrateFcn, NULL, insideFcn ); 00042 } 00043 00044 static bool compatible( EntityType tp, int numv, EvalSet& eset ) 00045 { 00046 if( tp == MBHEX && numv == 27 ) 00047 { 00048 eset = eval_set(); 00049 return true; 00050 } 00051 else 00052 return false; 00053 } 00054 00055 protected: 00056 static double SH( const int i, const double params ); 00057 static double DSH( const int i, const double params ); 00058 00059 /* Preimages of the vertices -- "canonical vertices" -- are known as "corners". */ 00060 static const int corner[27][3]; 00061 static const double gauss[8][2]; // TODO fix me 00062 static const unsigned int corner_count = 27; 00063 static const unsigned int gauss_count = 8; // TODO fix me 00064 00065 }; // class QuadraticHex 00066 00067 } // namespace moab 00068 00069 #endif