Mother abstract class to describe equation. More...

#include <Equa.h>

Inheritance diagram for Equa:
Equation< 3, 3, 2, 2 > Equation< NEN_, NEN_, NSN_, NSN_ > Equation< NEN_, NEE_, NSN_, NSE_ > FastMarching FastMarching1DG FastMarching2DG FastMarching3DG SteklovPoincare2DBE

Public Member Functions

 Equa ()
 Default constructor.
 
virtual ~Equa ()
 Destructor.
 
void setMesh (Mesh &m)
 Define mesh and renumber DOFs after removing imposed ones.
 
MeshgetMesh () const
 Return reference to Mesh instance.
 
LinearSolvergetLinearSolver ()
 Return reference to linear solver instance.
 
Matrix< real_t > * getMatrix () const
 Return pointer to matrix.
 
void setSolver (Iteration ls, Preconditioner pc=IDENT_PREC)
 Choose solver for the linear system.
 
void setMatrixType (int t)
 Choose type of matrix.
 
int solveLinearSystem (Matrix< real_t > *A, Vect< real_t > &b, Vect< real_t > &x)
 Solve the linear system with given matrix and right-hand side.
 
int solveLinearSystem (Vect< real_t > &b, Vect< real_t > &x)
 Solve the linear system with given right-hand side.
 
void LinearSystemInfo ()
 Print info on linear system solver.
 

Detailed Description

Mother abstract class to describe equation.

Author
Rachid Touzani

Member Function Documentation

◆ getMesh()

Mesh & getMesh ( ) const

Return reference to Mesh instance.

Returns
Reference to Mesh instance

◆ setMatrixType()

void setMatrixType ( int  t)

Choose type of matrix.

Parameters
[in]tType of the used matrix. To choose among the enumerated values: SKYLINE, SPARSE, DIAGONAL TRIDIAGONAL, SYMMETRIC, UNSYMMETRIC, IDENTITY

◆ setSolver()

void setSolver ( Iteration  ls,
Preconditioner  pc = IDENT_PREC 
)

Choose solver for the linear system.

Parameters
[in]lsSolver of the linear system. To choose among the enumerated values: DIRECT_SOLVER, CG_SOLVER, GMRES_SOLVER
  • DIRECT_SOLVER, Use a facorization solver [default]
  • CG_SOLVER, Conjugate Gradient iterative solver
  • CGS_SOLVER, Squared Conjugate Gradient iterative solver
  • BICG_SOLVER, BiConjugate Gradient iterative solver
  • BICG_STAB_SOLVER, BiConjugate Gradient Stabilized iterative solver
  • GMRES_SOLVER, GMRES iterative solver
  • QMR_SOLVER, QMR iterative solver
[in]pcPreconditioner to associate to the iterative solver. If the direct solver was chosen for the first argument this argument is not used. Otherwise choose among the enumerated values:
  • IDENT_PREC, Identity preconditioner (no preconditioning [default])
  • DIAG_PREC, Diagonal preconditioner
  • ILU_PREC, Incomplete LU factorization preconditioner

◆ solveLinearSystem() [1/2]

int solveLinearSystem ( Matrix< real_t > *  A,
Vect< real_t > &  b,
Vect< real_t > &  x 
)

Solve the linear system with given matrix and right-hand side.

Parameters
[in]APointer to matrix of the system
[in]bVector containing right-hand side
[in,out]xVector containing initial guess of solution on input, actual solution on output

◆ solveLinearSystem() [2/2]

int solveLinearSystem ( Vect< real_t > &  b,
Vect< real_t > &  x 
)

Solve the linear system with given right-hand side.

Parameters
[in]bVector containing right-hand side
[in,out]xVector containing initial guess of solution on input, actual solution on output