moab
QuadraticHex.hpp
Go to the documentation of this file.
00001 #ifndef QUADRATIC_HEX_HPP
00002 #define QUADRATIC_HEX_HPP
00003 
00005 #include "moab/ElemEvaluator.hpp"
00006 
00007 namespace moab 
00008 {
00009     
00010 class QuadraticHex
00011 {
00012 public:
00014   static ErrorCode evalFcn(const double *params, const double *field, const int ndim, const int num_tuples, 
00015                            double *work, double *result);
00016         
00018   static ErrorCode reverseEvalFcn(EvalFcn eval, JacobianFcn jacob, InsideFcn ins, 
00019                                   const double *posn, const double *verts, const int nverts, const int ndim,
00020                                   const double iter_tol, const double inside_tol, double *work, 
00021                                   double *params, int *is_inside);
00022         
00024   static ErrorCode jacobianFcn(const double *params, const double *verts, const int nverts, const int ndim, 
00025                                double *work, double *result);
00026         
00028   static ErrorCode integrateFcn(const double *field, const double *verts, const int nverts, const int ndim, const int num_tuples, 
00029                                 double *work, double *result);
00030 
00032   static int insideFcn(const double *params, const int ndim, const double tol);
00033   
00034   static EvalSet eval_set() 
00035       {
00036         return EvalSet(evalFcn, reverseEvalFcn, jacobianFcn, integrateFcn, NULL, insideFcn);
00037       }
00038       
00039   static bool compatible(EntityType tp, int numv, EvalSet &eset) 
00040       {
00041         if (tp == MBHEX && numv == 27) {
00042           eset = eval_set();
00043           return true;
00044         }
00045         else return false;
00046       }
00047   
00048 protected:
00049   static double SH(const int i, const double params);
00050   static double DSH(const int i, const double params);
00051   
00052     /* Preimages of the vertices -- "canonical vertices" -- are known as "corners". */
00053   static const int corner[27][3];
00054   static const double gauss[8][2];// TODO fix me
00055   static const unsigned int corner_count = 27;
00056   static const unsigned int gauss_count  = 8; // TODO fix me
00057       
00058 };// class QuadraticHex
00059 
00060 } // moab namespace
00061 
00062 #endif
00063 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines