11#include "operator/sparseMatrix.hh"
23 class InputMaxwell2D_E;
40 enum solverType type = SUPERLU,
bool diagPrecond =
true,
41 bool afterIter =
false,
42 const Real eps = EPS0,
const Real omega = OMEGA50,
43 const Real mu = MU0,
const uint geomRefAttrib = 100);
45 const uint geomRefAttrib = 100);
54 virtual std::ostream&
info(std::ostream& os)
const;
58 virtual const std::string
mshAbbr_() {
return geom_.meshAbbreviation(); }
66 std::unique_ptr<hp2D::hpAdaptiveSpaceHCurl> spc_;
68 std::unique_ptr<concepts::BoundaryConditions> bc_;
75 bool afterIter_, statusAfterIter_;
77 std::unique_ptr<concepts::Vector<Cmplx> > residual_;
79 std::unique_ptr<Real> residualNorm_;
81 std::unique_ptr<concepts::SparseMatrix<Cmplx> > S_;
83 std::unique_ptr<concepts::SparseMatrix<Real> > A_, M_eddy_, M_wave_;
85 std::unique_ptr<concepts::Vector<Cmplx> > rhs_;
93 virtual void solve_();
99 void identityMatrix_();
103 std::unique_ptr<Real> dissipation_;
105 std::unique_ptr<Real> magnEnergy_;
107 double solvetime_, matrixtime_, spacetime_;
123 virtual std::ostream&
letters(std::ostream& os)
const;
125 virtual std::ostream&
arguments(std::ostream& os)
const;
132 virtual int input(
int opt,
const char* optarg);
142 virtual std::ostream&
info(std::ostream& os)
const;
159 class ModelControl<
hp2D::Maxwell2D_E> :
160 public ModelControlBase<Model<Cmplx> > {
164 virtual ~ModelControl() {}
173 virtual void matrices();
178 virtual Real solve();
180 void storeMatricesToMatlab(
const std::string
matrixFile)
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.
solverType
Type of the solver.
virtual hp2D::hpAdaptiveSpaceHCurl & space() const
Returns the space.
virtual Real dissipation()
Return dissipation power loss.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Real magnEnergy()
Return magnetic energy.
virtual hpFull & prebuild_()
Space Prebuilder.
virtual const std::string mshAbbr_()
Mesh abbreviation string.
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.