Eddy2D_H_eField.hh

Go to the documentation of this file.
1 
8 #ifndef Eddy2D_H_eField_hh
9 #define Eddy2D_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  using concepts::Cmplx2d;
22 
23  // ********************************************************* Eddy2D_eField **
24 
29  class Eddy2D_eField : public ElementFunction<2,Cmplx> {
30  public:
32  const concepts::PiecewiseFormulaBase<Real2d>* curlH0 = 0);
33  virtual ~Eddy2D_eField();
34 
35  virtual Eddy2D_eField* clone() const {
36  return new Eddy2D_eField(*Sigma_Inv_, curlH0_.get());
37  }
38  protected:
39  virtual std::ostream& info(std::ostream& os) const;
40  private:
41  virtual void compute_(const Quad<>& elm,
42  const concepts::Array<Cmplx>& coeff,
44  const uint i[2]) const;
45  virtual void compute_(const Quad<>& elm, const uint j[2],
47  const uint i[2]) const;
48  virtual void compute_(const Quad<>& elm,
49  const concepts::Array<Cmplx>& coeff,
51  const Real2d& p, const Real t = 0.0) const;
53  void convert_(const Quad<>& elm, concepts::Array<Cmplx>& val,
54  const Real2d& p, const Real t = 0.0) const;
56  std::unique_ptr<concepts::PiecewiseFormulaBase<Real> > Sigma_Inv_;
58  std::unique_ptr<const concepts::PiecewiseFormulaBase<Real2d> > curlH0_;
61  };
62 
63  // **************************************************** Eddy2D_dissipation **
64 
69  class Eddy2D_dissipation : public ElementFunction<1,Cmplx> {
70  public:
72  const concepts::ElementFunction<Cmplx>& eField);
73  virtual ~Eddy2D_dissipation() {}
74 
75  virtual Eddy2D_dissipation* clone() const {
76  return new Eddy2D_dissipation(*sigma_, *eField_);
77  }
78  protected:
79  virtual std::ostream& info(std::ostream& os) const;
80  private:
81  virtual void compute_(const Quad<>& elm,
82  const concepts::Array<Cmplx>& coeff,
83  Cmplx& val, const uint i[2]) const;
84  virtual void compute_(const Quad<>& elm, const uint j[2],
85  Cmplx& val, const uint i[2]) const;
86  virtual void compute_(const Quad<>& elm,
87  const concepts::Array<Cmplx>& coeff, Cmplx& val,
88  const Real2d& p, const Real t = 0.0) const;
90  void convert_(const concepts::Array<Cmplx>& eField,
91  const Real& sigma, Cmplx& val) const;
93  std::unique_ptr<concepts::PiecewiseConstFormula<Real> > sigma_;
95  std::unique_ptr<concepts::ElementFunction<Cmplx> > eField_;
96  };
97 
98 } // namespace hp2D
99 
100 #endif // Eddy2D_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
Local contribution to dissipation power loss.
virtual std::ostream & info(std::ostream &os) const
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.
An abstract class for a function in a FE space.
virtual void compute_(const Quad<> &elm, const concepts::Array< Cmplx > &coeff, Cmplx &val, const Real2d &p, const Real t=0.0) const
std::unique_ptr< concepts::PiecewiseFormulaBase< Real > > Sigma_Inv_
Cellwise defined formula.
Electrical field.
virtual void compute_(const Quad<> &elm, const uint j[2], concepts::Array< Cmplx > &val, const uint i[2]) const
Point< Real, 2 > Real2d
Base class for element functions for hp elements in 2D.
Definition: functionBase.hh:38
void convert_(const concepts::Array< Cmplx > &eField, const Real &sigma, Cmplx &val) const
Convert e-Field into the dissipation contribution.
std::unique_ptr< concepts::ElementFunction< Cmplx > > eField_
Element function for the e-Field.
PlCurl< Cmplx > plcurl_
Vectorial curl in 2D.
2D hp-FEM for H1-conforming elements.
virtual Eddy2D_eField * clone() const
virtual void compute_(const Quad<> &elm, const concepts::Array< Cmplx > &coeff, Cmplx &val, const uint i[2]) const
virtual void compute_(const Quad<> &elm, const uint j[2], Cmplx &val, const uint i[2]) 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, concepts::Array< Cmplx > &val, const uint i[2]) const
virtual ~Eddy2D_eField()
virtual std::ostream & info(std::ostream &os) const
Point< Cmplx, 2 > Cmplx2d
virtual Eddy2D_dissipation * clone() const
Eddy2D_dissipation(const concepts::PiecewiseConstFormula< Real > &sigma, const concepts::ElementFunction< Cmplx > &eField)
A 2D FEM element: a quad.
Definition: bf_advection.hh:44
std::unique_ptr< const concepts::PiecewiseFormulaBase< Real2d > > curlH0_
Formula for curl of homogenization.
std::unique_ptr< concepts::PiecewiseConstFormula< Real > > sigma_
Piecewise constant conductivity.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Eddy2D_eField(const concepts::PiecewiseFormulaBase< Real > &Sigma_Inv, const concepts::PiecewiseFormulaBase< Real2d > *curlH0=0)
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich