Maxwell2D_H_eField.hh

Go to the documentation of this file.
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 
16 namespace 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())
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> >
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);
84  virtual Maxwell2D_dissipation* clone() const {
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_;
107  };
108 
109 } // namespace hp2D
110 
111 #endif // Maxwell2D_H_eField_hh
virtual void compute_(const Quad<> &elm, const concepts::Array< Cmplx > &coeff, concepts::Array< Cmplx > &val, const Real2d &p, const Real t=0.0) const
const Real EPS0
const Real eps_
Dielectricity constant and angular frequency.
Grad< Cmplx > grad_
Gradient in 2D.
Maxwell2D_eField(const concepts::PiecewiseFormulaBase< Real2d > &J0, const concepts::PiecewiseFormulaBase< Cmplx > &iOmegaEps_plus_Sigma_Inv)
PlCurl< Cmplx > plcurl_
vectorial curl in 2D
std::unique_ptr< concepts::PiecewiseFormulaBase< Real2d > > J0_
cellwise defined source current
Point< Real, 2 > Real2d
Base class for element functions for hp elements in 2D.
Definition: functionBase.hh:38
virtual void compute_(const Quad<> &elm, const uint j[2], concepts::Array< Cmplx > &val, const uint i[2]) const
2D hp-FEM for H1-conforming elements.
virtual std::ostream & info(std::ostream &os) const
virtual void compute_(const Quad<> &elm, const concepts::Array< Cmplx > &coeff, concepts::Array< Cmplx > &val, const uint i[2]) const
virtual void compute_(const Quad<> &elm, const concepts::Array< Cmplx > &coeff, Cmplx &val, const uint i[2]) const
std::unique_ptr< concepts::PiecewiseFormulaBase< Real > > J0x_
cellwise defined source current (as two components)
const Real OMEGA50
virtual Maxwell2D_eField * clone() const
std::unique_ptr< concepts::PiecewiseFormulaBase< Cmplx > > iOmegaEps_plus_Sigma_Inv_
cellwise defined formula
virtual Maxwell2D_dissipation * clone() const
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
virtual void compute_(const Quad<> &elm, const concepts::Array< Cmplx > &coeff, Cmplx &val, const Real2d &p, const Real t=0.0) const
const concepts::PiecewiseConstFormula< Real > & sigma_
Piecewise constant conductivity.
virtual std::ostream & info(std::ostream &os) const
Local contribution to dissipation power loss.
A 2D FEM element: a quad.
Definition: bf_advection.hh:44
void convert_(const Quad<> &elm, concepts::Array< Cmplx > &val, const Real2d &p, const Real t=0.0) const
convert the vectorial curl of h into e
Maxwell2D_eField(const concepts::PiecewiseFormulaBase< Real > &J0x, const concepts::PiecewiseFormulaBase< Real > &J0y, const concepts::PiecewiseFormulaBase< Cmplx > &iOmegaEps_plus_Sigma_Inv)
std::unique_ptr< concepts::PiecewiseFormulaBase< Real > > J0y_
void convert_(const Quad<> &elm, const concepts::Array< Cmplx > &gradh, Cmplx &val) const
convert the vectorial curl of h into e
virtual void compute_(const Quad<> &elm, const uint j[2], Cmplx &val, const uint i[2]) const
Maxwell2D_dissipation(const concepts::PiecewiseConstFormula< Real > &sigma, const Real eps=EPS0, const Real omega=OMEGA50)
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich