moab
LinearTri.hpp
Go to the documentation of this file.
00001 #ifndef LINEAR_TRI_HPP
00002 #define LINEAR_TRI_HPP
00003 
00005 #include "moab/ElemEvaluator.hpp"
00006 
00007 namespace moab 
00008 {
00009     
00010 class LinearTri 
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 ErrorCode initFcn(const double *verts, const int nverts, double *&work);
00033       
00035   static int insideFcn(const double *params, const int ndim, const double tol);
00036   
00037   static ErrorCode evaluate_reverse(EvalFcn eval, JacobianFcn jacob, InsideFcn inside_f,
00038                                     const double *posn, const double *verts, const int nverts, 
00039                                     const int ndim, const double iter_tol, const double inside_tol, double *work, 
00040                                     double *params, int *inside);
00041 
00042   static EvalSet eval_set() 
00043       {
00044         return EvalSet(evalFcn, reverseEvalFcn, jacobianFcn, integrateFcn, initFcn, insideFcn);
00045       }
00046       
00047   static bool compatible(EntityType tp, int numv, EvalSet &eset) 
00048       {
00049         if (tp == MBTRI && numv >= 3) {
00050           eset = eval_set();
00051           return true;
00052         }
00053         else return false;
00054       }
00055   
00056 protected:
00057       
00058   static const double corner[3][2];
00059 };// class LinearTri
00060 
00061 } // namespace moab
00062 
00063 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines