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

app-pfrauenf/maxwell-twod-jump.hh
Go to the documentation of this file.
00001 // jump constraints in 2D maxwell transmission problem
00002 
00003 #ifndef maxwell_jump_hh
00004 #define maxwell_jump_hh
00005 
00006 #include <iostream>
00007 #include <map>
00008 #include "geometry/connector.hh"
00009 #include "toolbox/dynArray.hh"
00010 #include "constraints.hh"
00011 
00012 using concepts::Real;
00013 
00014 namespace hp2D {
00015   template<typename F>
00016   class Element;
00017 
00018   template<typename F>
00019   class Quad;
00020 }
00021 
00022 // ************************************************************* EpsJumpZero **
00023 
00036 template<typename F>
00037 class EpsJumpZero : public constraints::AnalyticalConstraint<F> {
00038 public:
00051   EpsJumpZero(std::map<uint, concepts::Real2d>& coord,
00052         concepts::Attribute a1, Real eps1,
00053         concepts::Attribute a2, Real eps2);
00054   EpsJumpZero(const EpsJumpZero& z);
00055   virtual void lengthT(const concepts::Element<F>& e, uint& length);
00056   virtual void assembly(const concepts::Element<F>& e,
00057       concepts::TColumn<F>*& t, uint& n, uint& j,
00058       uint length);
00059   virtual constraints::AnalyticalConstraint<F>* clone() const;
00060   virtual void localMatrix(concepts::ElementMatrix<F>& em, uint& j,
00061          const constraints::Element<F>& elm) const;
00062   virtual void localVector(concepts::ElementMatrix<F>& em, uint& j,
00063          const constraints::Element<F>& elm) const;
00064 protected:
00065   virtual std::ostream& info(std::ostream& os) const;
00066 private:
00071   class CellData {
00072   public:
00073     CellData();
00074     CellData(const CellData& c);
00075     void addVertex(uint idx);
00076     uint vertex(uint i) const { return vtxIdx_[i]; }
00077     void addEdge(uint idx);
00078     uint edge() const { return edgIdx_; }
00079   private:
00080     uint vtxIdx_[2];
00081     uint edgIdx_;
00082   };
00083 
00085 
00086   concepts::Attribute attr_[2];
00087   Real eps_[2];
00089 
00090   std::map<uint, concepts::Real2d>& coordinates_;
00094   std::map<uint, CellData> indices_[2];
00095 
00097   const hp2D::Quad<Real>* getScalarQuad_(const concepts::Element<F>& e) const;
00099   bool compareCoord_(const concepts::Real2d& s1,
00100          const concepts::Real2d& s2) const;
00106   uint findCoord_(const concepts::Real2d& center) const;
00107 };
00108 
00109 #endif // maxwell_jump_hh

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