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

linDG3D/elementPair.hh
Go to the documentation of this file.
00001 /* Class for DG element pairs
00002  */
00003 
00004 #ifndef dgElementPair_hh
00005 #define dgElementPair_hh
00006 
00007 #include "basics/typedefs.hh"
00008 #include "space/elementPairs.hh"
00009 #include "element.hh"
00010 
00011 #include <vector>
00012 
00013 #define DEBUG_FILLDATA 0
00014 #define DEBUG_FILLDATA_CONSISTENCY 0
00015 
00016 namespace linDG3D {
00017   using concepts::Real;
00018 
00019   // ******************************************************* FvdgElementPair **
00020   
00025   class FvdgElementPair : public concepts::ElementPair<Real> {
00026   public:
00033     FvdgElementPair(const FvdgElement& elm1,
00034         const FvdgElement& elm2,
00035         uint faceIdx1, uint faceIdx2);
00040     FvdgElementPair(const FvdgElement& elm, uint faceIdx);
00041     virtual ~FvdgElementPair();
00042     
00043     virtual const FvdgElement& elm1() const { return elm1_; }
00044     virtual const FvdgElement& elm2() const { return elm2_; }
00045     
00047     Real area() const { return area_; }
00049     Real diam() const { return diam_; }
00051     concepts::Real3d normal() const { return normal_; }
00053     uint numPairs() const { return edgePairs_.size(); }
00061     uint edgeIndex( uint elem, uint edge ) const;
00069     void quadrature(std::vector<Real>& weights,
00070         std::vector<concepts::Real3d>& xi0,
00071         std::vector<concepts::Real3d>& xi1) const;
00080     void quadrature(std::vector<Real>& weights,
00081         std::vector<concepts::Real3d>& xi0,
00082         std::vector<concepts::Real3d>& xi1,
00083         std::vector<concepts::Real3d>& x) const;
00085     uint faceIdx1() const { return faceIdx1_; };
00087     uint faceIdx2() const { return faceIdx2_; };
00088   private:
00090     const FvdgElement& elm1_;
00092     const FvdgElement& elm2_;
00094     Real area_;
00096     Real diam_;
00098     concepts::Real3d normal_;
00100     uint faceIdx1_;
00102     uint faceIdx2_;
00104     static std::vector<Real> weights_;
00105     static std::vector<concepts::Real3d> zetaAbsc_;
00106     static concepts::Real3d xiEdge_[6];
00107     std::vector<std::pair<uint, uint> > edgePairs_;
00108     void fillData_();
00109     void fillQuadrature_();
00110     concepts::Real3d
00111     barycentric_(concepts::Real3d zeta, concepts::Real3d* xVtx) const;
00112     void edgVtx_(concepts::Real3d* xEdge, concepts::Real3d* xVtx) const;
00113   };
00114   
00115 } // namespace linDG3D
00116 
00117 #endif // dgElementPair_hh

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