ug4
|
#include <lu.h>
Public Member Functions | |
virtual bool | apply (vector_type &u, const vector_type &f) |
Compute u = L^{-1} * f. More... | |
bool | apply_lu (vector_type &x, const vector_type &b) |
virtual bool | apply_return_defect (vector_type &u, vector_type &f) |
Compute u = L^{-1} * f AND return defect f := f - L*u. More... | |
virtual std::string | config_string () const |
returns information about configuration parameters More... | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > A) |
initializes this inverse operator for a linear operator More... | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > A, const Y &u) |
initializes this inverse operator for a linear operator More... | |
virtual bool | init (SmartPtr< MatrixOperator< M, Y, X > > A)=0 |
initializes this inverse operator for a matrix-based operator More... | |
virtual bool | init (SmartPtr< MatrixOperator< matrix_type, vector_type > > Op) |
set operator L, that will be inverted More... | |
bool | init_lu (const matrix_type *pA) |
initializes the solver for a matrix A More... | |
LU () | |
constructor More... | |
virtual const char * | name () const |
returns the name of the operator inverse More... | |
void | set_info (bool b) |
void | set_minimum_for_sparse (size_t N) |
void | set_show_progress (bool b) |
void | set_sort_sparse (bool b) |
virtual bool | supports_parallel () const |
returns if parallel solving is supported More... | |
virtual | ~LU () |
Destructor. More... | |
Public Member Functions inherited from ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type > | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > A) |
initializes this inverse operator for a linear operator More... | |
virtual bool | init (SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > A, const TAlgebra::vector_type &u) |
initializes this inverse operator for a linear operator More... | |
virtual bool | init (SmartPtr< MatrixOperator< TAlgebra::matrix_type, TAlgebra::vector_type, TAlgebra::vector_type > > A)=0 |
initializes this inverse operator for a matrix-based operator More... | |
virtual | ~IMatrixOperatorInverse () |
virtual destructor More... | |
Public Member Functions inherited from ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type > | |
virtual bool | apply_update_defect (TAlgebra::vector_type &u, TAlgebra::vector_type &f) |
virtual SmartPtr< ILinearIterator< TAlgebra::vector_type, TAlgebra::vector_type > > | clone () |
clone More... | |
SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > | convergence_check () |
returns the convergence check More... | |
ConstSmartPtr< IConvergenceCheck< TAlgebra::vector_type > > | convergence_check () const |
returns the convergence check More... | |
number | defect () const |
returns the current defect More... | |
ILinearOperatorInverse () | |
constructor setting convergence check to (100, 1e-12, 1e-12, true) More... | |
ILinearOperatorInverse (SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > spConvCheck) | |
Default constructor. More... | |
SmartPtr< ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type > > | linear_operator () |
returns the current Operator this Inverse Operator is initialized for More... | |
number | reduction () const |
returns the current relative reduction More... | |
void | set_convergence_check (SmartPtr< IConvergenceCheck< TAlgebra::vector_type > > spConvCheck) |
set the convergence check More... | |
virtual int | standard_offset () const |
returns the standard offset for output More... | |
int | step () const |
returns the current number of steps More... | |
virtual | ~ILinearOperatorInverse () |
virtual destructor More... | |
Public Member Functions inherited from ug::ILinearIterator< X, Y > | |
virtual bool | apply (Y &c, const X &d)=0 |
compute new correction c = B*d More... | |
virtual bool | apply_update_defect (Y &c, X &d)=0 |
compute new correction c = B*d and update defect d := d - A*c More... | |
SmartPtr< IDamping< X, Y > > | damping () |
returns the scaling More... | |
ILinearIterator () | |
constructor More... | |
ILinearIterator (const ILinearIterator< X, Y > &parent) | |
copy constructor More... | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > J, const Y &u)=0 |
initialize for operator J(u) and linearization point u More... | |
virtual bool | init (SmartPtr< ILinearOperator< Y, X > > L)=0 |
initialize for linear operator L More... | |
void | set_damp (number factor) |
sets the damping to a constant factor More... | |
void | set_damp (SmartPtr< IDamping< X, Y > > spScaling) |
sets a scaling for the correction More... | |
virtual | ~ILinearIterator () |
virtual destructor More... | |
Private Member Functions | |
bool | init_dense (const matrix_type &A) |
returns name of solver More... | |
bool | init_sparse (const matrix_type &A) |
void | init_var (const matrix_type &A) |
void | print_info (const matrix_type &A) |
bool | solve_dense (vector_type &x, const vector_type &b) |
bool | solve_sparse (vector_type &x, const vector_type &b) |
typedef TAlgebra ug::LU< TAlgebra >::algebra_type |
Algebra type.
typedef IMatrixOperatorInverse<matrix_type,vector_type> ug::LU< TAlgebra >::base_type |
Base type.
typedef TAlgebra::matrix_type ug::LU< TAlgebra >::matrix_type |
Matrix type.
typedef TAlgebra::vector_type ug::LU< TAlgebra >::vector_type |
Vector type.
constructor
References ug::LU< TAlgebra >::m_iMinimumForSparse.
|
inlinevirtual |
Compute u = L^{-1} * f.
Implements ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >.
References ug::LU< TAlgebra >::apply_lu(), ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type >::convergence_check(), ug::LU< TAlgebra >::m_pMatrix, PROFILE_FUNC, ug::PST_ADDITIVE, ug::PST_CONSISTENT, UG_ASSERT, and UG_LOG.
Referenced by ug::LU< TAlgebra >::apply_return_defect().
|
inline |
|
inlinevirtual |
Compute u = L^{-1} * f AND return defect f := f - L*u.
Implements ug::IMatrixOperatorInverse< TAlgebra::matrix_type, TAlgebra::vector_type >.
References ug::LU< TAlgebra >::apply(), ug::LU< TAlgebra >::m_pMatrix, PROFILE_BEGIN_GROUP, and UG_LOG.
|
inlinevirtual |
returns information about configuration parameters
this should return necessary information about parameters and possibly calling config_string of subcomponents.
Reimplemented from ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type >.
References ug::LU< TAlgebra >::m_iMinimumForSparse.
|
inline |
initializes this inverse operator for a linear operator
This method implements the ILinearOperatorInverse interface method. Basically, the request is forwarded to the matrix-based init method, if the the operator is matrix-based. If the operator is not matrix-based this inverse can not be used and false is returned
[in] | A | linear matrix-based operator to invert |
|
inline |
initializes this inverse operator for a linear operator
This method implements the ILinearOperatorInverse interface method. Basically, the request is forwarded to the matrix-based init method, if the the operator is matrix-based. If the operator is not matrix-based this inverse can not be used and false is returned
[in] | A | linear matrix-based operator to invert |
[in] | u | linearization point |
virtual bool ug::IMatrixOperatorInverse< M, X, Y >::init |
initializes this inverse operator for a matrix-based operator
This method passes the operator A that is inverted by this operator. In addition some preparation step can be made.
[in] | A | linear matrix-basewd operator to invert |
|
inlinevirtual |
set operator L, that will be inverted
References ug::LU< TAlgebra >::init_lu(), ug::LU< TAlgebra >::m_spOperator, and UG_LOG.
|
inlineprivate |
returns name of solver
References ug::GetBytesSizeString(), ug::GetDenseDoubleFromSparse(), ug::LU< TAlgebra >::m_bDense, ug::LU< TAlgebra >::m_bInfo, ug::LU< TAlgebra >::m_mat, ug::LU< TAlgebra >::m_size, ug::LU< TAlgebra >::print_info(), PROFILE_FUNC, UG_LOG, and UG_THROW.
Referenced by ug::LU< TAlgebra >::init_lu().
|
inline |
initializes the solver for a matrix A
References ug::LU< TAlgebra >::init_dense(), ug::LU< TAlgebra >::init_sparse(), ug::LU< TAlgebra >::init_var(), ug::LU< TAlgebra >::m_iMinimumForSparse, ug::LU< TAlgebra >::m_pMatrix, ug::LU< TAlgebra >::m_size, PROFILE_BEGIN_GROUP, PROFILE_FUNC, UG_ASSERT, UG_CATCH_THROW, and UG_LOG.
Referenced by ug::LU< TAlgebra >::init().
|
inlineprivate |
References ug::LU< TAlgebra >::ilut_scalar, ug::LU< TAlgebra >::m_bDense, ug::LU< TAlgebra >::m_bInfo, ug::LU< TAlgebra >::m_bShowProgress, ug::LU< TAlgebra >::m_bSortSparse, make_sp(), ug::LU< TAlgebra >::print_info(), PROFILE_FUNC, UG_CATCH_THROW, and UG_LOG.
Referenced by ug::LU< TAlgebra >::init_lu().
|
inlineprivate |
References UG_ASSERT.
Referenced by ug::LU< TAlgebra >::init_lu().
|
inlinevirtual |
returns the name of the operator inverse
This method returns the name of the inverse operator. This function is typically needed, when the inverse operator is used inside of another and some debug output should be printed
Implements ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type >.
|
inlineprivate |
References UG_LOG.
Referenced by ug::LU< TAlgebra >::init_dense(), and ug::LU< TAlgebra >::init_sparse().
|
inline |
References ug::LU< TAlgebra >::m_bInfo.
|
inline |
References ug::LU< TAlgebra >::m_iMinimumForSparse.
|
inline |
References ug::LU< TAlgebra >::m_bShowProgress.
|
inline |
References ug::LU< TAlgebra >::m_bSortSparse.
|
inlineprivate |
References ug::BlockRef(), ug::GetSize(), ug::LU< TAlgebra >::m_mat, ug::LU< TAlgebra >::m_size, ug::LU< TAlgebra >::m_tmp, PROFILE_FUNC, and UG_CATCH_THROW.
Referenced by ug::LU< TAlgebra >::apply_lu().
|
inlineprivate |
References ug::LU< TAlgebra >::ilut_scalar, and PROFILE_FUNC.
Referenced by ug::LU< TAlgebra >::apply_lu().
|
inlinevirtual |
returns if parallel solving is supported
Implements ug::ILinearOperatorInverse< TAlgebra::vector_type, TAlgebra::vector_type >.
|
protected |
Referenced by ug::LU< TAlgebra >::init_sparse(), and ug::LU< TAlgebra >::solve_sparse().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by ug::LU< TAlgebra >::init_sparse(), and ug::LU< TAlgebra >::set_show_progress().
|
protected |
Referenced by ug::LU< TAlgebra >::init_sparse(), and ug::LU< TAlgebra >::set_sort_sparse().
|
protected |
|
protected |
inverse
Referenced by ug::LU< TAlgebra >::init_dense(), and ug::LU< TAlgebra >::solve_dense().
|
protected |
matrix to invert
Referenced by ug::LU< TAlgebra >::apply(), ug::LU< TAlgebra >::apply_lu(), ug::LU< TAlgebra >::apply_return_defect(), and ug::LU< TAlgebra >::init_lu().
|
protected |
|
protected |
Operator to invert.
Referenced by ug::LU< TAlgebra >::init().
|
protected |
Referenced by ug::LU< TAlgebra >::solve_dense().
|
protected |