Eddy2D_H_Ring.hh

Go to the documentation of this file.
1 
10 #ifndef MeshImp2DTest_hh
11 #define MeshImp2DTest_hh
12 
13 #include <iostream>
14 #include <cstdlib>
15 #include "space/space.hh"
16 #include "basics/testcase.hh"
17 #include "basics/exceptions.hh"
18 #include "models/maxwell.hh"
19 
20 namespace test {
21 
22  // ******************************************************** Eddy2DRingTest **
23 
24  class Eddy2DRingTest : public TestCase {
25  public:
26  Eddy2DRingTest(const uint pmax = 3, const Real sigma = 1,
27  const Real epsilon = 1e-8, const bool graphics = false);
28  virtual ~Eddy2DRingTest() {}
29  virtual void run();
30 
32 
33 
35  void testCircle();
56 
59  void testRing();
65 
69  template<class F>
70  void testEnergies(F& model, const std::string& modelStr,
71  const concepts::Array<Real>& P,
72  const concepts::Array<Real>& W,
73  const concepts::Array<uint>& Dim,
74  const uint nelm);
80  private:
82  bool originalConstants_() const;
83 
85 
86  const uint pmax_;
87  const bool graphics_;
88 
89  Real omega_; // angular frequency in 1/s
90  Real sigma_; // conductivity constant in 1/(Ohm*m)
91  Real eps_; // dielectricity constant in s/(Ohm*m)
92  Real mu_; // permeability constant in Ohm*s/m
93  Real j0_; // current density in A/m^2
96 
98  std::string probStr);
100  std::string probStr);
101 
104  enum hp2D::Maxwell2D_H_Base::solverType type, bool diagPrecond,
105  Real& residual, Real& solvetime);
106  };
107 
108 } // namespace test
109 
110 # endif // MeshImp2DTest_hh
void testEnergies(F &model, const std::string &modelStr, const concepts::Array< Real > &P, const concepts::Array< Real > &W, const concepts::Array< uint > &Dim, const uint nelm)
Solve for different polynomial degrees and compare with given values.
concepts::InOutParameters output_
Type of boundary condition.
const bool graphics_
Type of boundary condition.
void testMaxwell_PMC_H_Circle(concepts::EddyGeometry2D &geom)
Test Routine the Maxwell's equations with a circle of metal in h-formulation with PMC boundary condit...
bool originalConstants_() const
Returns true, if the original constants are taken.
Base class for tests.
Definition: testcase.hh:92
void testMaxwell_PEC_H_Circle(concepts::EddyGeometry2D &geom)
Test Routine the Maxwell's equations with a circle of metal in h-formulation with PEC boundary condit...
void testRing()
Tests with a ring of metal.
Real sigma_
Type of boundary condition.
solverType
Type of the solver.
Definition: Maxwell2D_H.hh:42
void testMaxwell_PMC_E_Circle(concepts::EddyGeometry2D &geom)
Test Routine the Maxwell's equations with a circle of metal in e-formulation with PMC boundary condit...
void testCircle()
Tests with a circle of metal.
Holds parameters in hashes.
Definition: inputOutput.hh:75
Real omega_
Type of boundary condition.
const uint pmax_
Type of boundary condition.
Unit tests.
Definition: testcase.hh:66
Graphics.
Definition: basis.hh:33
concepts::MaxwellBoundary bc_
Type of boundary condition.
void testMaxwell_PMC_H_Ring_DD(concepts::EddyGeometry2D &geom)
Type of boundary condition.
void testMaxwell_PMC_H_Circle_DD(concepts::EddyGeometry2D &geom)
Test Routine the Maxwell's equations with a circle of metal in h-formulation with PMC boundary condit...
Eddy2DRingTest(const uint pmax=3, const Real sigma=1, const Real epsilon=1e-8, const bool graphics=false)
void testMaxwellSolversDD(concepts::EddyGeometry2D &geom, std::string probStr)
Type of boundary condition.
Real j0_
Type of boundary condition.
void testMaxwellRingSolvers()
Tests the Maxwell's equations with a ring of metal and a coil around with different solvers.
void testMaxwellSolver(concepts::ModelControl< hp2D::Maxwell2D_H_Base > &control, enum hp2D::Maxwell2D_H_Base::solverType type, bool diagPrecond, Real &residual, Real &solvetime)
Type of boundary condition.
void testMaxwell_PEC_E_Circle(concepts::EddyGeometry2D &geom)
Test Routine the Maxwell's equations with a circle of metal in e-formulation with PEC boundary condit...
Real eps_
Type of boundary condition.
void testMaxwellSolvers(concepts::EddyGeometry2D &geom, std::string probStr)
Type of boundary condition.
Abstract class for holding geometry and material for eddy current problems.
virtual void run()
Runs the tests. Must be overwritten by the specialization.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
void testMaxwell_PMC_H_Ring(concepts::EddyGeometry2D &geom)
Test Routine the Maxwell's equations with a ring of metal in h-formulation with PMC boundary conditio...
Class for holding boundary type of Maxwell's problems.
Definition: maxwell.hh:19
Real mu_
Type of boundary condition.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich