Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ElmDefs.h

Go to the documentation of this file.
00001 
00005 class ElmTensorProd : public ElmDef
00006 
00007 {
00008 protected:
00009 
00010  ~ElmTensorProd ();
00011 public:
00012 
00013   ElmTensorProd  (int nsd, int order);
00014 
00015   virtual NumItgDomain getSideShape (int /*side*/) const    { return BOX; }
00016   virtual void geomtFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
00017   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const
00018     { geomtFunc (N, loc_pt); }
00019   virtual void dLocGeomtFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
00020   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const
00021     { dLocGeomtFunc (dNloc, loc_pt); }
00022   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
00023      const;
00024 
00025 
00026   virtual bool findLocPt     
00027     (
00028      const Ptv(real)& globpt,   
00029            Ptv(real)& locpt,    
00030            int&       niter,    
00031            real&      error,    
00032      const Mat(real)& coor      
00033       ) { return ElmDef ::findLocPt(globpt,locpt,niter,error,coor); }
00034 
00035   virtual void drawElement
00036     (const Mat(real)&   coor,           
00037            GraphBasics& plotter,        
00038            int          resolution = 1  
00039     )const
00040   { drawAllSides (coor, plotter, resolution); }
00041 
00042   virtual void drawSide
00043     (      int          side,           
00044      const Mat(real)&   coor,           
00045            GraphBasics& plotter,        
00046            int          resolution = 1  
00047     )const
00048   {
00049     if (n1D == 2) resolution = 1;
00050     drawBoxElmSide (side, coor, plotter, resolution);
00051   }
00052 
00053   virtual void drawEdge
00054     (      int          side1,          
00055            int          side2,          
00056      const Mat(real)&   coor,           
00057            GraphBasics& plotter,        
00058            int          resolution = 1  
00059     )const
00060   { if (n1D == 2) resolution = 1;
00061     if (nsd == 3) drawBoxElmEdge (side1, side2, coor, plotter, resolution);
00062     else errorFP("ElmTensorProd ::drawEdge","undefined function in 2D");
00063   }
00064 
00065   virtual void calcMidSideNodes (Mat(real)& coor);
00066   virtual int getNoNodesOnEdge () const  { return n1D; }
00067   static void setUpNodesOnSides (int n1D, int nsd, MatSimple(int)& side_nodes);
00068   static void setUpNodeCoor     (int n1D, int nsd, MatSimple(real)& loc_coor);
00069 
00070 protected:
00071 
00072   int n1D;  
00073 
00074 public:
00075 
00076   static void   basis1D (Vec(real)&   Ni_1D, int n1D, real ksi);
00077   static void  Dbasis1D (Vec(real)&  dNi_1D, int n1D, real ksi);
00078   static void D2basis1D (Vec(real)& d2Ni_1D, int n1D, real ksi);
00079 
00080   CLASS_INFO
00081 };
00082 
00083 
00165 class ElmTensorProd1 : public ElmTensorProd
00166 
00167 {
00168 public:
00169 
00170   static real elmSideArea(int side, const Mat(real) coor, int nsd);
00171   static void normalVector(int side, const Mat(real) coor, Ptv(real)& normal,
00172                            int nsd);
00173   static void getLocalMidPoint(int side, Ptv(real)& coor, int nsd);
00174 
00175 
00176   ElmTensorProd1 (int nsd_) : ElmTensorProd (nsd_, 1) {}
00177 
00178  ~ElmTensorProd1 () {}
00179 
00180   CLASS_INFO
00181 };
00182 
00183 
00210 class ElmTensorProd2 : public ElmTensorProd
00211 
00212 {
00213 public:
00214   ElmTensorProd2 (int nsd_) : ElmTensorProd (nsd_, 2) {}
00215 
00216  ~ElmTensorProd2 () {}
00217 
00218   CLASS_INFO
00219 };
00220 
00221 
00248 class ElmB2n1D : public ElmTensorProd
00249 
00250 {
00251 public:
00252   ElmB2n1D ();
00253  ~ElmB2n1D () {}
00254 
00255   virtual void geomtFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
00256   virtual void dLocGeomtFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
00257   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
00258      const;
00259 
00260   virtual void fillNodePath (MatSimplest(int)& nodes, bool vertices_only);
00261 
00262   CLASS_INFO
00263 };
00264 
00265 
00297 class ElmB3n1D : public ElmTensorProd
00298 
00299 {
00300 public:
00301   ElmB3n1D ();
00302  ~ElmB3n1D () {}
00303 
00304   virtual void fillNodePath (MatSimplest(int)& nodes, bool vertices_only);
00305 
00306   CLASS_INFO
00307 };
00308 
00309 
00335 class ElmBH2n1D : public ElmB2n1D
00336 
00337 {
00338 public:
00339   ElmBH2n1D ();
00340  ~ElmBH2n1D () {}
00341 
00342   virtual void basisFunc
00343     (
00344            Vec(real)& N,
00345      const Ptv(real)& loc_pt
00346     )const;
00347 
00348   virtual void dLocBasisFunc
00349     (
00350            Mat(real)& dNloc,
00351      const Ptv(real)& loc_pt
00352     )const;
00353 
00354   virtual void d2LocBasisFunc
00355     (      ArrayGen(real)& d2Nloc,
00356      const Ptv(real)& loc_pt
00357     )const;
00358 
00359   virtual int getNoDof4scalarFunction (int /*local_node*/) const
00360     { return 2; }
00361 
00362   CLASS_INFO
00363 };
00364 
00365 
00388 class ElmB4n2D : public ElmTensorProd
00389 
00390 {
00391 public:
00392   ElmB4n2D ();
00393  ~ElmB4n2D () {}
00394 
00395   
00396   virtual void geomtFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
00397   virtual void dLocGeomtFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
00398   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
00399      const;
00400 
00401   static void   shape (Vec(real)&        N,    const Ptv(real)& loc_pt);
00402   static void  dshape (Mat(real)&       dNloc, const Ptv(real)& loc_pt);
00403   static void d2shape (ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt);
00404 
00405   virtual bool findLocPt     
00406     (
00407      const Ptv(real)& globpt,   
00408            Ptv(real)& locpt,    
00409            int&       niter,    
00410            real&      error,    
00411      const Mat(real)& coor      
00412     );
00413 
00414   virtual void drawElement
00415     (
00416      const Mat(real)&   coor,           
00417            GraphBasics& plotter,        
00418            int          resolution = 1  
00419     )const;
00420 
00421   virtual void fillNodePath (MatSimplest(int)& nodes, bool vertices_only);
00422 
00423   CLASS_INFO
00424 };
00425 
00426 
00480 class ElmB9n2D : public ElmTensorProd
00481 
00482 {
00483 public:
00484   ElmB9n2D ();
00485  ~ElmB9n2D () {}
00486 
00487   virtual void calcMidSideNodes (Mat(real)& /*coor*/)
00488      { warningFP("ElmB9n2D ::calcMidSideNodes"," MidSideNode not checked ");}
00489 
00490   virtual void fillNodePath (MatSimplest(int)& nodes, bool vertices_only);
00491 
00492   CLASS_INFO
00493 };
00494 
00495 
00525 class ElmB8n2D : public ElmDef
00526 
00527 {
00528 public:
00529   ElmB8n2D ();
00530  ~ElmB8n2D () {}
00531 
00532   virtual bool canBeInside
00533     (const Ptv(real)& globpt, const Mat(real)& coor) const;
00534 
00535   virtual NumItgDomain getSideShape (int /*side*/) const
00536     { return BOX; }
00537 
00538   virtual void geomtFunc
00539     (
00540            Vec(real)& N,
00541      const Ptv(real)& loc_pt
00542     )const;
00543 
00544   virtual void basisFunc
00545     (
00546            Vec(real)& N,
00547      const Ptv(real)& loc_pt
00548     )const
00549   { geomtFunc (N, loc_pt); }
00550 
00551 
00552   virtual void dLocGeomtFunc
00553     (
00554            Mat(real)& dNloc,
00555      const Ptv(real)& loc_pt
00556     )const;
00557 
00558 
00559   virtual void dLocBasisFunc
00560     (
00561            Mat(real)& dNloc,
00562      const Ptv(real)& loc_pt
00563     )const
00564   { dLocGeomtFunc (dNloc, loc_pt); }
00565 
00566   virtual void d2LocBasisFunc
00567     (
00568            ArrayGen(real)& d2Nloc,
00569      const Ptv(real)& loc_pt
00570     )const;
00571 
00572   static void shape  (Vec(real)& N, const Ptv(real)& loc_pt);
00573   static void dshape (Mat(real)& dNloc, const Ptv(real)& loc_pt);
00574 
00575   virtual void drawElement
00576     (
00577      const Mat(real)&   coor,           
00578            GraphBasics& plotter,        
00579            int          resolution = 1  
00580     )const
00581   { drawAllSides (coor, plotter, resolution); }
00582 
00583   virtual void drawSide
00584     (
00585            int          side,           
00586      const Mat(real)&   coor,           
00587            GraphBasics& plotter,        
00588            int          resolution = 1  
00589     )const
00590   { drawBoxElmSide (side, coor, plotter, resolution); }
00591 
00592 
00593   virtual void calcMidSideNodes (Mat(real)& coor);
00594 
00595 
00596   virtual int getNoNodesOnEdge () const { return 0; /* 2D, no edge */ }
00597 
00598   static void setUpNodeCoor (MatSimple(real)& geomt_coor_);
00599   static void setUpNodesOnSides (MatSimple(int)& geomt_nodes_sides_);
00600 
00601   virtual void fillNodePath (MatSimplest(int)& nodes, bool vertices_only);
00602 
00603   CLASS_INFO
00604 };
00605 
00606 
00658 class ElmB8n3D : public ElmTensorProd
00659 
00660 {
00661 public:
00662   ElmB8n3D ();
00663  ~ElmB8n3D () {}
00664 
00665   
00666   virtual void geomtFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
00667   virtual void dLocGeomtFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
00668   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
00669      const;
00670 
00671   static void shape  (Vec(real)& N, const Ptv(real)& loc_pt);
00672   static void dshape (Mat(real)& dNloc, const Ptv(real)& loc_pt);
00673 
00674   virtual void drawElement
00675     (
00676      const Mat(real)&   coor,           
00677            GraphBasics& plotter,        
00678            int          resolution = 1  
00679     )const;
00680 
00681   CLASS_INFO
00682 };
00683 
00684 
00726 class ElmB27n3D : public ElmTensorProd
00727 
00728 {
00729 public:
00730   ElmB27n3D ();
00731  ~ElmB27n3D () {}
00732 
00733   virtual void calcMidSideNodes (Mat(real)& /*coor*/)
00734      { warningFP("ElmB9n2D ::calcMidSideNodes"," MidSideNode not checked ");}
00735 
00736   CLASS_INFO
00737 };
00738 
00739 
00769 class ElmB20n3D : public ElmDef
00770 
00771 {
00772 public:
00773   ElmB20n3D ();
00774  ~ElmB20n3D () {}
00775 
00776   virtual bool canBeInside
00777     (const Ptv(real)& globpt, const Mat(real)& coor) const;
00778 
00779   virtual NumItgDomain getSideShape (int /*side*/) const
00780     { return BOX; }
00781 
00782 
00783   virtual void geomtFunc
00784     (
00785            Vec(real)& N,
00786      const Ptv(real)& loc_pt
00787     )const;
00788 
00789 
00790   virtual void basisFunc
00791     (
00792            Vec(real)& N,
00793      const Ptv(real)& loc_pt
00794     )const
00795   { geomtFunc (N, loc_pt); }
00796 
00797 
00798   virtual void dLocGeomtFunc
00799     (
00800            Mat(real)& dNloc,
00801      const Ptv(real)& loc_pt
00802     )const;
00803 
00804 
00805   virtual void dLocBasisFunc
00806     (
00807            Mat(real)& dNloc,
00808      const Ptv(real)& loc_pt
00809     )const
00810   { dLocGeomtFunc (dNloc, loc_pt); }
00811 
00812 
00813   virtual void d2LocBasisFunc
00814     (
00815            ArrayGen(real)& d2Nloc,
00816      const Ptv(real)& loc_pt
00817     )const;
00818 
00819 
00820   static void shape  (Vec(real)& N, const Ptv(real)& loc_pt);
00821   static void dshape (Mat(real)& dNloc, const Ptv(real)& loc_pt);
00822 
00823 
00824   virtual void drawElement
00825     (
00826      const Mat(real)&   coor,           
00827            GraphBasics& plotter,        
00828            int          resolution = 1  
00829     )const
00830   { drawAllSides (coor, plotter, resolution); }
00831 
00832 
00833   virtual void drawSide
00834     (
00835            int          side,           
00836      const Mat(real)&   coor,           
00837            GraphBasics& plotter,        
00838            int          resolution = 1  
00839     )const
00840   { drawBoxElmSide (side, coor, plotter, resolution); }
00841 
00842 
00843   virtual void drawEdge
00844     (
00845            int          side1,          
00846            int          side2,          
00847      const Mat(real)&   coor,           
00848            GraphBasics& plotter,        
00849            int          resolution = 1  
00850     )const
00851   { drawBoxElmEdge (side1, side2, coor, plotter, resolution); }
00852 
00853 public:
00854 
00855   virtual void calcMidSideNodes (Mat(real)& coor);
00856 
00857   static void setUpNodeCoor (MatSimple(real)& geomt_coor_);
00858   static void setUpNodesOnSides (MatSimple(int)& geomt_nodes_sides_);
00859 
00860   CLASS_INFO
00861 };
00862 
00863 
00917 class ElmT3n2D : public ElmDef
00918 
00919 {
00920 public:
00921   ElmT3n2D ();
00922  ~ElmT3n2D () {}
00923 
00924   virtual Ptv(real) setCentroid () const;
00925 
00926   virtual bool canBeInside
00927     (const Ptv(real)& globpt, const Mat(real)& coor) const;
00928 
00929   virtual bool isInside (const Ptv(real)& locpt) const;
00930   virtual bool isStrictlyInside (const Ptv(real)& locpt) const;
00931 
00932   virtual bool findLocPt     
00933     (
00934      const Ptv(real)& globpt,   
00935            Ptv(real)& locpt,    
00936            int&       niter,    
00937            real&      error,    
00938      const Mat(real)& coor      
00939     );
00940 
00941   virtual NumItgDomain getSideShape (int /*side*/) const
00942     { return TRIANGLE; /*side = an interval = BOX, = TRIANGLE for tetraedras*/}
00943 
00944 
00945   virtual void geomtFunc
00946     (
00947            Vec(real)& N,
00948      const Ptv(real)& loc_pt
00949     )const;
00950 
00951 
00952   virtual void basisFunc
00953     (
00954            Vec(real)& N,
00955      const Ptv(real)& loc_pt
00956     )const
00957   { geomtFunc (N, loc_pt); }
00958 
00959 
00960 
00961   virtual void dLocGeomtFunc
00962     (
00963            Mat(real)& dNloc,
00964      const Ptv(real)& loc_pt
00965     )const;
00966 
00967 
00968   virtual void dLocBasisFunc
00969     (
00970            Mat(real)& dNloc,
00971      const Ptv(real)& loc_pt
00972     )const
00973   { dLocGeomtFunc (dNloc, loc_pt); }
00974 
00975 
00976   virtual void d2LocBasisFunc
00977     (
00978            ArrayGen(real)& d2Nloc,
00979      const Ptv(real)&      loc_pt
00980     )const;
00981 
00982 
00983   static void shape  (Vec(real)& N, const Ptv(real)& loc_pt);
00984   static void dshape (Mat(real)& dNloc, const Ptv(real)& loc_pt);
00985 
00986   
00987   
00988 
00989   static void calcCoeffInGlobFunc
00990     (
00991            ArrayGen(real)& coeff,  
00992            real&           volume,
00993      const Mat(real)&      elmcoor
00994     );
00995 
00996   static void edgeLengthAndNormalVec
00997     (
00998               int        side,
00999               real&      length,
01000               Ptv(real)& normal_vector,
01001         const Mat(real)& elmcoor
01002     );
01003 
01004   
01005   
01006   
01007 
01008   static void geomtFunc
01009     (
01010            Vec(real)& N,
01011      const Ptv(real)& glob_pt,
01012      const Mat(real)& coor
01013     );
01014 
01015   static void basisFunc
01016     (
01017            Vec(real)& N,
01018      const Ptv(real)& glob_pt,
01019      const Mat(real)& coor
01020     )
01021   { geomtFunc (N, glob_pt, coor); }
01022 
01023 
01024   static void dGlobGeomtFunc
01025     (
01026            Mat(real)& dHglob,
01027      const Ptv(real)& glob_pt,
01028      const Mat(real)& coor
01029     );
01030 
01031 
01032   static void dGlobBasisFunc
01033     (
01034            Mat(real)& dHglob,
01035      const Ptv(real)& glob_pt,
01036      const Mat(real)& coor
01037     )
01038   { dGlobGeomtFunc (dHglob, glob_pt, coor); }
01039 
01040 
01041 
01042   virtual void drawElement
01043     (
01044      const Mat(real)&   coor,           
01045            GraphBasics& plotter,        
01046            int          resolution = 1  
01047     )const;
01048 
01049   virtual void drawSide
01050     (
01051            int          side,           
01052      const Mat(real)&   coor,           
01053            GraphBasics& plotter,        
01054            int          resolution = 1  
01055     )const;
01056 
01057 
01058   virtual int getNoNodesOnEdge () const
01059   { return 0; }
01060 
01061 
01062   static void setUpNodeCoor (MatSimple(real)& geomt_coor_);
01063   static void setUpNodesOnSides (MatSimple(int)& geomt_nodes_sides_);
01064 
01065 
01066   virtual Ptv(real) getVertexPt2DGrid (int i, int j) const       
01067     { return getPt2DGridTri (double(i), double(j), resol2Dgrid+1); }
01068 
01069 
01070   virtual Ptv(real) getCenterPt2DGrid
01071     (int i, int j, RectanglePartition ind) const  
01072     { return getCenterPt2DGridSqr (i, j, ind); }
01073 
01074 
01075   virtual Ptv(real) getVertexPt2DGrid (int, int, int) const  
01076     {
01077       Ptv(real) dummy(1);
01078       errorFP("ElmT3n2D ::getVertexPt2DGrid","3D version is nonsense");
01079       return dummy;
01080     }
01081 
01082 
01083   virtual Ptv(real) getCenterPt2DGrid
01084     (int, int, RectanglePartition, int) const 
01085     {
01086       Ptv(real) dummy(1);
01087       errorFP("ElmT3n2D ::getCenterPt2DGrid","3D version is nonsense");
01088       return dummy;
01089     }
01090 
01091   virtual void fillNodePath (MatSimplest(int)& nodes, bool vertices_only);
01092 
01093   CLASS_INFO
01094 };
01095 
01096 
01173 class ElmT6n2D : public ElmDef
01174 
01175 {
01176 public:
01177   ElmT6n2D ();
01178  ~ElmT6n2D () {}
01179 
01180   virtual Ptv(real) setCentroid () const;
01181 
01182   virtual bool canBeInside
01183     (const Ptv(real)& globpt, const Mat(real)& coor) const;
01184 
01185   virtual bool isInside (const Ptv(real)& locpt) const;
01186   virtual bool isStrictlyInside (const Ptv(real)& locpt) const;
01187 
01188   virtual NumItgDomain getSideShape (int /*side*/) const
01189     { return TRIANGLE; /*side = an interval = BOX, = TRIANGLE for tetrahedra*/}
01190 
01191 
01192   virtual void geomtFunc
01193     (
01194            Vec(real)& N,
01195      const Ptv(real)& loc_pt
01196     )const;
01197 
01198 
01199   virtual void basisFunc
01200     (
01201            Vec(real)& N,
01202      const Ptv(real)& loc_pt
01203     )const
01204   { geomtFunc (N, loc_pt); }
01205 
01206 
01207   virtual void dLocGeomtFunc
01208     (
01209            Mat(real)& dNloc,
01210      const Ptv(real)& loc_pt
01211     )const;
01212 
01213 
01214   virtual void dLocBasisFunc
01215     (
01216            Mat(real)& dNloc,
01217      const Ptv(real)& loc_pt
01218     )const
01219   { dLocGeomtFunc (dNloc, loc_pt); }
01220 
01221 
01222   virtual void d2LocBasisFunc
01223     (
01224            ArrayGen(real)& d2Nloc,
01225      const Ptv(real)&      loc_pt
01226     )const;
01227 
01228 
01229   static void shape  (Vec(real)& N, const Ptv(real)& loc_pt);
01230   static void dshape (Mat(real)& dNloc, const Ptv(real)& loc_pt);
01231 
01232   virtual void drawElement
01233     (
01234      const Mat(real)&   coor,           
01235            GraphBasics& plotter,        
01236            int          resolution = 1  
01237     )const;
01238 
01239 
01240   virtual void drawSide
01241     (
01242            int          side,           
01243      const Mat(real)&   coor,           
01244            GraphBasics& plotter,        
01245            int          resolution = 1  
01246     )const;
01247 
01248 
01249   virtual int getNoNodesOnEdge () const
01250   { return 0; }
01251 
01252   static void setUpNodeCoor (MatSimple(real)& geomt_coor_);
01253   static void setUpNodesOnSides (MatSimple(int)& geomt_nodes_sides_);
01254 
01255 
01256   virtual Ptv(real) getVertexPt2DGrid (int i, int j) const       
01257     { return getPt2DGridTri (double(i), double(j), resol2Dgrid+1); }
01258 
01259 
01260   virtual Ptv(real) getCenterPt2DGrid
01261     (int i, int j, RectanglePartition ind) const  
01262     { return getCenterPt2DGridSqr (i, j, ind); }
01263 
01264 
01265   
01266   virtual Ptv(real) getVertexPt2DGrid (int, int, int) const  
01267     { Ptv(real) dummy(1); return dummy; }
01268 
01269   virtual Ptv(real) getCenterPt2DGrid
01270     (int, int, RectanglePartition, int) const 
01271     { Ptv(real) dummy(1); return dummy; }
01272 
01273   virtual void fillNodePath (MatSimplest(int)& nodes, bool vertices_only);
01274 
01275   CLASS_INFO
01276 };
01277 
01278 
01332 class ElmT4n3D : public ElmDef
01333 
01334 {
01335 public:
01336   ElmT4n3D ();
01337  ~ElmT4n3D () {}
01338 
01339   virtual Ptv(real) setCentroid () const;
01340 
01341   virtual bool canBeInside
01342     (const Ptv(real)& globpt, const Mat(real)& coor) const;
01343 
01344   virtual bool isInside (const Ptv(real)& locpt) const;
01345   virtual bool isStrictlyInside (const Ptv(real)& locpt) const;
01346 
01347   virtual bool findLocPt     
01348     (
01349      const Ptv(real)& globpt,   
01350            Ptv(real)& locpt,    
01351            int&       niter,    
01352            real&      error,    
01353      const Mat(real)& coor      
01354     );
01355 
01356   virtual NumItgDomain getSideShape (int /*side*/) const
01357     { return TRIANGLE; /*side = an interval = BOX,= TRIANGLE for tetraedras*/ }
01358 
01359 
01360   virtual void geomtFunc
01361     (
01362            Vec(real)& N,
01363      const Ptv(real)& loc_pt
01364     )const;
01365 
01366 
01367   virtual void basisFunc
01368     (
01369            Vec(real)& N,
01370      const Ptv(real)& loc_pt
01371     )const
01372   { geomtFunc (N, loc_pt); }
01373 
01374 
01375   virtual void dLocGeomtFunc
01376     (
01377            Mat(real)& dNloc,
01378      const Ptv(real)& loc_pt
01379     )const;
01380 
01381 
01382   virtual void dLocBasisFunc
01383     (
01384            Mat(real)& dNloc,
01385      const Ptv(real)& loc_pt
01386     )const
01387   { dLocGeomtFunc (dNloc, loc_pt); }
01388 
01389 
01390   virtual void d2LocBasisFunc
01391     (
01392            ArrayGen(real)& d2Nloc,
01393      const Ptv(real)&      loc_pt
01394     )const;
01395 
01396 
01397   static void shape  (Vec(real)& N, const Ptv(real)& loc_pt);
01398   static void dshape (Mat(real)& dNloc, const Ptv(real)& loc_pt);
01399 
01400 
01401   
01402   
01403 
01404   static void calcCoeffInGlobFunc
01405     (
01406            ArrayGen(real)& coeff,  
01407            real&           volume,
01408      const Mat(real)&      elmcoor
01409     );
01410 
01411   static void faceAreaAndNormalVec
01412     (
01413               int        side,
01414               real&      area,
01415               Ptv(real)& normal_vector,
01416         const Mat(real)& elmcoor
01417     );
01418 
01419   static void geomtFunc
01420     (
01421            Vec(real)& N,
01422      const Ptv(real)& glob_pt,
01423      const Mat(real)& coor
01424     );
01425 
01426   static void basisFunc
01427     (
01428            Vec(real)& N,
01429      const Ptv(real)& glob_pt,
01430      const Mat(real)& coor
01431     )
01432   { geomtFunc (N, glob_pt, coor); }
01433 
01434   static void dGlobGeomtFunc
01435     (
01436            Mat(real)& dHglob,
01437      const Ptv(real)& glob_pt,
01438      const Mat(real)& coor
01439     );
01440 
01441   static void dGlobBasisFunc
01442     (
01443            Mat(real)& dHglob,
01444      const Ptv(real)& glob_pt,
01445      const Mat(real)& coor
01446     )
01447   { dGlobGeomtFunc (dHglob, glob_pt, coor); }
01448 
01449 
01450   virtual void drawElement
01451     (
01452      const Mat(real)&   coor,           
01453            GraphBasics& plotter,        
01454            int          resolution = 1  
01455     )const;
01456 
01457   virtual void drawSide
01458     (
01459            int          side,           
01460      const Mat(real)&   coor,           
01461            GraphBasics& plotter,        
01462            int          resolution = 1  
01463     )const;
01464 
01465   virtual int getNoNodesOnEdge () const
01466   { return 0; }
01467 
01468   static void setUpNodeCoor (MatSimple(real)& geomt_coor_);
01469   static void setUpNodesOnSides (MatSimple(int)& geomt_nodes_sides_);
01470 
01471   virtual Ptv(real) getVertexPt2DGrid (int i, int j) const       
01472     { return getPt2DGridTri (double(i), double(j), resol2Dgrid+1); }
01473 
01474 
01475   virtual Ptv(real) getCenterPt2DGrid
01476     (int i, int j, RectanglePartition ind) const  
01477     {
01478       return getCenterPt2DGridSqr (i, j, ind);
01479     }
01480 
01481 
01482   virtual Ptv(real) getVertexPt2DGrid (int, int, int) const  
01483     {
01484       Ptv(real) dummy(1);
01485       errorFP("ElmT4n2D ::getVertexPt2DGrid","3D version is not impl");
01486       return dummy;
01487     }
01488 
01489 
01490   virtual Ptv(real) getCenterPt2DGrid
01491     (int, int, RectanglePartition, int) const 
01492     {
01493       Ptv(real) dummy(1);
01494       errorFP("ElmT4n3D ::getCenterPt2DGrid","3D version is not impl");
01495       return dummy;
01496     }
01497 
01498   CLASS_INFO
01499 };
01500 
01501 
01615 class ElmT10n3D : public ElmDef
01616 
01617 {
01618 public:
01619   ElmT10n3D ();
01620  ~ElmT10n3D () {}
01621 
01622   virtual Ptv(real) setCentroid () const;
01623 
01624   virtual bool canBeInside
01625     (const Ptv(real)& globpt, const Mat(real)& coor) const;
01626 
01627   virtual bool isInside (const Ptv(real)& locpt) const;
01628   virtual bool isStrictlyInside (const Ptv(real)& locpt) const;
01629 
01630   virtual NumItgDomain getSideShape (int /*side*/) const
01631     { return TRIANGLE; /*side = an interval = BOX,= TRIANGLE for tetraedras*/ }
01632 
01633 
01634   virtual void geomtFunc
01635     (
01636            Vec(real)& N,
01637      const Ptv(real)& loc_pt
01638     )const;
01639 
01640 
01641   virtual void basisFunc
01642     (
01643            Vec(real)& N,
01644      const Ptv(real)& loc_pt
01645     )const
01646   { geomtFunc (N, loc_pt); }
01647 
01648 
01649   virtual void dLocGeomtFunc
01650     (
01651            Mat(real)& dNloc,
01652      const Ptv(real)& loc_pt
01653     )const;
01654 
01655 
01656   virtual void dLocBasisFunc
01657     (
01658            Mat(real)& dNloc,
01659      const Ptv(real)& loc_pt
01660     )const
01661   { dLocGeomtFunc (dNloc, loc_pt); }
01662 
01663 
01664   virtual void d2LocBasisFunc
01665     (
01666            ArrayGen(real)& d2Nloc,
01667      const Ptv(real)&      loc_pt
01668     )const;
01669 
01670 
01671   static void shape  (Vec(real)& N, const Ptv(real)& loc_pt);
01672   static void dshape (Mat(real)& dNloc, const Ptv(real)& loc_pt);
01673 
01674   virtual void drawElement
01675     (
01676      const Mat(real)&   coor,           
01677            GraphBasics& plotter,        
01678            int          resolution = 1  
01679     )const;
01680 
01681   virtual void drawSide
01682     (
01683            int          side,           
01684      const Mat(real)&   coor,           
01685            GraphBasics& plotter,        
01686            int          resolution = 1  
01687     )const;
01688 
01689   virtual int getNoNodesOnEdge () const
01690   { return 1; }
01691 
01692   static void setUpNodeCoor (MatSimple(real)& geomt_coor_);
01693   static void setUpNodesOnSides (MatSimple(int)& geomt_nodes_sides_);
01694 
01695 
01696   virtual Ptv(real) getVertexPt2DGrid (int i, int j) const       
01697     { return getPt2DGridTri (double(i), double(j), resol2Dgrid+1); }
01698 
01699 
01700   virtual Ptv(real) getCenterPt2DGrid
01701     (int i, int j, RectanglePartition ind) const  
01702     {
01703       return getCenterPt2DGridSqr (i, j, ind);
01704     }
01705 
01706   virtual Ptv(real) getVertexPt2DGrid (int, int, int) const  
01707     {
01708       Ptv(real) dummy(1);
01709       errorFP("ElmT4n2D ::getVertexPt2DGrid","3D version is not impl");
01710       return dummy;
01711     }
01712 
01713   virtual Ptv(real) getCenterPt2DGrid
01714     (int, int, RectanglePartition, int) const 
01715     {
01716       Ptv(real) dummy(1);
01717       errorFP("ElmT4n3D ::getCenterPt2DGrid","3D version is not impl");
01718       return dummy;
01719     }
01720 
01721   CLASS_INFO
01722 };
01723 
01724 
01783 class ElmB2gn1bn1D : public ElmB2n1D
01784 
01785 {
01786 public:
01787   ElmB2gn1bn1D();
01788  ~ElmB2gn1bn1D(){}
01789 
01790   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
01791   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
01792   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
01793      const;
01794   CLASS_INFO
01795 };
01796 
01797 
01825 class ElmB9gn4bn2D : public ElmB9n2D
01826 
01827 {
01828 public:
01829   ElmB9gn4bn2D();
01830  ~ElmB9gn4bn2D() {}
01831 
01832   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
01833   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
01834   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
01835      const;
01836   CLASS_INFO
01837 };
01838 
01839 
01856 class ElmT3gn1bn2D : public ElmT3n2D
01857 
01858 {
01859 public:
01860   ElmT3gn1bn2D();
01861  ~ElmT3gn1bn2D() {}
01862 
01863   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
01864   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
01865   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
01866      const;
01867   CLASS_INFO
01868 };
01869 
01870 
01897 class ElmT3gn3bn2Du : public ElmT3n2D
01898 
01899 {
01900 public:
01901   ElmT3gn3bn2Du();
01902  ~ElmT3gn3bn2Du() {}
01903 
01904   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
01905   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
01906   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
01907      const;
01908 
01909 protected:
01910   void setUpBasisNodesOnSide();
01911 
01912   CLASS_INFO
01913 };
01914 
01915 
01945 class ElmT3gn3bn2Dv : public ElmT3n2D
01946 
01947 {
01948 public:
01949   ElmT3gn3bn2Dv();
01950  ~ElmT3gn3bn2Dv() {}
01951 
01952   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
01953   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
01954   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
01955      const;
01956 
01957 protected:
01958   void setUpBasisNodesOnSide();
01959 
01960   CLASS_INFO
01961 };
01962 
01963 
01993 class ElmB4gn1bn2D : public ElmB4n2D
01994 
01995 {
01996 public:
01997   ElmB4gn1bn2D();
01998  ~ElmB4gn1bn2D(){}
01999 
02000   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
02001   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02002   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02003      const;
02004   CLASS_INFO
02005 };
02006 
02007 
02035 class ElmB4gn2bn2Du : public ElmB4n2D
02036 
02037 {
02038 public:
02039   ElmB4gn2bn2Du();
02040  ~ElmB4gn2bn2Du(){}
02041 
02042   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
02043   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02044   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02045      const;
02046   virtual int  getNoBasisNodesOnSide (int side) const;
02047 
02048 protected:
02049   void setUpBasisNodesOnSide();
02050 
02051   CLASS_INFO
02052 };
02053 
02054 
02085 class ElmB4gn2bn2Dv : public ElmB4n2D
02086 
02087 {
02088 public:
02089   ElmB4gn2bn2Dv();
02090  ~ElmB4gn2bn2Dv(){}
02091 
02092   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
02093   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02094   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02095      const;
02096   virtual int  getNoBasisNodesOnSide (int side) const;
02097 
02098 protected:
02099   void setUpBasisNodesOnSide();
02100 
02101   CLASS_INFO
02102 };
02103 
02104 
02135 class ElmT3gn4bn2D : public ElmT3n2D
02136 
02137 {
02138 public:
02139   ElmT3gn4bn2D();
02140  ~ElmT3gn4bn2D() {}
02141 
02142   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
02143   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02144   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02145   const;
02146   CLASS_INFO
02147 };
02148 
02149 
02177 class ElmT3gn9bn2Du : public ElmT3n2D
02178 
02179 {
02180 public:
02181   ElmT3gn9bn2Du();
02182  ~ElmT3gn9bn2Du() {}
02183 
02184   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
02185   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02186   virtual void d2LocBasisFunc (ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02187   const;
02188 
02189 protected:
02190   void setUpBasisNodesOnSide();
02191 
02192   CLASS_INFO
02193 };
02194 
02195 
02226 class ElmT3gn9bn2Dv : public ElmT3n2D
02227 
02228 {
02229 public:
02230   ElmT3gn9bn2Dv();
02231  ~ElmT3gn9bn2Dv() {}
02232 
02233   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
02234   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02235   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02236   const;
02237 protected:
02238   void setUpBasisNodesOnSide();
02239 
02240   CLASS_INFO
02241 };
02242 
02243 
02274 class ElmT6gn3bn2D : public ElmT6n2D
02275 
02276 {
02277 public:
02278   ElmT6gn3bn2D();
02279  ~ElmT6gn3bn2D() {}
02280 
02281   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
02282   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02283   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02284     const;
02285   CLASS_INFO
02286 };
02287 
02288 
02304 class ElmT3gn3bn2D : public ElmT3n2D
02305 
02306 {
02307 public:
02308   ElmT3gn3bn2D();
02309  ~ElmT3gn3bn2D() {}
02310 
02311   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
02312   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02313   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02314   const;
02315   CLASS_INFO
02316 };
02317 
02318 
02334 class ElmB8gn1bn3D : public ElmB8n3D
02335 
02336 {
02337 public:
02338   ElmB8gn1bn3D();
02339  ~ElmB8gn1bn3D(){}
02340 
02341   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
02342   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02343   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02344      const;
02345   CLASS_INFO
02346 };
02347 
02348 
02376 class ElmT4gn5bn3D : public ElmT4n3D
02377 
02378 {
02379 public:
02380     ElmT4gn5bn3D();
02381     ~ElmT4gn5bn3D() {}
02382 
02383     virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
02384     virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02385     virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02386     const;
02387     CLASS_INFO
02388 };
02389 
02390 
02418 class ElmT10gn4bn3D : public ElmT10n3D
02419 
02420 {
02421 public:
02422   ElmT10gn4bn3D();
02423  ~ElmT10gn4bn3D() {}
02424 
02425   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
02426   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02427   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02428     const;
02429   CLASS_INFO
02430 };
02431 
02432 
02448 class ElmT4gn4bn3D : public ElmT4n3D
02449 
02450 {
02451 public:
02452   ElmT4gn4bn3D();
02453  ~ElmT4gn4bn3D() {}
02454 
02455   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
02456   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02457   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02458     const;
02459   CLASS_INFO
02460 };
02461 
02462 
02477 class ElmT4gn1bn3D : public ElmT4n3D
02478 
02479 {
02480 public:
02481   ElmT4gn1bn3D();
02482  ~ElmT4gn1bn3D() {}
02483 
02484   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
02485   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02486   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02487     const;
02488   CLASS_INFO
02489 };
02490 
02491 
02507 class ElmT10gn1bn3D : public ElmT10n3D
02508 
02509 {
02510 public:
02511   ElmT10gn1bn3D();
02512  ~ElmT10gn1bn3D() {}
02513 
02514   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
02515   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02516   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02517     const;
02518   CLASS_INFO
02519 };
02520 
02521 
02537 class ElmB27gn8bn3D : public ElmB27n3D
02538 
02539 {
02540 public:
02541   ElmB27gn8bn3D();
02542  ~ElmB27gn8bn3D() {}
02543 
02544   virtual void basisFunc (Vec(real)& N, const Ptv(real)& loc_pt) const;
02545   virtual void dLocBasisFunc (Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02546   CLASS_INFO
02547 };
02548 
02549 
02565 class ElmB27gn1bn3D : public ElmB27n3D
02566 
02567 {
02568 public:
02569   ElmB27gn1bn3D();
02570  ~ElmB27gn1bn3D(){}
02571 
02572   virtual void basisFunc(Vec(real)& N, const Ptv(real)& loc_pt) const;
02573   virtual void dLocBasisFunc(Mat(real)& dNloc, const Ptv(real)& loc_pt) const;
02574   virtual void d2LocBasisFunc(ArrayGen(real)& d2Nloc, const Ptv(real)& loc_pt)
02575      const;
02576   CLASS_INFO
02577 };
02578 
02579 

Copyright © 2003 inuTech GmbH. All rights reserved.