moab
LinearHex.hpp
Go to the documentation of this file.
00001 #ifndef LINEAR_HEX_HPP
00002 #define LINEAR_HEX_HPP
00003 
00005 #include "moab/ElemEvaluator.hpp"
00006 
00007 namespace moab 
00008 {
00009     
00010 class LinearHex 
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, (InitFcn)NULL, insideFcn);
00037       }
00038       
00039   static bool compatible(EntityType tp, int numv, EvalSet &eset) 
00040       {
00041         if (tp == MBHEX && numv == 8) {
00042           eset = eval_set();
00043           return true;
00044         }
00045         else return false;
00046       }
00047   
00048 protected:
00049     /* Preimages of the vertices -- "canonical vertices" -- are known as "corners". */
00050   static const double corner[8][3];
00051   static const double gauss[1][2];
00052   static const unsigned int corner_count = 8;
00053   static const unsigned int gauss_count  = 1;
00054       
00055 };// class LinearHex
00056 
00057 } // namespace moab
00058 
00059 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines