11#include "operator/sparseMatrix.hh"
48 const Real omega = OMEGA50,
const Real mu = MU0,
49 const uint geomRefAttrib = 100);
60 virtual std::ostream&
info(std::ostream& os)
const;
64 virtual const std::string
mshAbbr_() {
return geom_.meshAbbreviation(); }
72 std::unique_ptr<hpAdaptiveSpaceHCurl_H1> spc_;
73 std::unique_ptr<hpAdaptiveSpaceHCurl> spcE_;
74 std::unique_ptr<hpAdaptiveSpaceH1> spcN_;
76 std::unique_ptr<concepts::BoundaryConditions> bcE_, bcN_;
77 std::unique_ptr<concepts::CellConditions> cc_;
80 std::unique_ptr<concepts::Vector<Cmplx> > residual_;
82 std::unique_ptr<Real> residualNorm_;
86 std::unique_ptr<concepts::SparseMatrix<Cmplx> > S_;
88 std::unique_ptr<concepts::SparseMatrix<Real> > A_, M_eddy_;
90 std::unique_ptr<concepts::Vector<Cmplx> > rhs_;
98 void constructSpace_();
100 virtual void solve_();
104 void rotrotMatrix_();
106 void identityMatrix_();
113 std::unique_ptr<Real> dissipation_;
115 std::unique_ptr<Real> magnEnergy_;
117 double solvetime_, matrixtime_, spacetime_;
133 virtual std::ostream&
letters(std::ostream& os)
const;
135 virtual std::ostream&
arguments(std::ostream& os)
const;
142 virtual int input(
int opt,
const char* optarg);
146 virtual std::ostream&
info(std::ostream& os)
const;
159 class ModelControl<
hp2D::Eddy2D_E> :
160 public ModelControlBase<Model<Cmplx> > {
164 virtual ~ModelControl() {}
173 virtual void matrices();
175 virtual Real solve();
177 void storeMatricesToMatlab(
const std::string
matrixFile)
const;
178 void storeMatricesToOctave(
const std::string
matrixFile)
const;
180 void checkRanks()
const;
184 virtual std::ostream&
info(std::ostream&
os)
const;
const boundaryType bType() const
Returns boundary type.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual F & model()
Returns the model.
virtual Real dissipation()
Return dissipation power loss.
virtual hpAdaptiveSpaceHCurl_H1 & space() const
Returns the space.
virtual hpFull & prebuild_()
Space Prebuilder.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Real magnEnergy()
Return magnetic energy.
virtual const std::string mshAbbr_()
Mesh abbreviation string.
Eddy2D_E(concepts::EddyGeometry2D &geom, enum concepts::MaxwellBoundary::boundaryType bType=PEC, const Real omega=OMEGA50, const Real mu=MU0, const uint geomRefAttrib=100)
Set< F > makeSet(uint n, const F &first,...)
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.