AbsEqua< T_ > Class Template Reference
Mother abstract class to describe equation. More...


Public Member Functions | |
AbsEqua () | |
Default constructor. | |
AbsEqua (class Mesh &mesh) | |
Constructor with mesh instance. | |
virtual | ~AbsEqua () |
Destructor. | |
void | setMesh (class Mesh &m) |
Define mesh and renumber DOFs after removing imposed ones. | |
Mesh & | getMesh () const |
Return reference to Mesh instance. More... | |
LinearSolver< T_ > & | getLinearSolver () |
Return reference to linear solver instance. | |
void | setSolver (int ls, int pc=IDENT_PREC) |
Choose solver for the linear system. More... | |
int | solveEigenProblem (int nb_eigv, bool g=false) |
Compute eigenvalues and eigenvectors. More... | |
real_t | getEigenValue (int n) const |
Return the n-th eigenvalue. More... | |
void | getEigenVector (int n, Vect< real_t > &v) const |
Store the eigenvector corresponding to a given eigenvalue. More... | |
class Eigen & | getEigenSolver () |
Return reference to eigenproblem solver. | |
Detailed Description
template<class T_>
class OFELI::AbsEqua< T_ >
Mother abstract class to describe equation.
- Template Parameters
-
<T_> Data type (real_t, float, complex<real_t>, ...)
Member Function Documentation
void setSolver | ( | int | ls, |
int | pc = IDENT_PREC |
||
) |
Choose solver for the linear system.
- Parameters
-
[in] ls Solver 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] pc Preconditioner 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
-
int solveEigenProblem | ( | int | nb_eigv, |
bool | g = false |
||
) |
Compute eigenvalues and eigenvectors.
Eigenvalues and vectors are computed using the Bathe's subspace iteration method.
- Parameters
-
[in] nb_eigv Number of eigenvalues to compute [in] g Option to choose whether to solve a generalized eigenvalue problem (true) or a standard one (false). The generalized eigenvalue problem corresponds to the case where a consistent mass matrix (rather than a lumped one) is computed. Default value is false.
real_t getEigenValue | ( | int | n | ) | const |
Return the n-th eigenvalue.
This functions works only if the member function getEigen was called with an argument nb_eigv
greater or equal to n
. Otherwise it returns 0
.