Class documentation of Concepts

Loading...
Searching...
No Matches
Maxwell2D_H_eField.hh
1/* @file models/Maxwell2D_H_eField.hh
2
3 Element function to get electric field from magnetic field
4 in translation-symmetric Maxwell's equations
5 @author Kersten Schmidt, 2005
6*/
7
8#ifndef Maxwell2D_H_eField_hh
9#define Maxwell2D_H_eField_hh
10
11#include "basics.hh"
12#include "geometry/formula.hh"
13#include "hp2D/function.hh"
15
16namespace hp2D {
17
18 using concepts::Real;
19 using concepts::Real2d;
20 using concepts::Cmplx;
21
22 // ****************************************************** Maxwell2D_eField **
23
28 class Maxwell2D_eField : public hp2D::ElementFunction<2,Cmplx> {
29 public:
32 iOmegaEps_plus_Sigma_Inv);
36 iOmegaEps_plus_Sigma_Inv);
37 virtual ~Maxwell2D_eField() {}
38
39 virtual Maxwell2D_eField* clone() const {
40 if (J0_.get())
41 return new Maxwell2D_eField(*J0_, *iOmegaEps_plus_Sigma_Inv_);
42 return new Maxwell2D_eField(*J0x_, *J0y_, *iOmegaEps_plus_Sigma_Inv_);
43 }
44 protected:
45 virtual std::ostream& info(std::ostream& os) const;
46 private:
47 virtual void compute_(const Quad<>& elm,
48 const concepts::Array<Cmplx>& coeff,
50 const uint i[2]) const;
51 virtual void compute_(const Quad<>& elm, const uint j[2],
53 const uint i[2]) const;
54 virtual void compute_(const Quad<>& elm,
55 const concepts::Array<Cmplx>& coeff,
57 const Real2d& p, const Real t = 0.0) const;
59 void convert_(const Quad<>& elm, concepts::Array<Cmplx>& val,
60 const Real2d& p, const Real t = 0.0) const;
62 std::unique_ptr<concepts::PiecewiseFormulaBase<Real2d> > J0_;
64 std::unique_ptr<concepts::PiecewiseFormulaBase<Real> > J0x_;
65 std::unique_ptr<concepts::PiecewiseFormulaBase<Real> > J0y_;
67 std::unique_ptr<concepts::PiecewiseFormulaBase<Cmplx> >
68 iOmegaEps_plus_Sigma_Inv_ ;
70 PlCurl<Cmplx> plcurl_;
71 };
72
73 // ************************************************* Maxwell2D_dissipation **
74
79 class Maxwell2D_dissipation : public ElementFunction<1,Cmplx> {
80 public:
82 const Real eps = EPS0, const Real omega = OMEGA50);
83 virtual ~Maxwell2D_dissipation() {}
84 virtual Maxwell2D_dissipation* clone() const {
85 return new Maxwell2D_dissipation(sigma_, eps_, omega_);
86 }
87 protected:
88 virtual std::ostream& info(std::ostream& os) const;
89 private:
90 virtual void compute_(const Quad<>& elm,
91 const concepts::Array<Cmplx>& coeff,
92 Cmplx& val, const uint i[2]) const;
93 virtual void compute_(const Quad<>& elm, const uint j[2],
94 Cmplx& val, const uint i[2]) const;
95 virtual void compute_(const Quad<>& elm,
96 const concepts::Array<Cmplx>& coeff, Cmplx& val,
97 const Real2d& p, const Real t = 0.0) const;
99 void convert_(const Quad<>& elm, const concepts::Array<Cmplx>& gradh,
100 Cmplx& val) const;
104 const Real eps_, omega_;
106 Grad<Cmplx> grad_;
107 };
108
109} // namespace hp2D
110
111#endif // Maxwell2D_H_eField_hh
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
double Real
Definition typedefs.hh:39
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition typedefs.hh:42