Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

app-kersten/ThinSheet/thinSheetElm.hh
Go to the documentation of this file.
00001 
00008 #ifndef thinsheetelm_hh
00009 #define thinsheetelm_hh
00010 
00011 #include "space.hh"
00012 #include "toolbox/array.hh"
00013 #include "hp2D/quad.hh"
00014 
00015 namespace hp1D {
00016 
00017   // **************************************************** LineShapeFunctions **
00018 
00024   class LineShapeFunctions {
00025   public:
00031     LineShapeFunctions(const ushort p, const concepts::QuadratureRule *intX);
00032     virtual ~LineShapeFunctions();
00033 
00036     inline const ushort p() const { return p_; }
00037 
00039     inline const concepts::Karniadakis<1,0>* shpfct() const {
00040       return shpfct_.get(); }
00041 
00043     inline const concepts::Karniadakis<1,1>* shpfctD() const {
00044       return shpfctD_.get(); }
00045   protected:
00047     void computeShapefunctions_(const concepts::QuadratureRule *intX);
00048   private:
00050     ushort p_;
00052     std::auto_ptr<concepts::Karniadakis<1,0> > shpfct_;
00054     std::auto_ptr<concepts::Karniadakis<1,1> > shpfctD_;
00055   };
00056 
00057 }
00058 
00059 namespace concepts {
00060 
00061   // ***************************************************** ThinSheetFunction **
00062 
00067   template<class F>
00068   class ThinSheetFunction : public OutputOperator {
00069   public:
00073     virtual const F operator()(const Real xi, const uint i) const = 0;
00074   protected:
00075     virtual std::ostream& info(std::ostream& os) const {
00076       return os << "ThinSheetFunction()";
00077     }
00078   };
00079 
00080   // ******************************************** ThinSheetDiffusionFunction **
00081 
00087   class ThinSheetDiffussionFunction : public ThinSheetFunction<Real> {
00088   public:
00091     virtual const Array<Real> kappa(const Real d, const Real c = 0.0,
00092             const Real k = 0.0) = 0;
00095     virtual const Array<Real> zeta(const Real d, const Real c = 0.0,
00096            const Real k = 0.0) = 0;
00097   protected:
00098     virtual std::ostream& info(std::ostream& os) const {
00099       return os << "ThinSheetDiffusionFunction()";
00100     }
00101   };
00102 
00103   // ******************************************** ThinSheetDiffusionFunction **
00104 
00112   class ThinSheetDiffussionFunction0 : public ThinSheetDiffussionFunction {
00113   public:
00116     virtual const Array<Real> kappa(const Real d, const Real c = 0.0,
00117             const Real k = 0.0);
00120     virtual const Array<Real> zeta(const Real d, const Real c = 0.0,
00121            const Real k = 0.0);
00122   protected:
00123     virtual std::ostream& info(std::ostream& os) const {
00124       return os << "ThinSheetDiffusionFunction0()";
00125     }
00126   };
00127 
00128 } // namespace concepts
00129 
00130 namespace hp2D {
00131 
00132   // ********************************************************* ThinSheetQuad **
00133 
00139   class ThinSheetQuad : public BaseQuad<Real>,
00140                         public hp1D::LineShapeFunctions {
00141   public:
00150     ThinSheetQuad(concepts::Quad2d& cell, const ushort p, 
00151                   concepts::TColumn<Real>* T0, concepts::TColumn<Real>* T1);
00152     ~ThinSheetQuad();
00153 
00157     void recomputeShapefunctions();
00158     void recomputeShapefunctions(const uint nq[2]);
00159 
00160     virtual const concepts::ElementGraphics<Real>* graphics() const;
00161   protected:
00162     virtual std::ostream& info(std::ostream& os) const;
00163   private:
00165     static std::auto_ptr<concepts::ElementGraphics<Real> > graphics_;
00166   };
00167 
00168 } // namespace concepts
00169 
00170 #endif // thinsheetelm_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)