base3d.h

Go to the documentation of this file.
00001 #ifndef __base3d_h
00002 #define __base3d_h
00003 
00004 #include  "base.h"
00005 #include  "gascoigne.h"
00006 
00007 /**************************************************/
00008 
00009 namespace Gascoigne
00010 {
00011 class Base3d : public Base
00012 {
00013  protected:
00014 
00015   mutable DoubleVector             N;
00016   mutable std::vector<Vertex3d>       DN;
00017   mutable fixarray<2,int>             face;
00018   mutable Vertex3d  bn, bt;
00019 
00020  public:
00021   
00022   Base3d()  {}
00023   const Vertex3d*  normal3d() const {return &bn;}
00024   const Vertex3d*  tangent3d() const {assert(0); return NULL;}
00025   const fixarray<2,int>* faces() const {return &face;}
00026   
00027   void point_boundary(int ie, const Vertex2d& s1) const
00028     {
00029       Vertex3d s;
00030       if     (ie==0)      
00031         {
00032            s.x() = s1.x(); s.y() = s1.y(); s.z() = 0.;
00033           bn.x() = 0.;    bn.y() = 0.;    bn.z() = -1.;
00034           face[0] = 0; face[1] = 1;
00035         }
00036       else if(ie==1)      
00037         {
00038            s.x() = 1.;  s.y() = s1.y(); s.z() = s1.x();
00039           bn.x() = 1.; bn.y() = 0.;    bn.z() = 0.;
00040           face[0] = 2; face[1] = 1;
00041         }
00042       else if(ie==2)      
00043         {
00044            s.x() = s1.x(); s.y() = 1.;  s.z() = s1.y();
00045           bn.x() = 0.;    bn.y() = 1.; bn.z() = 0.;
00046           face[0] = 0; face[1] = 2;
00047         }
00048       else if(ie==3)
00049         {
00050            s.x() = 0.; s.y() = s1.y(); s.z() = 1.-s1.x();
00051           bn.x() = -1.; bn.y() =  0.; bn.z() = 0.;
00052           face[0] = 1; face[1] = 2;
00053         }
00054       else if(ie==4)      
00055         {
00056            s.x() = s1.x(); s.y() = 0.;   s.z() = 1.-s1.y();
00057           bn.x() = 0.;    bn.y() = -1.; bn.z() = 0.;
00058           face[0] = 0; face[1] = 2;
00059         }
00060       else
00061         {
00062            s.x() = 1.-s1.x(); s.y() = s1.y(); s.z() = 1.;
00063           bn.x() = 0.;       bn.y() = 0.;    bn.z() = 1.;
00064           face[0] = 0; face[1] = 1;
00065         }
00066       point(s);
00067     }
00068 };
00069 }
00070 
00071 #endif

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