baseq12d.h

Go to the documentation of this file.
00001 #ifndef __baseq12d_h
00002 #define __baseq12d_h
00003 
00004 #include  <vector>
00005 #include  <string>
00006 #include  <utility>
00007 #include  "vertex.h"
00008 #include  "numfixarray.h"
00009 #include  "base2d.h"
00010 
00011 #define NDOF   4
00012 #define NDOF1d 2
00013 
00014 /**************************************************/
00015 
00016 namespace Gascoigne
00017 {
00018 
00023 
00027 
00028 class BaseQ12d : public Base2d
00029 {
00030  protected:
00031 
00032   fixarray<2,double>          a,b;
00033   mutable DoubleVector dxy;
00034 
00035   void BasicInit();
00036 
00037   double psi_x(int i, double x) const { return b[i]; }
00038 
00039  public:
00040   
00041   BaseQ12d();
00042 
00043   double psi  (int i, double x) const { return a[i] + b[i]*x;}
00044   int    n()                    const { return NDOF;}
00045   void   point(const Vertex2d& s) const;
00046 
00047   double phi   (int i) const {return N  [i];}
00048   double phi_x (int i) const {return DN [i].x();}
00049   double phi_y (int i) const {return DN [i].y();}
00050   double phi_xx(int i) const {return 0.;}
00051   double phi_yy(int i) const {return 0.;}
00052 /*   double phi_xy(int i) const {return 0.;} */
00053   double phi_xy(int i) const {assert(0); return dxy[i];}
00054   const Vertex2d &  phi_grad (int i) const {return DN [i];}
00055 };
00056 }
00057 
00058 #undef NDOF
00059 #undef NDOF1d
00060 
00061 #endif

Generated on Thu Sep 14 10:34:35 2006 for Gascoigne by  doxygen 1.4.7