Plugins
ug::LimexNewtonSolver< TAlgebra > Class Template Reference

Newton solver for assembling-based discretizations solved using Limex. More...

#include <newton_limex.h>

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

Public Types

typedef TAlgebra algebra_type
 algebra type More...
 
typedef TAlgebra::matrix_type matrix_type
 matrix type More...
 
typedef TAlgebra::vector_type vector_type
 vector type More...
 
- Public Types inherited from ug::IOperatorInverse< class, class >
typedef Y codomain_function_type
 
typedef X domain_function_type
 

Public Member Functions

virtual bool apply (vector_type &u)
 apply operator, i.e. N^{-1}(0) = u More...
 
virtual std::string config_string () const
 Returns information about configuration parameters. This should return necessary information about parameters and possibly calling config_string of subcomponents. More...
 
virtual bool init (SmartPtr< IOperator< vector_type > > N)
 This operator inverts the operator N: Y -> X. More...
 
 LimexNewtonSolver ()
 default constructor More...
 
 LimexNewtonSolver (SmartPtr< IAssemble< TAlgebra > > spAss)
 constructor using assembling More...
 
 LimexNewtonSolver (SmartPtr< IOperator< vector_type > > N)
 constructor setting operator More...
 
number linear_solver_rate () const
 prints average linear solver convergence More...
 
int linear_solver_steps () const
 information on linear solver convergence More...
 
virtual bool prepare (vector_type &u)
 prepare operator More...
 
void set_linear_solver (SmartPtr< ILinearOperatorInverse< vector_type > > LinearSolver)
 sets the linear solver More...
 
- Public Member Functions inherited from ug::IOperatorInverse< class, class >
virtual bool apply (X &u)=0
 
virtual bool init (SmartPtr< IOperator< Y, X > > N)=0
 
virtual bool prepare (X &u)=0
 
virtual ~IOperatorInverse ()
 

Private Member Functions

void write_debug (const vector_type &vec, const char *filename)
 
void write_debug (const matrix_type &mat, const char *filename)
 

Private Attributes

SmartPtr< AssembledLinearOperator< algebra_type > > m_J
 jacobi operator More...
 
SmartPtr< AssembledOperator< algebra_type > > m_N
 assembling routine More...
 
SmartPtr< IAssemble< TAlgebra > > m_spAss
 assembling More...
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spLinearSolver
 linear solver More...
 
size_t m_linSolverSteps
 
number m_linSolverRate
 

Detailed Description

template<typename TAlgebra>
class ug::LimexNewtonSolver< TAlgebra >

Newton solver for assembling-based discretizations solved using Limex.

Member Typedef Documentation

◆ algebra_type

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

algebra type

◆ matrix_type

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

matrix type

◆ vector_type

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

vector type

Constructor & Destructor Documentation

◆ LimexNewtonSolver() [1/3]

template<typename TAlgebra >
ug::LimexNewtonSolver< TAlgebra >::LimexNewtonSolver

default constructor

◆ LimexNewtonSolver() [2/3]

template<typename TAlgebra >
ug::LimexNewtonSolver< TAlgebra >::LimexNewtonSolver ( SmartPtr< IOperator< vector_type > >  N)

constructor setting operator

References ug::LimexNewtonSolver< TAlgebra >::init().

◆ LimexNewtonSolver() [3/3]

template<typename TAlgebra >
ug::LimexNewtonSolver< TAlgebra >::LimexNewtonSolver ( SmartPtr< IAssemble< TAlgebra > >  spAss)

constructor using assembling

Member Function Documentation

◆ apply()

template<typename TAlgebra >
bool ug::LimexNewtonSolver< TAlgebra >::apply ( vector_type u)
virtual

◆ config_string()

template<typename TAlgebra >
std::string ug::LimexNewtonSolver< TAlgebra >::config_string
virtual

Returns information about configuration parameters. This should return necessary information about parameters and possibly calling config_string of subcomponents.

Returns
std::string necessary information about configuration parameters

Implements ug::IOperatorInverse< class, class >.

References ug::ConfigShift().

◆ init()

template<typename TAlgebra >
bool ug::LimexNewtonSolver< TAlgebra >::init ( SmartPtr< IOperator< vector_type > >  N)
virtual

This operator inverts the operator N: Y -> X.

References NEWTON_PROFILE_BEGIN, and UG_THROW.

Referenced by ug::LimexNewtonSolver< TAlgebra >::LimexNewtonSolver().

◆ linear_solver_rate()

template<typename TAlgebra >
number ug::LimexNewtonSolver< TAlgebra >::linear_solver_rate

prints average linear solver convergence

◆ linear_solver_steps()

template<typename TAlgebra >
int ug::LimexNewtonSolver< TAlgebra >::linear_solver_steps

information on linear solver convergence

◆ prepare()

template<typename TAlgebra >
bool ug::LimexNewtonSolver< TAlgebra >::prepare ( vector_type u)
virtual

prepare operator

◆ set_linear_solver()

template<typename TAlgebra >
void ug::LimexNewtonSolver< TAlgebra >::set_linear_solver ( SmartPtr< ILinearOperatorInverse< vector_type > >  LinearSolver)
inline

sets the linear solver

References ug::LimexNewtonSolver< TAlgebra >::m_spLinearSolver.

◆ write_debug() [1/2]

template<typename TAlgebra >
void ug::LimexNewtonSolver< TAlgebra >::write_debug ( const matrix_type mat,
const char *  filename 
)
private

help functions for debug output

◆ write_debug() [2/2]

template<typename TAlgebra >
void ug::LimexNewtonSolver< TAlgebra >::write_debug ( const vector_type vec,
const char *  filename 
)
private

help functions for debug output

Member Data Documentation

◆ m_J

template<typename TAlgebra >
SmartPtr<AssembledLinearOperator<algebra_type> > ug::LimexNewtonSolver< TAlgebra >::m_J
private

jacobi operator

◆ m_linSolverRate

template<typename TAlgebra >
number ug::LimexNewtonSolver< TAlgebra >::m_linSolverRate
private

convergence history of linear solver

◆ m_linSolverSteps

template<typename TAlgebra >
size_t ug::LimexNewtonSolver< TAlgebra >::m_linSolverSteps
private

convergence history of linear solver

◆ m_N

template<typename TAlgebra >
SmartPtr<AssembledOperator<algebra_type> > ug::LimexNewtonSolver< TAlgebra >::m_N
private

assembling routine

◆ m_spAss

template<typename TAlgebra >
SmartPtr<IAssemble<TAlgebra> > ug::LimexNewtonSolver< TAlgebra >::m_spAss
private

assembling

◆ m_spLinearSolver

template<typename TAlgebra >
SmartPtr<ILinearOperatorInverse<vector_type> > ug::LimexNewtonSolver< TAlgebra >::m_spLinearSolver
private

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