ug4
ug::PINVIT< TAlgebra > Class Template Reference

#include <pinvit.h>

+ Inheritance diagram for ug::PINVIT< TAlgebra >:

Public Types

typedef TAlgebra algebra_type
 
typedef DebugWritingObject< TAlgebra > base_type
 Base type. More...
 
typedef TAlgebra::matrix_type matrix_type
 
typedef TAlgebra::vector_type vector_type
 
typedef vector_type::value_type vector_value_type
 
- Public Types inherited from ug::DebugWritingObject< TAlgebra >
typedef TAlgebra algebra_type
 type of algebra More...
 
typedef TAlgebra::matrix_type matrix_type
 type of matrix More...
 
typedef TAlgebra::vector_type vector_type
 type of vector More...
 
- Public Types inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type >
typedef TAlgebra::vector_type vector_type
 type of vector More...
 

Public Member Functions

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_typecreate_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_typeget_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 ()
 
- Public Member Functions inherited from ug::DebugWritingObject< TAlgebra >
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...
 
- Public Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type >
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...
 

Public Attributes

bool m_bStoreDefects
 
bool m_bStoreLambdas
 
std::vector< std::vector< double > > m_defects
 
size_t m_iteration
 
std::vector< std::vector< double > > m_lambdas
 

Private Types

typedef IPreconditioner< TAlgebra >::matrix_operator_type matrix_operator_type
 

Private Member Functions

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)
 

Private Attributes

std::vector< double > freq_change
 
std::vector< double > lambda
 
size_t m_additionalEigenvectorsToKeep
 
bool m_bAbortOnFreqConverged_linear_elasticity
 
bool m_bDebugCalcProjectedEigenvalues
 
bool m_bLaplacian
 
bool m_bPrintEigenvaluesAndDefect
 
bool m_bPrintFrequencies_linear_elasticity
 
bool m_bPrintProjectedEigenproblem
 
bool m_bPrintProjectedEigenvalues
 
bool m_bPrintProjectedEigenvectors
 
bool m_bPrintUsedTestvectors
 
bool m_bRelativePrecision
 
bool m_bUseAdditionalCorrections
 
size_t m_currentAdditionalCorrections
 
size_t m_currentAdditionalEigenvectors
 
double m_dDensity_linear_elasticity
 
double m_dFreqPrecision
 
double m_dMinimumDefectToCalcCorrection
 
double m_dPrecision
 
size_t m_iPINVIT
 
double m_linearDependentEps
 
size_t m_maxIterations
 
SmartPtr< ILinearOperator< vector_type > > m_pA
 
matrix_operator_typem_pB
 
SmartPtr< ILinearIterator< vector_type > > m_spPrecond
 
SmartPtrVector< vector_typepx
 
std::vector< bool > vbDirichlet
 

Additional Inherited Members

- Protected Member Functions inherited from ug::DebugWritingObject< TAlgebra >
void enter_debug_writer_section (const char *secDir)
 enters a debugging section More...
 
void enter_debug_writer_section (std::string secDir)
 enters a debugging section More...
 
void leave_debug_writer_section ()
 leaves a debugging section 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...
 
- Protected Member Functions inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type >
void enter_vector_debug_writer_section (const char *secDir)
 enters a debugging section More...
 
void enter_vector_debug_writer_section (std::string secDir)
 enters a debugging section More...
 
void leave_vector_debug_writer_section ()
 leaves a debugging section More...
 
void print_debugger_message (const char *msg)
 prints a debugger message (listing all the sections) More...
 
void print_debugger_message (std::string msg)
 prints a debugger message (listing all the sections) More...
 
virtual void write_debug (const vector_type &vec, std::string name)
 writing debug output for a vector (if debug writer set) More...
 
- Protected Attributes inherited from ug::DebugWritingObject< TAlgebra >
SmartPtr< IDebugWriter< algebra_type > > m_spDebugWriter
 Debug Writer. More...
 
- Protected Attributes inherited from ug::VectorDebugWritingObject< TAlgebra::vector_type >
SmartPtr< IVectorDebugWriter< vector_type > > m_spVectorDebugWriter
 Debug Writer. More...
 

Detailed Description

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;
eig:set_precision(evPrec)
eig:set_pinvit(2)
eig:set_debug(dbgWriter)
ev = {}
for i=1,nev do
print("adding ev "..i)
ev[i] = GridFunction(approxSpace)
ev[i]:set_random(-1.0, 1.0)
domainDisc:adjust_solution(ev[i])
eig:add_vector(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)

Member Typedef Documentation

◆ algebra_type

template<typename TAlgebra >
typedef TAlgebra ug::PINVIT< TAlgebra >::algebra_type

◆ base_type

template<typename TAlgebra >
typedef DebugWritingObject<TAlgebra> ug::PINVIT< TAlgebra >::base_type

Base type.

◆ matrix_operator_type

template<typename TAlgebra >
typedef IPreconditioner<TAlgebra>::matrix_operator_type ug::PINVIT< TAlgebra >::matrix_operator_type
private

◆ matrix_type

template<typename TAlgebra >
typedef TAlgebra::matrix_type ug::PINVIT< TAlgebra >::matrix_type

◆ vector_type

template<typename TAlgebra >
typedef TAlgebra::vector_type ug::PINVIT< TAlgebra >::vector_type

◆ vector_value_type

template<typename TAlgebra >
typedef vector_type::value_type ug::PINVIT< TAlgebra >::vector_value_type

Constructor & Destructor Documentation

◆ PINVIT()

Member Function Documentation

◆ add_vector()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::add_vector ( SmartPtr< vector_type vec)
inline

adds a vector which should be used for eigenvalue computation

Parameters
vec

References ug::PINVIT< TAlgebra >::px.

◆ apply()

template<typename TAlgebra >
int ug::PINVIT< TAlgebra >::apply ( )
inline

perform the calculation

Returns

◆ assert_real_positive()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::assert_real_positive ( const std::vector< std::complex< double > > &  r_lambda)
inline

◆ B_norm()

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::B_norm ( vector_type x)
inlineprivate

◆ calculate_correction()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::calculate_correction ( vector_type corr,
vector_type defect 
)
inlineprivate

◆ compute_rayleigh_and_defect()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::compute_rayleigh_and_defect ( vector_type x,
double &  lambda,
vector_type defect,
double &  defectNorm 
)
inlineprivate

For a given eigenvalue approximation, computes the rayleigh quotient, the defect, the norm of the defect, and the correction calculated by the preconditioner

Parameters
[in]xcurrent normalized eigenvalue approximation (<x,x> = 1)
[out]lambdalambda = <x, Ax> / <x, Bx>
[out]defectdefect = lambda x - Ax
[out]vDefectNormvDefectNorm = | defect |_2
[out]vCorrP defect

◆ config_string()

◆ create_approximation_vector()

template<typename TAlgebra >
SmartPtr<vector_type> ug::PINVIT< TAlgebra >::create_approximation_vector ( )
inline

◆ debug_calc_projected_eigenvalues()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::debug_calc_projected_eigenvalues ( DenseMatrix< VariableArray2< double > > &  r_ev,
SmartPtrVector< vector_type > &  pTestVectors,
int  iteration,
bool  bWrite 
)
inline

debug_calc_projected_eigenvalues

Parameters
r_ev
pTestVectors
iteration
bWrite

◆ debug_writer() [1/2]

template<typename TAlgebra >
SmartPtr<IDebugWriter<algebra_type> > ug::DebugWritingObject< TAlgebra >::debug_writer
inlineprivate

returns the debug writer

◆ debug_writer() [2/2]

template<typename TAlgebra >
ConstSmartPtr<IDebugWriter<algebra_type> > ug::DebugWritingObject< TAlgebra >::debug_writer
inlineprivate

◆ get_defect()

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::get_defect ( size_t  nev,
size_t  it 
)
inline

◆ get_eigenvalue()

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::get_eigenvalue ( size_t  i)
inline

◆ get_eigenvector()

template<typename TAlgebra >
SmartPtr<vector_type> ug::PINVIT< TAlgebra >::get_eigenvector ( size_t  i)
inline

◆ get_iterations()

template<typename TAlgebra >
size_t ug::PINVIT< TAlgebra >::get_iterations ( )
inline

◆ get_lambda()

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::get_lambda ( size_t  nev,
size_t  it 
)
inline

◆ get_linear_independent_rows()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::get_linear_independent_rows ( DenseMatrix< VariableArray2< double > >  mat,
std::vector< bool > &  bLinearIndependent 
)
inlineprivate

Calculates a maximal set of rows which are linear independent

Parameters
[in]matthe input matrix
[out]bLinearIndependentoutput vector (true if linear independent)

◆ get_max_deflection_of_a_mode()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::get_max_deflection_of_a_mode ( vector_type maxDeflect,
vector_type statSol,
const vector_type eigenVec,
const matrix_type massMat 
)
inline

◆ get_projected_eigenvalue_problem()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::get_projected_eigenvalue_problem ( DenseMatrix< VariableArray2< double > > &  rA,
DenseMatrix< VariableArray2< double > > &  rB,
SmartPtrVector< vector_type > &  pTestVectors,
std::vector< std::string > &  vTestVectorDescription 
)
inlineprivate

Calculate projected eigenvalue problem on space spanned by testvectors in pTestVectors

  1. calculate W as a subset of the testvectors so that those are linear B-independent
  2. rA = W^T A W
  3. rB = W^T B W
    Parameters
    [out]rAreduced eigenvalue problem matrix A
    [out]rBreduced eigenvalue problem matrix B
    [in,out]pTestVectorsthe testvectors, out: the used testvectors
    [in,out]vTestVectorDescriptiontheir description

◆ get_testvectors()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::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 
)
inlineprivate

depending on the PINVIT-method, this function calculates the used testvectors

  • for PINVIT(1), projected space is L^k = span_i < c^k_i - x^{k}_i>, that is (current eigenvalue - correction)
  • PINVIT(s) for s>=2: L^k = span_i < x^{k-s+2}_i , .. x^{k}_i, c^k_i> that is the space spanned by the current eigenvalue, its correction, and the s-2 previous eigenvalue approximations

    if an eigenvalue is converged, we don't calculate a correction for this and previous approximations will be not too much different, so we also won't add previous approximations

    Parameters
    [in]iterationiteration number
    [in]vCorrcorrection for eigenvector approximation
    [in]vOldXprevious eigenvector approximations
    [out]pTestVectorsvector in which we store the used test vectors for the projected eigenvalue problem
    [out]vTestVectorDescriptiondescription of the vectors (ev, corr or oldEv)
    [in]vDefectNormnorm of the defects

◆ init_nonprecond_vector()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::init_nonprecond_vector ( vector_type t)
inline

◆ normalize_approximations()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::normalize_approximations ( )
inlineprivate

◆ num_eigenvalues()

template<typename TAlgebra >
size_t ug::PINVIT< TAlgebra >::num_eigenvalues ( )
inline

◆ print_eigenvalues_and_defect()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::print_eigenvalues_and_defect ( int  iteration,
const std::vector< double > &  vDefectNorm,
std::vector< double > &  vOldDefectNorm,
const std::vector< double > &  vLambda,
std::vector< bool > &  bConverged 
)
inlineprivate

prints the current eigenvalues and convergence status

Parameters
[in]iterationiteration number
[in]vDefectNormvector of defect norms
[in,out]vOldDefectNormvector of defect norms from previous iteration
[in]vLambdavector of eigenvalue approximations

◆ print_projected_eigenvectors()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::print_projected_eigenvectors ( DenseMatrix< VariableArray2< double > > &  r_ev,
std::vector< std::complex< double > > &  r_lambda,
std::vector< std::string > &  vTestVectorDescription 
)
inline

◆ print_used_testvectors()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::print_used_testvectors ( std::vector< std::string > &  vTestVectorDescription,
std::vector< bool >  bUse 
)
inlineprivate

◆ remove_unused()

template<typename TAlgebra >
template<typename T >
void ug::PINVIT< TAlgebra >::remove_unused ( T &  v,
const std::vector< bool >  vbUse 
)
inlineprivate

remove all entries with vbUse[i]==false from vector i

Parameters
[in,out]vvector to contain result
[in]vbUseif vbUse[i] is true, add it to new vector

◆ set_abort_on_frequencies_converged_linear_elasticity()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_abort_on_frequencies_converged_linear_elasticity ( double  freq_precision,
double  density 
)
inline

◆ set_additional_eigenvectors_to_keep()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_additional_eigenvectors_to_keep ( size_t  i)
inline

◆ set_debug()

template<typename TAlgebra >
virtual void ug::DebugWritingObject< TAlgebra >::set_debug
inlineprivate

set debug writer

◆ set_debug_calc_projected_eigenvalues()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_debug_calc_projected_eigenvalues ( bool  b)
inline

◆ set_laplacian()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_laplacian ( bool  b)
inline

◆ set_linear_dependent_eps()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_linear_dependent_eps ( double  eps)
inline

◆ set_linear_operator_A()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_linear_operator_A ( SmartPtr< ILinearOperator< vector_type > >  loA)
inline

◆ set_linear_operator_B()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_linear_operator_B ( matrix_operator_type B)
inline

◆ set_max_iterations()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_max_iterations ( size_t  maxIterations)
inline

◆ set_new_approximations_and_save_old()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_new_approximations_and_save_old ( DenseMatrix< VariableArray2< double > > &  r_ev,
SmartPtrVector< vector_type > &  pTestVectors,
SmartPtrVector< vector_type > &  vOldX,
SmartPtrVector< vector_type > &  vAdditional 
)
inline

◆ set_pinvit()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_pinvit ( size_t  iPINVIT)
inline

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.

Parameters
iPINVIT

References ug::PINVIT< TAlgebra >::m_iPINVIT, and UG_ASSERT.

◆ set_precision()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_precision ( double  precision)
inline

◆ set_preconditioner()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_preconditioner ( SmartPtr< ILinearIterator< vector_type > >  precond)
inline

set the preconditioner (or Linear Iterator) e.g. Gauss-Seidel, AMG/GMG, Jacobi, ILU, ...

Parameters
precond

References ug::PINVIT< TAlgebra >::m_spPrecond.

◆ set_print_eigenvalues_and_defect()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_print_eigenvalues_and_defect ( bool  b)
inline

◆ set_print_projected_eigenproblem()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_print_projected_eigenproblem ( bool  b)
inline

◆ set_print_projected_eigenvalues()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_print_projected_eigenvalues ( bool  b)
inline

◆ set_print_projected_eigenvectors()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_print_projected_eigenvectors ( bool  b)
inline

◆ set_print_used_testvectors()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_print_used_testvectors ( bool  b)
inline

◆ set_relative_precision()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_relative_precision ( double  precision)
inline

◆ set_store_defects()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_store_defects ( bool  b)
inline

◆ set_store_lambdas()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_store_lambdas ( bool  b)
inline

◆ set_use_additional_corrections()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::set_use_additional_corrections ( bool  b)
inline

◆ tostring()

template<typename TAlgebra >
std::string ug::PINVIT< TAlgebra >::tostring ( )
inline

◆ write_debug() [1/3]

template<typename TAlgebra >
void ug::DebugWritingObject< TAlgebra >::write_debug
inlineprivate

write debug output for a matrix (if debug writer set)

◆ write_debug() [2/3]

template<typename TAlgebra >
void ug::DebugWritingObject< TAlgebra >::write_debug
inlineprivate

write debug output for a matrix (if debug writer set)

◆ write_debug() [3/3]

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::write_debug ( int  iteration,
int  i,
vector_type x,
vector_type defect,
vector_type corr,
bool  bConverged 
)
inlineprivate

◆ write_debug_old()

template<typename TAlgebra >
void ug::PINVIT< TAlgebra >::write_debug_old ( int  iteration,
int  i,
vector_type oldX 
)
inlineprivate

Member Data Documentation

◆ freq_change

template<typename TAlgebra >
std::vector<double> ug::PINVIT< TAlgebra >::freq_change
private

◆ lambda

template<typename TAlgebra >
std::vector<double> ug::PINVIT< TAlgebra >::lambda
private

◆ m_additionalEigenvectorsToKeep

template<typename TAlgebra >
size_t ug::PINVIT< TAlgebra >::m_additionalEigenvectorsToKeep
private

◆ m_bAbortOnFreqConverged_linear_elasticity

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bAbortOnFreqConverged_linear_elasticity
private

◆ m_bDebugCalcProjectedEigenvalues

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bDebugCalcProjectedEigenvalues
private

◆ m_bLaplacian

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bLaplacian
private

◆ m_bPrintEigenvaluesAndDefect

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bPrintEigenvaluesAndDefect
private

◆ m_bPrintFrequencies_linear_elasticity

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bPrintFrequencies_linear_elasticity
private

◆ m_bPrintProjectedEigenproblem

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bPrintProjectedEigenproblem
private

◆ m_bPrintProjectedEigenvalues

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bPrintProjectedEigenvalues
private

◆ m_bPrintProjectedEigenvectors

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bPrintProjectedEigenvectors
private

◆ m_bPrintUsedTestvectors

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bPrintUsedTestvectors
private

◆ m_bRelativePrecision

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bRelativePrecision
private

◆ m_bStoreDefects

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bStoreDefects

◆ m_bStoreLambdas

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bStoreLambdas

◆ m_bUseAdditionalCorrections

template<typename TAlgebra >
bool ug::PINVIT< TAlgebra >::m_bUseAdditionalCorrections
private

◆ m_currentAdditionalCorrections

template<typename TAlgebra >
size_t ug::PINVIT< TAlgebra >::m_currentAdditionalCorrections
private

◆ m_currentAdditionalEigenvectors

template<typename TAlgebra >
size_t ug::PINVIT< TAlgebra >::m_currentAdditionalEigenvectors
private

◆ m_dDensity_linear_elasticity

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::m_dDensity_linear_elasticity
private

◆ m_defects

template<typename TAlgebra >
std::vector<std::vector<double> > ug::PINVIT< TAlgebra >::m_defects

◆ m_dFreqPrecision

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::m_dFreqPrecision
private

◆ m_dMinimumDefectToCalcCorrection

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::m_dMinimumDefectToCalcCorrection
private

◆ m_dPrecision

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::m_dPrecision
private

◆ m_iPINVIT

template<typename TAlgebra >
size_t ug::PINVIT< TAlgebra >::m_iPINVIT
private

◆ m_iteration

template<typename TAlgebra >
size_t ug::PINVIT< TAlgebra >::m_iteration

◆ m_lambdas

template<typename TAlgebra >
std::vector<std::vector<double> > ug::PINVIT< TAlgebra >::m_lambdas

◆ m_linearDependentEps

template<typename TAlgebra >
double ug::PINVIT< TAlgebra >::m_linearDependentEps
private

◆ m_maxIterations

template<typename TAlgebra >
size_t ug::PINVIT< TAlgebra >::m_maxIterations
private

◆ m_pA

template<typename TAlgebra >
SmartPtr<ILinearOperator<vector_type> > ug::PINVIT< TAlgebra >::m_pA
private

◆ m_pB

template<typename TAlgebra >
matrix_operator_type* ug::PINVIT< TAlgebra >::m_pB
private

◆ m_spPrecond

template<typename TAlgebra >
SmartPtr<ILinearIterator<vector_type> > ug::PINVIT< TAlgebra >::m_spPrecond
private

◆ px

template<typename TAlgebra >
SmartPtrVector<vector_type> ug::PINVIT< TAlgebra >::px
private

◆ vbDirichlet

template<typename TAlgebra >
std::vector<bool> ug::PINVIT< TAlgebra >::vbDirichlet
private

The documentation for this class was generated from the following file: