00001 00006 #ifndef Eddy2D_hh 00007 #define Eddy2D_hh 00008 00009 #include <set> 00010 #include "geometry/mesh.hh" 00011 #include "space/formula.hh" 00012 #include "formula/formula.hh" 00013 #include "operator/sparseMatrix.hh" 00014 #include "hp2D/bf_identity.hh" 00015 #include "hp2D/bf_laplace.hh" 00016 #include "hp2D/linearForm.hh" 00017 #include "maxwellConstants.hh" 00018 #include "Eddy2D_geometries.hh" 00019 #include "Models.hh" 00020 00021 namespace hp2D { 00022 00023 using concepts::Real; 00024 using concepts::Cmplx; 00025 00026 // *********************************************************** Eddy2D_H ** 00027 00031 class Eddy2D_H : public Models<Cmplx> { 00032 public: 00033 Eddy2D_H(concepts::EddyGeometry2D& geom, const Real H0, 00034 const Real Omega_i = 0, const uint geomRefAttr = 100, 00035 const Real omega = OMEGA50, const Real mu = MU0); 00036 virtual ~Eddy2D_H() {} 00038 Real dissipation(); 00044 Real magnEnergy(const Real R1, const Real R2); 00049 virtual void graphicsOut(const uint numPoints, 00050 const std::string path = ""); 00051 protected: 00052 virtual std::ostream& info(std::ostream& os) const; 00054 virtual concepts::Mesh2& mesh_() { return geom_.mesh(); } 00056 virtual const std::string mshAbbr_() { return geom_.meshAbbreviation(); } 00057 private: 00059 concepts::EddyGeometry2D& geom_; 00061 std::auto_ptr<concepts::SparseMatrix<Real> > A_; 00063 std::auto_ptr<concepts::SparseMatrix<Real> > M_; 00065 std::auto_ptr<concepts::SparseMatrix<Cmplx> > S_; 00066 // load vector 00067 std::auto_ptr<concepts::Vector<Cmplx> > rhs_; 00069 concepts::PiecewiseFormulaFun<Real,Real> Sigma_Inv_; 00071 const Real H0_; 00073 const Real Omega_i_; 00075 const Real omega_; 00077 const Real mu_; 00079 virtual void solve_(); 00081 virtual void matrices_(); 00083 void laplaceMatrix_(); 00085 void identityMatrix_(); 00087 bool connectedIdx_(uint& i); 00089 void systemMatrix_(); 00091 void linearform_(); 00093 virtual void dataOut_(); 00095 std::auto_ptr<Real> dissipation_; 00097 std::auto_ptr<Real> magnEnergy_; 00098 }; 00099 00100 // ****************************************************** InputEddy2D_H ** 00101 00106 class InputEddy2D_H : public concepts::InputParameter { 00107 public: 00109 InputEddy2D_H(concepts::InOutParameters& input); 00113 virtual std::ostream& letters(std::ostream& os) const; 00115 virtual std::ostream& arguments(std::ostream& os) const; 00117 virtual std::ostream& description(std::ostream& os) const; 00122 virtual int input(int opt, const char* optarg); 00123 protected: 00124 virtual std::ostream& info(std::ostream& os) const; 00125 }; 00126 00127 } // namespace hp2D 00128 00129 #endif // Eddy2D_hh