Go to the documentation of this file.00001
00008 #ifndef MeshImp2DTest_hh
00009 #define MeshImp2DTest_hh
00010
00011 #include <iostream>
00012 #include <cstdlib>
00013 #include "space/space.hh"
00014 #include "basics/testcase.hh"
00015 #include "basics/exceptions.hh"
00016 #include "models/maxwell.hh"
00017
00018 namespace test {
00019
00020
00021
00022 class Eddy2DRingTest : public TestCase {
00023 public:
00024 Eddy2DRingTest(const uint pmax = 3, const Real sigma = 1,
00025 const Real epsilon = 1e-8, const bool graphics = false);
00026 virtual ~Eddy2DRingTest() {}
00027 virtual void run();
00028
00030
00031
00033 void testCircle();
00037 void testMaxwell_PMC_H_Circle(concepts::EddyGeometry2D& geom);
00041 void testMaxwell_PEC_H_Circle(concepts::EddyGeometry2D& geom);
00045 void testMaxwell_PMC_E_Circle(concepts::EddyGeometry2D& geom);
00049 void testMaxwell_PEC_E_Circle(concepts::EddyGeometry2D& geom);
00053 void testMaxwell_PMC_H_Circle_DD(concepts::EddyGeometry2D& geom);
00054
00057 void testRing();
00061 void testMaxwell_PMC_H_Ring(concepts::EddyGeometry2D& geom);
00062 void testMaxwell_PMC_H_Ring_DD(concepts::EddyGeometry2D& geom);
00063
00067 template<class F>
00068 void testEnergies(F& model, const std::string& modelStr,
00069 const concepts::Array<Real>& P,
00070 const concepts::Array<Real>& W,
00071 const concepts::Array<uint>& Dim,
00072 const uint nelm);
00076 void testMaxwellRingSolvers();
00078 private:
00080 bool originalConstants_() const;
00081
00082 concepts::InOutParameters output_;
00083
00084 const uint pmax_;
00085 const bool graphics_;
00086
00087 Real omega_;
00088 Real sigma_;
00089 Real eps_;
00090 Real mu_;
00091 Real j0_;
00093 concepts::MaxwellBoundary bc_;
00094
00095 void testMaxwellSolvers(concepts::EddyGeometry2D& geom,
00096 std::string probStr);
00097 void testMaxwellSolversDD(concepts::EddyGeometry2D& geom,
00098 std::string probStr);
00099
00100 void testMaxwellSolver
00101 (concepts::ModelControl<hp2D::Maxwell2D_H_Base>& control,
00102 enum hp2D::Maxwell2D_H_Base::solverType type, bool diagPrecond,
00103 Real& residual, Real& solvetime);
00104 };
00105
00106 }
00107
00108 # endif // MeshImp2DTest_hh