Class for calculating Eddy current problem with Maxwell modell in h formulation. More...

#include <Eddy2D_H.hh>

Inheritance diagram for hp2D::Eddy2D_H:
hp2D::AdaptiveModel< Cmplx > concepts::MaxwellModel concepts::AdaptiveModel< Cmplx, 2 > concepts::Model< Cmplx > concepts::OutputOperator

Public Types

enum  solverType { SUPERLU = 0, BICGSTAB = 1 }
 Type of the solver. More...
 
typedef Cmplx type
 

Public Member Functions

virtual Real dissipation ()
 Return dissipation energy. More...
 
 Eddy2D_H (concepts::EddyGeometry2D &geom, const concepts::Formula< Real > &H0, const concepts::Formula< Real2d > &curlH0, const concepts::Formula< Real > *divgradH0=0, Eddy2D_H_Interior *interior=0, const uint geomRefAttrib=100, const Real omega=OMEGA50, const Real mu=MU0, enum solverType type=SUPERLU)
 Constructor. More...
 
 Eddy2D_H (concepts::EddyGeometry2D &geom, const Real H0, Eddy2D_H_Interior *interior=0, const uint geomRefAttrib=100, const Real omega=OMEGA50, const Real mu=MU0, enum solverType type=SUPERLU)
 Constructor. More...
 
 Eddy2D_H (concepts::EddyGeometry2D &geom, InputEddy2D_H &input, const uint geomRefAttrib=100)
 
concepts::ElementFormula< concepts::Cmplx2d > * eField ()
 Returns a pointer to the e-Field. More...
 
concepts::ElementFormula< Cmplx > * hField ()
 Returns a pointer to the h-Field (solution + h0). More...
 
virtual Real magnEnergy ()
 Return magnetic energy. More...
 
void rebuildMesh (concepts::InputAdaptiveModels &input)
 
void rebuildMesh (const uint l=0, const uint p=1, const uint g=0, const uint subdiv=X|Y)
 Rebuilds only the mesh and sets the polynomial degrees. More...
 
const Vector< Cmplx > * solution ()
 Returns solution vector. More...
 
virtual hpAdaptiveSpaceH1space () const
 Returns the space. More...
 
virtual Space< Real > & space () const=0
 Returns the space. More...
 
virtual ~Eddy2D_H ()
 

Protected Types

enum  subdivTypes
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 
virtual concepts::Meshmesh_ ()
 Mesh. More...
 
virtual const std::string mshAbbr_ ()
 Mesh abbreviation string. More...
 
virtual void rebuildMesh_ (const uint l=0, const uint p=1, const uint g=0, const uint subdiv=X|Y)
 Rebuilds only the mesh and sets the polynomial degrees. More...
 

Protected Attributes

const uint geomRefAttr_
 Attribute of vertices or edges for geometric refinement. More...
 
const std::string problemName_
 Name of the problem. More...
 
std::unique_ptr< Vector< Cmplx > > sol_
 Solution vector. More...
 

Private Member Functions

bool connectedIdx_ (uint &i)
 Gives connected index at interior border to i, if exists. More...
 
void constructor_ ()
 Private constructor. More...
 
void identityMatrix_ ()
 Calculate identity matrix. More...
 
void laplaceMatrix_ ()
 Calculate stiffness matrix. More...
 
void linearform_ ()
 Calculate the load vector. More...
 
void matrices_ ()
 Building the matrices. More...
 
virtual hpFullprebuild_ ()
 Space Prebuilder. More...
 
virtual void solve_ ()
 Method for solving, throws exception when it wasn't successfull. More...
 
void systemMatrix_ ()
 Compress system matrix. More...
 

Private Attributes

std::unique_ptr< concepts::SparseMatrix< Real > > A_
 Stiffness matrix. More...
 
std::unique_ptr< concepts::BoundaryConditionsbc_
 Boundary conditions. More...
 
std::unique_ptr< concepts::CellConditionscc_
 Cell conditions. More...
 
std::unique_ptr< const concepts::PiecewiseFormulaBase< Real2d > > curlH0_
 
std::unique_ptr< Real > dissipation_
 dissipation energy More...
 
std::unique_ptr< const concepts::PiecewiseFormulaBase< Real > > divgradH0_
 
std::unique_ptr< const concepts::ElementFunction< Cmplx > > fun_
 Element function, is hp2D::Value + homogenisation. More...
 
concepts::EddyGeometry2Dgeom_
 Mesh and material constants (sigma) More...
 
std::unique_ptr< const concepts::PiecewiseFormulaBase< Real > > H0_
 Formula for homogenization. More...
 
std::unique_ptr< Eddy2D_H_Interiorinterior_
 Size and magnetic field of or in the nonconducting imbedded region. More...
 
std::unique_ptr< concepts::SparseMatrix< Real > > M_
 Mass matrix. More...
 
std::unique_ptr< Real > magnEnergy_
 Magnetic energy. More...
 
const Real mu_
 Permeability constant. More...
 
const Real omega_
 Angular frequency. More...
 
std::unique_ptr< concepts::Vector< Cmplx > > residual_
 Residual vector. More...
 
std::unique_ptr< Real > residualNorm_
 Euclidian norm of the residual of solving the linear system. More...
 
std::unique_ptr< concepts::Vector< Cmplx > > rhs_
 
std::unique_ptr< concepts::SparseMatrix< Cmplx > > S_
 System matrix. More...
 
concepts::PiecewiseFormulaFun< Real, Real > Sigma_Inv_
 Piecewise constant formula. More...
 
double solvetime_
 Time to solve the system. More...
 
std::unique_ptr< hpAdaptiveSpaceH1spc_
 Space. More...
 
enum solverType type_
 Solver type. More...
 

Detailed Description

Class for calculating Eddy current problem with Maxwell modell in h formulation.

Author
Kersten Schmidt, 2005

Definition at line 67 of file Eddy2D_H.hh.

Member Typedef Documentation

◆ type

typedef Cmplx concepts::Model< Cmplx >::type
inherited

Definition at line 59 of file models.hh.

Member Enumeration Documentation

◆ solverType

Type of the solver.

Enumerator
SUPERLU 
BICGSTAB 

Definition at line 70 of file Eddy2D_H.hh.

◆ subdivTypes

enum hp2D::AdaptiveModel::subdivTypes
protectedinherited

Definition at line 83 of file adaptiveModels.hh.

Constructor & Destructor Documentation

◆ Eddy2D_H() [1/3]

hp2D::Eddy2D_H::Eddy2D_H ( concepts::EddyGeometry2D geom,
const concepts::Formula< Real > &  H0,
const concepts::Formula< Real2d > &  curlH0,
const concepts::Formula< Real > *  divgradH0 = 0,
Eddy2D_H_Interior interior = 0,
const uint  geomRefAttrib = 100,
const Real  omega = OMEGA50,
const Real  mu = MU0,
enum solverType  type = SUPERLU 
)

Constructor.

Parameters
geomgeometry, conductivity and source currents
H0Formula for homogenization.
curlH0[\mathbf{curl}_{2D} h_0]
divgradH0pointer to formula [\mathrm{div} \mathbf{grad} h_0], only needed if offset function has gradient inside the conductive region
omegaangular frequency in 1/s
mupermeability constant in Ohm*s/m
geomRefAttribattrib for geometric refinement
typesolver type

◆ Eddy2D_H() [2/3]

hp2D::Eddy2D_H::Eddy2D_H ( concepts::EddyGeometry2D geom,
const Real  H0,
Eddy2D_H_Interior interior = 0,
const uint  geomRefAttrib = 100,
const Real  omega = OMEGA50,
const Real  mu = MU0,
enum solverType  type = SUPERLU 
)

Constructor.

Parameters
geomgeometry, conductivity and source currents
H0magnetic field, created by the coil
omegaangular frequency in 1/s
mupermeability constant in Ohm*s/m
geomRefAttribattrib for geometric refinement
typesolver type

◆ Eddy2D_H() [3/3]

hp2D::Eddy2D_H::Eddy2D_H ( concepts::EddyGeometry2D geom,
InputEddy2D_H input,
const uint  geomRefAttrib = 100 
)

◆ ~Eddy2D_H()

virtual hp2D::Eddy2D_H::~Eddy2D_H ( )
inlinevirtual

Definition at line 103 of file Eddy2D_H.hh.

Member Function Documentation

◆ connectedIdx_()

bool hp2D::Eddy2D_H::connectedIdx_ ( uint &  i)
private

Gives connected index at interior border to i, if exists.

◆ constructor_()

void hp2D::Eddy2D_H::constructor_ ( )
private

Private constructor.

◆ dissipation()

virtual Real hp2D::Eddy2D_H::dissipation ( )
virtual

Return dissipation energy.

Implements concepts::MaxwellModel.

◆ eField()

concepts::ElementFormula<concepts::Cmplx2d>* hp2D::Eddy2D_H::eField ( )

Returns a pointer to the e-Field.

Solves the problem, if not yet.

◆ hField()

concepts::ElementFormula<Cmplx>* hp2D::Eddy2D_H::hField ( )

Returns a pointer to the h-Field (solution + h0).

Solves the problem, if not yet.

◆ identityMatrix_()

void hp2D::Eddy2D_H::identityMatrix_ ( )
private

Calculate identity matrix.

◆ info()

virtual std::ostream& hp2D::Eddy2D_H::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::Model< Cmplx >.

◆ laplaceMatrix_()

void hp2D::Eddy2D_H::laplaceMatrix_ ( )
private

Calculate stiffness matrix.

◆ linearform_()

void hp2D::Eddy2D_H::linearform_ ( )
private

Calculate the load vector.

◆ magnEnergy()

virtual Real hp2D::Eddy2D_H::magnEnergy ( )
virtual

Return magnetic energy.

Implements concepts::MaxwellModel.

◆ matrices_()

void hp2D::Eddy2D_H::matrices_ ( )
private

Building the matrices.

◆ mesh_()

virtual concepts::Mesh& hp2D::AdaptiveModel< Cmplx >::mesh_ ( )
inlineprotectedvirtualinherited

Mesh.

Implements concepts::Model< Cmplx >.

Definition at line 87 of file adaptiveModels.hh.

◆ mshAbbr_()

virtual const std::string hp2D::Eddy2D_H::mshAbbr_ ( )
inlineprotectedvirtual

Mesh abbreviation string.

Implements concepts::Model< Cmplx >.

Definition at line 121 of file Eddy2D_H.hh.

◆ prebuild_()

virtual hpFull& hp2D::Eddy2D_H::prebuild_ ( )
inlineprivatevirtual

Space Prebuilder.

Implements hp2D::AdaptiveModel< Cmplx >.

Definition at line 126 of file Eddy2D_H.hh.

◆ rebuildMesh() [1/2]

void concepts::AdaptiveModel< Cmplx , dim >::rebuildMesh ( concepts::InputAdaptiveModels input)
inherited

◆ rebuildMesh() [2/2]

void concepts::AdaptiveModel< Cmplx , dim >::rebuildMesh ( const uint  l = 0,
const uint  p = 1,
const uint  g = 0,
const uint  subdiv = X | Y 
)
inherited

Rebuilds only the mesh and sets the polynomial degrees.

Parameters
lnumber of uniform refinements
pnumber of polynomial enlargements
gnumber of geometric refinements
subdivpossibility to restrict subdivision strategy for geometric refinement

◆ rebuildMesh_()

virtual void hp2D::AdaptiveModel< Cmplx >::rebuildMesh_ ( const uint  l = 0,
const uint  p = 1,
const uint  g = 0,
const uint  subdiv = X | Y 
)
protectedvirtualinherited

Rebuilds only the mesh and sets the polynomial degrees.

Implements concepts::AdaptiveModel< Cmplx, 2 >.

◆ solution()

const Vector<Cmplx >* concepts::Model< Cmplx >::solution ( )
inlineinherited

Returns solution vector.

Definition at line 67 of file models.hh.

◆ solve_()

virtual void hp2D::Eddy2D_H::solve_ ( )
privatevirtual

Method for solving, throws exception when it wasn't successfull.

Implements concepts::Model< Cmplx >.

◆ space() [1/2]

virtual hpAdaptiveSpaceH1& hp2D::Eddy2D_H::space ( ) const
virtual

Returns the space.

◆ space() [2/2]

virtual Space<Real>& concepts::Model< Cmplx >::space ( ) const
pure virtualinherited

Returns the space.

◆ systemMatrix_()

void hp2D::Eddy2D_H::systemMatrix_ ( )
private

Compress system matrix.

Member Data Documentation

◆ A_

std::unique_ptr<concepts::SparseMatrix<Real> > hp2D::Eddy2D_H::A_
private

Stiffness matrix.

Definition at line 157 of file Eddy2D_H.hh.

◆ bc_

std::unique_ptr<concepts::BoundaryConditions> hp2D::Eddy2D_H::bc_
private

Boundary conditions.

Definition at line 147 of file Eddy2D_H.hh.

◆ cc_

std::unique_ptr<concepts::CellConditions> hp2D::Eddy2D_H::cc_
private

Cell conditions.

Definition at line 149 of file Eddy2D_H.hh.

◆ curlH0_

std::unique_ptr<const concepts::PiecewiseFormulaBase<Real2d> > hp2D::Eddy2D_H::curlH0_
private

Definition at line 168 of file Eddy2D_H.hh.

◆ dissipation_

std::unique_ptr<Real> hp2D::Eddy2D_H::dissipation_
private

dissipation energy

Definition at line 177 of file Eddy2D_H.hh.

◆ divgradH0_

std::unique_ptr<const concepts::PiecewiseFormulaBase<Real> > hp2D::Eddy2D_H::divgradH0_
private

Definition at line 169 of file Eddy2D_H.hh.

◆ fun_

std::unique_ptr<const concepts::ElementFunction<Cmplx> > hp2D::Eddy2D_H::fun_
private

Element function, is hp2D::Value + homogenisation.

Definition at line 181 of file Eddy2D_H.hh.

◆ geom_

concepts::EddyGeometry2D& hp2D::Eddy2D_H::geom_
private

Mesh and material constants (sigma)

Definition at line 145 of file Eddy2D_H.hh.

◆ geomRefAttr_

const uint hp2D::AdaptiveModel< Cmplx >::geomRefAttr_
protectedinherited

Attribute of vertices or edges for geometric refinement.

Definition at line 91 of file adaptiveModels.hh.

◆ H0_

std::unique_ptr<const concepts::PiecewiseFormulaBase<Real> > hp2D::Eddy2D_H::H0_
private

Formula for homogenization.

Definition at line 167 of file Eddy2D_H.hh.

◆ interior_

std::unique_ptr<Eddy2D_H_Interior> hp2D::Eddy2D_H::interior_
private

Size and magnetic field of or in the nonconducting imbedded region.

Definition at line 171 of file Eddy2D_H.hh.

◆ M_

std::unique_ptr<concepts::SparseMatrix<Real> > hp2D::Eddy2D_H::M_
private

Mass matrix.

Definition at line 159 of file Eddy2D_H.hh.

◆ magnEnergy_

std::unique_ptr<Real> hp2D::Eddy2D_H::magnEnergy_
private

Magnetic energy.

Definition at line 179 of file Eddy2D_H.hh.

◆ mu_

const Real hp2D::Eddy2D_H::mu_
private

Permeability constant.

Definition at line 175 of file Eddy2D_H.hh.

◆ omega_

const Real hp2D::Eddy2D_H::omega_
private

Angular frequency.

Definition at line 173 of file Eddy2D_H.hh.

◆ problemName_

const std::string concepts::Model< Cmplx >::problemName_
protectedinherited

Name of the problem.

Definition at line 82 of file models.hh.

◆ residual_

std::unique_ptr<concepts::Vector<Cmplx> > hp2D::Eddy2D_H::residual_
private

Residual vector.

Definition at line 153 of file Eddy2D_H.hh.

◆ residualNorm_

std::unique_ptr<Real> hp2D::Eddy2D_H::residualNorm_
private

Euclidian norm of the residual of solving the linear system.

Definition at line 155 of file Eddy2D_H.hh.

◆ rhs_

std::unique_ptr<concepts::Vector<Cmplx> > hp2D::Eddy2D_H::rhs_
private

Definition at line 163 of file Eddy2D_H.hh.

◆ S_

std::unique_ptr<concepts::SparseMatrix<Cmplx> > hp2D::Eddy2D_H::S_
private

System matrix.

Definition at line 161 of file Eddy2D_H.hh.

◆ Sigma_Inv_

concepts::PiecewiseFormulaFun<Real,Real> hp2D::Eddy2D_H::Sigma_Inv_
private

Piecewise constant formula.

\[\sigma^{-1}\]

Definition at line 165 of file Eddy2D_H.hh.

◆ sol_

std::unique_ptr<Vector<Cmplx > > concepts::Model< Cmplx >::sol_
protectedinherited

Solution vector.

Definition at line 78 of file models.hh.

◆ solvetime_

double hp2D::Eddy2D_H::solvetime_
private

Time to solve the system.

Definition at line 183 of file Eddy2D_H.hh.

◆ spc_

std::unique_ptr<hpAdaptiveSpaceH1> hp2D::Eddy2D_H::spc_
private

Space.

Definition at line 143 of file Eddy2D_H.hh.

◆ type_

enum solverType hp2D::Eddy2D_H::type_
private

Solver type.

Definition at line 149 of file Eddy2D_H.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich