|
void | add_vector (SmartPtr< vector_type > vec) |
|
int | apply () |
|
void | assert_real_positive (const std::vector< std::complex< double > > &r_lambda) |
|
virtual std::string | config_string () const |
|
SmartPtr< vector_type > | create_approximation_vector () |
|
void | debug_calc_projected_eigenvalues (DenseMatrix< VariableArray2< double > > &r_ev, SmartPtrVector< vector_type > &pTestVectors, int iteration, bool bWrite) |
|
double | get_defect (size_t nev, size_t it) |
|
double | get_eigenvalue (size_t i) |
|
SmartPtr< vector_type > | get_eigenvector (size_t i) |
|
size_t | get_iterations () |
|
double | get_lambda (size_t nev, size_t it) |
|
void | get_max_deflection_of_a_mode (vector_type &maxDeflect, vector_type &statSol, const vector_type &eigenVec, const matrix_type &massMat) |
|
void | init_nonprecond_vector (vector_type &t) |
|
size_t | num_eigenvalues () |
|
| PINVIT () |
|
void | print_projected_eigenvectors (DenseMatrix< VariableArray2< double > > &r_ev, std::vector< std::complex< double > > &r_lambda, std::vector< std::string > &vTestVectorDescription) |
|
void | set_abort_on_frequencies_converged_linear_elasticity (double freq_precision, double density) |
|
void | set_additional_eigenvectors_to_keep (size_t i) |
|
void | set_debug_calc_projected_eigenvalues (bool b) |
|
void | set_laplacian (bool b) |
|
void | set_linear_dependent_eps (double eps) |
|
void | set_linear_operator_A (SmartPtr< ILinearOperator< vector_type > > loA) |
|
void | set_linear_operator_B (matrix_operator_type &B) |
|
void | set_max_iterations (size_t maxIterations) |
|
void | set_new_approximations_and_save_old (DenseMatrix< VariableArray2< double > > &r_ev, SmartPtrVector< vector_type > &pTestVectors, SmartPtrVector< vector_type > &vOldX, SmartPtrVector< vector_type > &vAdditional) |
|
void | set_pinvit (size_t iPINVIT) |
|
void | set_precision (double precision) |
|
void | set_preconditioner (SmartPtr< ILinearIterator< vector_type > > precond) |
|
void | set_print_eigenvalues_and_defect (bool b) |
|
void | set_print_projected_eigenproblem (bool b) |
|
void | set_print_projected_eigenvalues (bool b) |
|
void | set_print_projected_eigenvectors (bool b) |
|
void | set_print_used_testvectors (bool b) |
|
void | set_relative_precision (double precision) |
|
void | set_store_defects (bool b) |
|
void | set_store_lambdas (bool b) |
|
void | set_use_additional_corrections (bool b) |
|
std::string | tostring () |
|
SmartPtr< IDebugWriter< algebra_type > > | debug_writer () |
| returns the debug writer More...
|
|
ConstSmartPtr< IDebugWriter< algebra_type > > | debug_writer () const |
|
bool | debug_writer_valid () const |
| returns true if the debug writer is set More...
|
|
| DebugWritingObject () |
|
| DebugWritingObject (const DebugWritingObject< algebra_type > &parent) |
| clone constructor More...
|
|
| DebugWritingObject (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) |
|
virtual void | set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) |
| set debug writer More...
|
|
virtual | ~DebugWritingObject () |
| virtual destructor More...
|
|
virtual void | set_debug (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter) |
| set debug writer More...
|
|
SmartPtr< IVectorDebugWriter< vector_type > > | vector_debug_writer () |
| returns the debug writer More...
|
|
ConstSmartPtr< IVectorDebugWriter< vector_type > > | vector_debug_writer () const |
|
bool | vector_debug_writer_valid () const |
| returns true if the debug writer is set More...
|
|
| VectorDebugWritingObject () |
|
| VectorDebugWritingObject (SmartPtr< IVectorDebugWriter< vector_type > > spDebugWriter) |
|
void | write_debug (const vector_type &vec, const char *filename) |
| writing debug output for a vector (if debug writer set) More...
|
|
virtual | ~VectorDebugWritingObject () |
| virtual destructor More...
|
|
|
double | B_norm (vector_type &x) |
|
void | calculate_correction (vector_type &corr, vector_type &defect) |
|
void | compute_rayleigh_and_defect (vector_type &x, double &lambda, vector_type &defect, double &defectNorm) |
|
SmartPtr< IDebugWriter< algebra_type > > | debug_writer () |
| returns the debug writer More...
|
|
ConstSmartPtr< IDebugWriter< algebra_type > > | debug_writer () const |
|
void | get_linear_independent_rows (DenseMatrix< VariableArray2< double > > mat, std::vector< bool > &bLinearIndependent) |
|
void | get_projected_eigenvalue_problem (DenseMatrix< VariableArray2< double > > &rA, DenseMatrix< VariableArray2< double > > &rB, SmartPtrVector< vector_type > &pTestVectors, std::vector< std::string > &vTestVectorDescription) |
|
void | get_testvectors (int iteration, SmartPtrVector< vector_type > &vCorr, std::vector< std::string > &vCorrectionName, size_t numCorrections, SmartPtrVector< vector_type > &vOldX, SmartPtrVector< vector_type > &vAdditional, SmartPtrVector< vector_type > &pTestVectors, std::vector< std::string > &vTestVectorDescription, std::vector< bool > &bConverged) |
|
void | normalize_approximations () |
|
void | print_eigenvalues_and_defect (int iteration, const std::vector< double > &vDefectNorm, std::vector< double > &vOldDefectNorm, const std::vector< double > &vLambda, std::vector< bool > &bConverged) |
|
void | print_used_testvectors (std::vector< std::string > &vTestVectorDescription, std::vector< bool > bUse) |
|
template<typename T > |
void | remove_unused (T &v, const std::vector< bool > vbUse) |
|
virtual void | set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter) |
| set debug writer More...
|
|
void | write_debug (const matrix_type &mat, const char *filename) |
| write debug output for a matrix (if debug writer set) More...
|
|
void | write_debug (const matrix_type &mat, std::string name) |
| write debug output for a matrix (if debug writer set) More...
|
|
void | write_debug (int iteration, int i, vector_type &x, vector_type &defect, vector_type &corr, bool bConverged) |
|
void | write_debug_old (int iteration, int i, vector_type &oldX) |
|
template<typename TAlgebra>
class ug::PINVIT< TAlgebra >
PINVIT Eigensolver
This Eigensolver solves problems of the form Ax = lambda B x For sparse matrices A and B, and we want to find the smallest (in terms of abs(lambda) ) e.g. 1-100 solutions (eigenvalues) of the problem. For this we need a preconditioner, calculating c = Pd (e.g. Jacobi, Gauss-Seidel, Geometric/Algebraic Multigrid, ILU).
This implements the PINVIT(s) methods, with s=2 = LOBPCG see Martin Rupp - Berechnung der Resonanzschwingungen einer Gitarrendecke (Diploma thesis) and Andrew Knyazew, Toward the optimal Preconditioned Eigensolver: Locally Optimal Block Preconditioned Conjugate Gradient Method. http://epubs.siam.org/doi/pdf/10.1137/S1064827500366124
iPINVIT=1 -> Preconditioned Inverse Block Iteration [Neymeyr] iPINVIT=2 -> Preconditioned Block Gradient Method iPINVIT=3 -> LOBPCG (locally optimal block preconditioned gradient) [Knyazew] iPINVIT>=4 -> gerneralized methods.
example:
EigenSolver eig;
ev = {}
for i=1,nev do
ev[i] = GridFunction(approxSpace)
ev[i]:set_random(-1.0, 1.0)
domainDisc:adjust_solution(ev[i])
end
virtual void set_debug(SmartPtr< IDebugWriter< algebra_type > > spDebugWriter)
set debug writer
Definition: debug_writer.h:384
void set_linear_operator_B(matrix_operator_type &B)
Definition: pinvit.h:301
void add_vector(SmartPtr< vector_type > vec)
Definition: pinvit.h:246
void set_preconditioner(SmartPtr< ILinearIterator< vector_type > > precond)
Definition: pinvit.h:256
void set_precision(double precision)
Definition: pinvit.h:311
void set_pinvit(size_t iPINVIT)
Definition: pinvit.h:340
void set_max_iterations(size_t maxIterations)
Definition: pinvit.h:306
void set_linear_operator_A(SmartPtr< ILinearOperator< vector_type > > loA)
Definition: pinvit.h:261
function table print(data, style)
If you want to use a solver as preconditioner, use precond = OperatorInverseIterator(linSolver)