Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef Eddy2D_H_eField_hh
00006 #define Eddy2D_H_eField_hh
00007
00008 #include "basics.hh"
00009 #include "geometry/formula.hh"
00010 #include "hp2D/function.hh"
00011 #include "models/maxwellConstants.hh"
00012
00013 namespace hp2D {
00014
00015 using concepts::Real;
00016 using concepts::Real2d;
00017 using concepts::Cmplx;
00018 using concepts::Cmplx2d;
00019
00020
00021
00026 class Eddy2D_eField : public ElementFunction<2,Cmplx> {
00027 public:
00028 Eddy2D_eField(const concepts::PiecewiseFormulaBase<Real>& Sigma_Inv,
00029 const concepts::PiecewiseFormulaBase<Real2d>* curlH0 = 0);
00030 virtual ~Eddy2D_eField();
00031
00032 virtual Eddy2D_eField* clone() const {
00033 return new Eddy2D_eField(*Sigma_Inv_, curlH0_.get());
00034 }
00035 protected:
00036 virtual std::ostream& info(std::ostream& os) const;
00037 private:
00038 virtual void compute_(const Quad<>& elm,
00039 const concepts::Array<Cmplx>& coeff,
00040 concepts::Array<Cmplx>& val,
00041 const uint i[2]) const;
00042 virtual void compute_(const Quad<>& elm, const uint j[2],
00043 concepts::Array<Cmplx>& val,
00044 const uint i[2]) const;
00045 virtual void compute_(const Quad<>& elm,
00046 const concepts::Array<Cmplx>& coeff,
00047 concepts::Array<Cmplx>& val,
00048 const Real2d& p, const Real t = 0.0) const;
00050 void convert_(const Quad<>& elm, concepts::Array<Cmplx>& val,
00051 const Real2d& p, const Real t = 0.0) const;
00053 std::auto_ptr<concepts::PiecewiseFormulaBase<Real> > Sigma_Inv_;
00055 std::auto_ptr<const concepts::PiecewiseFormulaBase<Real2d> > curlH0_;
00057 PlCurl<Cmplx> plcurl_;
00058 };
00059
00060
00061
00066 class Eddy2D_dissipation : public ElementFunction<1,Cmplx> {
00067 public:
00068 Eddy2D_dissipation(const concepts::PiecewiseConstFormula<Real>& sigma,
00069 const concepts::ElementFunction<Cmplx>& eField);
00070 virtual ~Eddy2D_dissipation() {}
00071
00072 virtual Eddy2D_dissipation* clone() const {
00073 return new Eddy2D_dissipation(*sigma_, *eField_);
00074 }
00075 protected:
00076 virtual std::ostream& info(std::ostream& os) const;
00077 private:
00078 virtual void compute_(const Quad<>& elm,
00079 const concepts::Array<Cmplx>& coeff,
00080 Cmplx& val, const uint i[2]) const;
00081 virtual void compute_(const Quad<>& elm, const uint j[2],
00082 Cmplx& val, const uint i[2]) const;
00083 virtual void compute_(const Quad<>& elm,
00084 const concepts::Array<Cmplx>& coeff, Cmplx& val,
00085 const Real2d& p, const Real t = 0.0) const;
00087 void convert_(const concepts::Array<Cmplx>& eField,
00088 const Real& sigma, Cmplx& val) const;
00090 std::auto_ptr<concepts::PiecewiseConstFormula<Real> > sigma_;
00092 std::auto_ptr<concepts::ElementFunction<Cmplx> > eField_;
00093 };
00094
00095 }
00096
00097 #endif // Eddy2D_H_eField_hh