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

formula/elementFormulaContainer.hh
Go to the documentation of this file.
00001 
00008 #ifndef elementformulaContainer_hh
00009 #define elementformulaContainer_hh
00010 
00011 #include "toolbox/sharedPointer.hh"
00012 #include "elementFormula.hh"
00013 #include "constFormula.hh"
00014 
00015 
00016 namespace concepts {
00017 
00018 
00019  // ************************************************* ElementFormulaContainer **
00020   
00021   template<class F, typename G = typename Realtype<F>::type>
00022   class ElementFormulaContainer : public ElementFormula<F,G> {
00023   public:
00031     ElementFormulaContainer(const F x);
00032 
00035     ElementFormulaContainer() {}
00036 
00039     ElementFormulaContainer(const ElementFormula<F,G>& frm);
00042     ElementFormulaContainer(const RCP<const ElementFormula<F,G> > frm);
00046     explicit ElementFormulaContainer(const ElementFormula<F,G>* frm);
00048     ElementFormulaContainer(const ElementFormulaContainer<F,G>& frm);
00049 
00055     virtual F operator() (const ElementWithCell<G>& elm, const Real p,
00056                           const Real t = 0.0) const;
00057     virtual F operator() (const ElementWithCell<G>& elm, const Real2d& p,
00058                           const Real t = 0.0) const;
00059     virtual F operator() (const ElementWithCell<G>& elm, const Real3d& p,
00060                           const Real t = 0.0) const;
00062     virtual ElementFormulaContainer<F,G>* clone() const {
00063       return new ElementFormulaContainer<F,G>(frm_);
00064     }
00065 
00066     const ElementFormula<F,G>& frm() const { return *frm_; }
00067 
00069     bool empty() const { return frm_.get() == 0; }
00070 
00071     virtual ~ElementFormulaContainer();
00072   protected:
00073     virtual std::ostream& info(std::ostream& os) const;
00074   private:
00076     RCP<const ElementFormula<F,G> > frm_;
00077   };
00078 
00079 
00080 } // namespace concepts
00081 
00082 
00083 #endif // elementformulaContainer_hh

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