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

#include <Maxwell2D_H.hh>

Inheritance diagram for hp2D::Maxwell2D_H_DD:
hp2D::Maxwell2D_H_Base hp2D::AdaptiveModel< Cmplx > concepts::MaxwellModel concepts::MaxwellBoundary concepts::AdaptiveModel< Cmplx, 2 > concepts::Model< Cmplx > concepts::OutputOperator

Public Types

enum  boundaryType { PMC = 0, PEC = 1, MAX_TYPE }
 Boundary type. More...
 
enum  solverType {
  SUPERLU = 0, SUPERLU2 = 1, BICGSTAB = 2, BICGSTAB2 = 3,
  BICGSTABSUPERLU = 4
}
 Type of the solver. More...
 
typedef Cmplx type
 

Public Member Functions

boundaryTypebType ()
 
const boundaryType bType () const
 Returns boundary type. More...
 
const std::string bTypeStr () const
 Returns name of boundary type as string. More...
 
Real dissipation ()
 Return dissipation power loss. More...
 
Real magnEnergy ()
 Return magnetic energy. More...
 
 Maxwell2D_H_DD (concepts::EddyGeometry2D &geom, enum concepts::MaxwellBoundary::boundaryType bType, enum solverType type=SUPERLU, bool diagPrecond=true, bool afterIter=false, const Real eps=EPS0, const Real omega=OMEGA50, const Real mu=MU0, const uint geomRefAttrib=100, std::string domains="(2)")
 
 Maxwell2D_H_DD (concepts::EddyGeometry2D &geom, InputMaxwell2D_H &input, const uint geomRefAttrib=100, std::string domains="(2)")
 
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 concepts::DomainDecomp< hpAdaptiveSpaceH1 > & space () const
 
virtual Space< Real > & space () const=0
 Returns the space. More...
 
virtual ~Maxwell2D_H_DD ()
 

Protected Types

enum  subdivTypes
 

Protected Member Functions

concepts::SparseMatrix< Real > * identityMatrix_ (concepts::Space< Real > &spc, concepts::SparseMatrix< Cmplx > *S)
 Calculate identity matrix and add's it to system matrix S. More...
 
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 
concepts::SparseMatrix< Cmplx > * laplaceMatrix_ (concepts::Space< Real > &spc, concepts::SparseMatrix< Cmplx > *S)
 Calculate stiffness matrix and add's it to system matrix S. More...
 
void linearform_ ()
 Calculate the load vector, assumes sigma = 0 inside the coil. More...
 
virtual concepts::Meshmesh_ ()
 Mesh. More...
 
virtual const std::string mshAbbr_ ()
 Mesh abbreviation string. More...
 
virtual hpFullprebuild_ ()
 Space Prebuilder. 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

bool afterIter_
 Nachiteration. More...
 
std::unique_ptr< concepts::BoundaryConditionsbc_
 Boundary conditions. More...
 
bool diagPrecond_
 Using diagonal preconditioning. More...
 
std::unique_ptr< Real > dissipation_
 Dissipation power loss. More...
 
Real eps_
 Dielectricity constant. More...
 
concepts::EddyGeometry2Dgeom_
 Mesh and material constants (sigma, j0) More...
 
const uint geomRefAttr_
 Attribute of vertices or edges for geometric refinement. More...
 
concepts::PiecewiseFormulaFun< Cmplx, Real > iOmegaEps_plus_Sigma_Inv_
 Piecewise constant formula. More...
 
uint iterations_
 Number of iterations for iterative solver. More...
 
std::unique_ptr< Real > magnEnergy_
 Magnetic energy. More...
 
double matrixtime_
 
const Real mu_
 Permeability constant. More...
 
Real omega_
 Angular frequency. More...
 
const std::string problemName_
 Name of the problem. More...
 
std::unique_ptr< concepts::Vector< Cmplx > > residual_
 
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< Vector< Cmplx > > sol_
 Solution vector. More...
 
double solvetime_
 Time to solve the system, to build the matrices, to rebuild the space. More...
 
double spacetime_
 
bool statusAfterIter_
 
enum solverType type_
 Solver type. More...
 

Private Member Functions

template<class F >
void clear_ (concepts::Sequence< F * > &seq)
 
void constructor_ ()
 Private constructor. More...
 
void constructSpace_ (const std::string &domainStr)
 Constructs the space. More...
 
void identityMatrix_ ()
 Calculate identity matrix. More...
 
void laplaceMatrix_ ()
 Calculate stiffness matrix. More...
 
void matrices_ ()
 Building the matrices. More...
 
virtual void solve_ ()
 Method for solving, throws exception when it wasn't successfull. More...
 

Private Attributes

concepts::Sequence< concepts::SparseMatrix< Cmplx > * > A_
 Stiffness and System matrix. More...
 
enum boundaryType bType_
 Type of boundary condition. More...
 
concepts::Sequence< concepts::SparseMatrix< Real > * > M_
 Mass matrix. More...
 
hp2D::hpFull prebuilds_
 Space prebuilder. More...
 
concepts::Sequence< concepts::SparseMatrix< Cmplx > * > S_
 
std::unique_ptr< concepts::DomainDecomp< hp2D::hpAdaptiveSpaceH1 > > spc_
 Space. More...
 

Friends

class concepts::ModelControl< Maxwell2D_H_DD >
 

Detailed Description

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

Author
Kersten Schmidt, 2005

Definition at line 186 of file Maxwell2D_H.hh.

Member Typedef Documentation

◆ type

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

Definition at line 59 of file models.hh.

Member Enumeration Documentation

◆ boundaryType

Boundary type.

Either perfect magnetic conductor (PMC) or perfect electric conductor (PEC). Wether it's dirichlet or neumann boundary is dependent from the formulation.

Enumerator
PMC 
PEC 
MAX_TYPE 

Definition at line 27 of file maxwell.hh.

◆ solverType

Type of the solver.

Enumerator
SUPERLU 
SUPERLU2 
BICGSTAB 
BICGSTAB2 
BICGSTABSUPERLU 

Definition at line 42 of file Maxwell2D_H.hh.

◆ subdivTypes

enum hp2D::AdaptiveModel::subdivTypes
protectedinherited

Definition at line 83 of file adaptiveModels.hh.

Constructor & Destructor Documentation

◆ Maxwell2D_H_DD() [1/2]

hp2D::Maxwell2D_H_DD::Maxwell2D_H_DD ( concepts::EddyGeometry2D geom,
enum concepts::MaxwellBoundary::boundaryType  bType,
enum solverType  type = SUPERLU,
bool  diagPrecond = true,
bool  afterIter = false,
const Real  eps = EPS0,
const Real  omega = OMEGA50,
const Real  mu = MU0,
const uint  geomRefAttrib = 100,
std::string  domains = "(2)" 
)

◆ Maxwell2D_H_DD() [2/2]

hp2D::Maxwell2D_H_DD::Maxwell2D_H_DD ( concepts::EddyGeometry2D geom,
InputMaxwell2D_H input,
const uint  geomRefAttrib = 100,
std::string  domains = "(2)" 
)

◆ ~Maxwell2D_H_DD()

virtual hp2D::Maxwell2D_H_DD::~Maxwell2D_H_DD ( )
virtual

Member Function Documentation

◆ bType() [1/2]

boundaryType& concepts::MaxwellBoundary::bType ( )
inlineinherited

Definition at line 34 of file maxwell.hh.

◆ bType() [2/2]

const boundaryType concepts::MaxwellBoundary::bType ( ) const
inlineinherited

Returns boundary type.

Definition at line 33 of file maxwell.hh.

◆ bTypeStr()

const std::string concepts::MaxwellBoundary::bTypeStr ( ) const
inlineinherited

Returns name of boundary type as string.

Definition at line 36 of file maxwell.hh.

◆ clear_()

template<class F >
void hp2D::Maxwell2D_H_DD::clear_ ( concepts::Sequence< F * > &  seq)
private

Definition at line 240 of file Maxwell2D_H.hh.

◆ constructor_()

void hp2D::Maxwell2D_H_Base::constructor_ ( )
privateinherited

Private constructor.

◆ constructSpace_()

void hp2D::Maxwell2D_H_DD::constructSpace_ ( const std::string &  domainStr)
private

Constructs the space.

◆ dissipation()

Real hp2D::Maxwell2D_H_DD::dissipation ( )
virtual

Return dissipation power loss.

Implements concepts::MaxwellModel.

◆ identityMatrix_() [1/2]

void hp2D::Maxwell2D_H_DD::identityMatrix_ ( )
private

Calculate identity matrix.

◆ identityMatrix_() [2/2]

concepts::SparseMatrix<Real>* hp2D::Maxwell2D_H_Base::identityMatrix_ ( concepts::Space< Real > &  spc,
concepts::SparseMatrix< Cmplx > *  S 
)
protectedinherited

Calculate identity matrix and add's it to system matrix S.

◆ info()

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

Returns information in an output stream.

Reimplemented from hp2D::Maxwell2D_H_Base.

◆ laplaceMatrix_() [1/2]

void hp2D::Maxwell2D_H_DD::laplaceMatrix_ ( )
private

Calculate stiffness matrix.

◆ laplaceMatrix_() [2/2]

concepts::SparseMatrix<Cmplx>* hp2D::Maxwell2D_H_Base::laplaceMatrix_ ( concepts::Space< Real > &  spc,
concepts::SparseMatrix< Cmplx > *  S 
)
protectedinherited

Calculate stiffness matrix and add's it to system matrix S.

◆ linearform_()

void hp2D::Maxwell2D_H_Base::linearform_ ( )
protectedinherited

Calculate the load vector, assumes sigma = 0 inside the coil.

◆ magnEnergy()

Real hp2D::Maxwell2D_H_DD::magnEnergy ( )
virtual

Return magnetic energy.

Implements concepts::MaxwellModel.

◆ matrices_()

void hp2D::Maxwell2D_H_DD::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::Maxwell2D_H_Base::mshAbbr_ ( )
inlineprotectedvirtualinherited

Mesh abbreviation string.

Implements concepts::Model< Cmplx >.

Definition at line 67 of file Maxwell2D_H.hh.

◆ prebuild_()

virtual hpFull& hp2D::Maxwell2D_H_DD::prebuild_ ( )
inlineprotectedvirtual

Space Prebuilder.

Implements hp2D::AdaptiveModel< Cmplx >.

Definition at line 211 of file Maxwell2D_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::Maxwell2D_H_DD::solve_ ( )
privatevirtual

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

Implements concepts::Model< Cmplx >.

◆ space() [1/2]

virtual concepts::DomainDecomp<hpAdaptiveSpaceH1>& hp2D::Maxwell2D_H_DD::space ( ) const
inlinevirtual

Definition at line 201 of file Maxwell2D_H.hh.

◆ space() [2/2]

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

Returns the space.

Friends And Related Function Documentation

◆ concepts::ModelControl< Maxwell2D_H_DD >

friend class concepts::ModelControl< Maxwell2D_H_DD >
friend

Definition at line 176 of file Maxwell2D_H.hh.

Member Data Documentation

◆ A_

concepts::Sequence<concepts::SparseMatrix<Cmplx>*> hp2D::Maxwell2D_H_DD::A_
private

Stiffness and System matrix.

Definition at line 218 of file Maxwell2D_H.hh.

◆ afterIter_

bool hp2D::Maxwell2D_H_Base::afterIter_
protectedinherited

Nachiteration.

Definition at line 88 of file Maxwell2D_H.hh.

◆ bc_

std::unique_ptr<concepts::BoundaryConditions> hp2D::Maxwell2D_H_Base::bc_
protectedinherited

Boundary conditions.

Definition at line 82 of file Maxwell2D_H.hh.

◆ bType_

enum boundaryType concepts::MaxwellBoundary::bType_
privateinherited

Type of boundary condition.

Definition at line 36 of file maxwell.hh.

◆ diagPrecond_

bool hp2D::Maxwell2D_H_Base::diagPrecond_
protectedinherited

Using diagonal preconditioning.

Definition at line 86 of file Maxwell2D_H.hh.

◆ dissipation_

std::unique_ptr<Real> hp2D::Maxwell2D_H_Base::dissipation_
protectedinherited

Dissipation power loss.

Definition at line 103 of file Maxwell2D_H.hh.

◆ eps_

Real hp2D::Maxwell2D_H_Base::eps_
protectedinherited

Dielectricity constant.

Definition at line 97 of file Maxwell2D_H.hh.

◆ geom_

concepts::EddyGeometry2D& hp2D::Maxwell2D_H_Base::geom_
protectedinherited

Mesh and material constants (sigma, j0)

Definition at line 80 of file Maxwell2D_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.

◆ iOmegaEps_plus_Sigma_Inv_

concepts::PiecewiseFormulaFun<Cmplx, Real> hp2D::Maxwell2D_H_Base::iOmegaEps_plus_Sigma_Inv_
protectedinherited

Piecewise constant formula.

\[(i \omega \varepsilon_0 + \sigma)^-1\]

Definition at line 95 of file Maxwell2D_H.hh.

◆ iterations_

uint hp2D::Maxwell2D_H_Base::iterations_
protectedinherited

Number of iterations for iterative solver.

Definition at line 109 of file Maxwell2D_H.hh.

◆ M_

concepts::Sequence<concepts::SparseMatrix<Real>*> hp2D::Maxwell2D_H_DD::M_
private

Mass matrix.

Definition at line 220 of file Maxwell2D_H.hh.

◆ magnEnergy_

std::unique_ptr<Real> hp2D::Maxwell2D_H_Base::magnEnergy_
protectedinherited

Magnetic energy.

Definition at line 105 of file Maxwell2D_H.hh.

◆ matrixtime_

double hp2D::Maxwell2D_H_Base::matrixtime_
protectedinherited

Definition at line 107 of file Maxwell2D_H.hh.

◆ mu_

const Real hp2D::Maxwell2D_H_Base::mu_
protectedinherited

Permeability constant.

Definition at line 101 of file Maxwell2D_H.hh.

◆ omega_

Real hp2D::Maxwell2D_H_Base::omega_
protectedinherited

Angular frequency.

Definition at line 99 of file Maxwell2D_H.hh.

◆ prebuilds_

hp2D::hpFull hp2D::Maxwell2D_H_DD::prebuilds_
private

Space prebuilder.

Definition at line 214 of file Maxwell2D_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::Maxwell2D_H_Base::residual_
protectedinherited

Definition at line 89 of file Maxwell2D_H.hh.

◆ residualNorm_

std::unique_ptr<Real> hp2D::Maxwell2D_H_Base::residualNorm_
protectedinherited

Euclidian norm of the residual of solving the linear system.

Definition at line 91 of file Maxwell2D_H.hh.

◆ rhs_

std::unique_ptr<concepts::Vector<Cmplx> > hp2D::Maxwell2D_H_Base::rhs_
protectedinherited

Definition at line 93 of file Maxwell2D_H.hh.

◆ S_

concepts::Sequence<concepts::SparseMatrix<Cmplx>*> hp2D::Maxwell2D_H_DD::S_
private

Definition at line 218 of file Maxwell2D_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::Maxwell2D_H_Base::solvetime_
protectedinherited

Time to solve the system, to build the matrices, to rebuild the space.

Definition at line 107 of file Maxwell2D_H.hh.

◆ spacetime_

double hp2D::Maxwell2D_H_Base::spacetime_
protectedinherited

Definition at line 107 of file Maxwell2D_H.hh.

◆ spc_

std::unique_ptr<concepts::DomainDecomp<hp2D::hpAdaptiveSpaceH1> > hp2D::Maxwell2D_H_DD::spc_
private

Space.

Definition at line 216 of file Maxwell2D_H.hh.

◆ statusAfterIter_

bool hp2D::Maxwell2D_H_Base::statusAfterIter_
protectedinherited

Definition at line 88 of file Maxwell2D_H.hh.

◆ type_

enum solverType hp2D::Maxwell2D_H_Base::type_
protectedinherited

Solver type.

Definition at line 82 of file Maxwell2D_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