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

hp3D/bilinearForm.hh
Go to the documentation of this file.
00001 /* Bilinear forms for hp 3D FEM
00002  */
00003 
00004 #ifndef hp3dbilinearform_hh
00005 #define hp3dbilinearform_hh
00006 
00007 #include <memory>
00008 #include "basics/typedefs.hh"
00009 #include "basics/vectorsMatricesForward.hh"
00010 #include "formula/formula.hh"
00011 #include "operator/bilinearForm.hh"
00012 
00013 namespace concepts {
00014   // forward declarations
00015   template<class F>
00016   class Element;
00017 
00018   template<class F>
00019   class ElementMatrix;
00020 
00021   template<class F>
00022   class Array;
00023 
00024   class InOutParameters;
00025 }
00026 
00027 namespace hp3D {
00028   // forward declarations
00029   class Hexahedron;
00030 
00031   using concepts::Real;
00032 
00033   // *************************************************************** Laplace **
00034 
00039   class Laplace : public concepts::BilinearForm<Real> {
00040   public:
00042     Laplace();
00043     virtual ~Laplace();
00044 
00045     virtual void operator()(const concepts::Element<Real>& elmX,
00046           const concepts::Element<Real>& elmY, 
00047           concepts::ElementMatrix<Real>& em); 
00048     void operator()(const Hexahedron& elmX, const Hexahedron& elmY, 
00049         concepts::ElementMatrix<Real>& em);
00050     virtual Laplace* clone() const { return new Laplace(); }
00051   protected:
00052     virtual std::ostream& info(std::ostream& os) const;
00053   private:
00055     concepts::Array<Real> jacobian_;
00056     concepts::Array<concepts::MapReal3d> jacobianInv_;
00057 
00058     const Hexahedron* oldElm_;
00059   };
00060 
00061   // ************************************************************** Identity **
00062 
00071   class Identity : public concepts::BilinearForm<Real> {
00072   public:
00074     Identity(const concepts::Formula<Real>* frm = 0);
00075     virtual ~Identity();
00076 
00077     virtual void operator()(const concepts::Element<Real>& elmX,
00078           const concepts::Element<Real>& elmY, 
00079           concepts::ElementMatrix<Real>& em); 
00080     void operator()(const Hexahedron& elmX, const Hexahedron& elmY, 
00081         concepts::ElementMatrix<Real>& em);
00082 
00109     static void setTimings(concepts::InOutParameters* timings);
00113     static bool timings();
00115     virtual Identity* clone() const { return new Identity(frm_.get()); }
00116   protected:
00117     virtual std::ostream& info(std::ostream& os) const;
00118   private:
00120     concepts::Array<Real> jacobian_;
00121 
00122     const Hexahedron* oldElm_;
00124     std::auto_ptr<const concepts::Formula<Real> > frm_;
00125 
00127     static concepts::InOutParameters* timings_;
00129     static uint timeCntr_;
00130   };
00131 
00132 } // namespace hp3D
00133 
00134 #endif // hp3dbilinearform_hh

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