baseq23d.h

Go to the documentation of this file.
00001 #ifndef __baseq23d_h
00002 #define __baseq23d_h
00003 
00004 #include  <vector>
00005 #include  <string>
00006 #include  <utility>
00007 #include  <cassert>
00008 #include  "vertex.h"
00009 #include  "numfixarray.h"
00010 #include  "base3d.h"
00011 
00012 #define NDOF   27
00013 #define NDOF1d 3
00014 
00015 namespace Gascoigne
00016 {
00017 
00022 
00026 
00027 class BaseQ23d : public Base3d
00028 {
00029 
00030  protected:
00031 
00032   fixarray<NDOF1d,double>        a,b,c;
00033   
00034   double psi   (int i, double x) const { return a[i] + b[i]*x + c[i]*x*x;}
00035   double psi_x (int i, double x) const { return b[i] + 2.*c[i]*x;       }
00036   double psi_xx(int i, double x) const { return 2.*c[i];       }
00037 
00038  public:
00039   
00040   BaseQ23d();
00041 
00042   int  n() const {return NDOF;}
00043   void point(const Vertex3d& s) const;
00044 
00045   double phi   (int i) const {return N  [i];}
00046   double phi_x (int i) const {return DN [i].x();}
00047   double phi_y (int i) const {return DN [i].y();}
00048   double phi_z (int i) const {return DN [i].z();}
00049   double phi_xx(int i) const { assert(0);}
00050   double phi_yy(int i) const { assert(0);}
00051   double phi_zz(int i) const { assert(0);}
00052   double phi_xy(int i) const { assert(0);}
00053   double phi_xz(int i) const { assert(0);}
00054   double phi_yz(int i) const { assert(0);}
00055 
00056   const Vertex3d&  phi_grad (int i) const {return DN [i];}
00057 };
00058 }
00059 
00060 #undef NDOF
00061 #undef NDOF1d
00062 
00063 #endif

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