Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef Maxwell2D_H_eField_hh
00006 #define Maxwell2D_H_eField_hh
00007
00008 #include "hp2D/function.hh"
00009 #include "space/formula.hh"
00010 #include "basics.hh"
00011 #include "toolbox.hh"
00012
00013 namespace hp2D {
00014
00015 using concepts::Real;
00016 using concepts::Real2d;
00017 using concepts::Cmplx;
00018
00019 class Maxwell2D_eField : public hp2D::ElementFunction<2,Cmplx> {
00020 public:
00021 Maxwell2D_eField(const concepts::PiecewiseFormulaBase<Real2d>& J0,
00022 const concepts::PiecewiseFormulaBase<Cmplx>&
00023 iOmegaEps_plus_Sigma_Inv);
00024 Maxwell2D_eField(const concepts::PiecewiseFormulaBase<Real>& J0x,
00025 const concepts::PiecewiseFormulaBase<Real>& J0y,
00026 const concepts::PiecewiseFormulaBase<Cmplx>&
00027 iOmegaEps_plus_Sigma_Inv);
00028 virtual ~Maxwell2D_eField() {}
00029 virtual Maxwell2D_eField* clone() const {
00030 if (J0_.get())
00031 return new Maxwell2D_eField(*J0_, *iOmegaEps_plus_Sigma_Inv_);
00032 return new Maxwell2D_eField(*J0x_, *J0y_, *iOmegaEps_plus_Sigma_Inv_);
00033 }
00034 protected:
00035 virtual std::ostream& info(std::ostream& os) const;
00036 private:
00037 virtual void compute_(const Quad<>& elm,
00038 const concepts::Array<Cmplx>& coeff,
00039 concepts::Array<Cmplx>& val,
00040 const uint i[2]) const;
00041 virtual void compute_(const Quad<>& elm, const uint j[2],
00042 concepts::Array<Cmplx>& val,
00043 const uint i[2]) const;
00044 virtual void compute_(const Quad<>& elm,
00045 const concepts::Array<Cmplx>& coeff,
00046 concepts::Array<Cmplx>& val,
00047 const Real2d& p, const Real t = 0.0) const;
00049 void convert_(const Quad<>& elm, concepts::Array<Cmplx>& val,
00050 const Real2d& p, const Real t = 0.0) const;
00052 std::auto_ptr<concepts::PiecewiseFormulaBase<Real2d> > J0_;
00054 std::auto_ptr<concepts::PiecewiseFormulaBase<Real> > J0x_;
00055 std::auto_ptr<concepts::PiecewiseFormulaBase<Real> > J0y_;
00057 std::auto_ptr<concepts::PiecewiseFormulaBase<Cmplx> >
00058 iOmegaEps_plus_Sigma_Inv_;
00060 PlCurl<Cmplx> plcurl_;
00061 };
00062
00063 }
00064
00065 #endif // Maxwell2D_H_eField_hh