33 #ifndef __H__UG__LIB_DISC__OPERATOR__NON_LINEAR_OPERATOR__NEWTON_SOLVER__NEWTON__
34 #define __H__UG__LIB_DISC__OPERATOR__NON_LINEAR_OPERATOR__NEWTON_SOLVER__NEWTON__
46 #include "../line_search.h"
53 template <
typename TAlgebra>
Definition: smart_pointer.h:108
Definition: debug_writer.h:354
Interface providing Jacobian and Defect of a discretization.
Definition: assemble_interface.h:110
Definition: convergence_check.h:72
Definition: line_search.h:60
describes an inverse linear mapping X->Y
Definition: linear_operator_inverse.h:80
describes a mapping X->Y
Definition: operator.h:86
describes an inverse mapping X->Y
Definition: operator_inverse.h:79
linear solver using abstract preconditioner interface
Definition: linear_solver.h:57
Newton solver for assembling based discretizations.
Definition: newton.h:57
std::vector< SmartPtr< INewtonUpdate > > m_innerStepUpdate
Update.
Definition: newton.h:169
int total_linsolver_calls() const
Definition: newton_impl.h:382
void add_step_update(SmartPtr< INewtonUpdate > NU)
add outer step update (applied before every Newton step)
Definition: newton.h:140
std::vector< SmartPtr< INewtonUpdate > > m_stepUpdate
Definition: newton.h:170
void clear_average_convergence()
resets average linear solver convergence
Definition: newton_impl.h:407
void clear_inner_step_update(SmartPtr< INewtonUpdate > NU)
clears inner step update
Definition: newton.h:136
virtual bool prepare(vector_type &u)
prepare Operator
Definition: newton_impl.h:142
SmartPtr< IConvergenceCheck< vector_type > > m_spConvCheck
Convergence Check.
Definition: newton.h:163
SmartPtr< ILineSearch< vector_type > > line_search()
Definition: newton.h:92
void disable_line_search()
Definition: newton.h:91
void set_reassemble_J_freq(int freq)
sets the frequency of reassembling of the Jacobian (0 == 1 == in every step, i.e. classically)
Definition: newton.h:148
virtual bool apply(vector_type &u)
apply Operator, i.e. N^{-1}(0) = u
Definition: newton_impl.h:149
NewtonSolver()
default constructor
Definition: newton_impl.h:74
virtual bool init(SmartPtr< IOperator< vector_type > > N)
This operator inverts the Operator N: Y -> X.
Definition: newton_impl.h:130
int num_linsolver_steps(size_t call) const
Definition: newton_impl.h:370
void write_debug(const vector_type &vec, std::string filename)
Definition: newton_impl.h:416
int m_dgbCall
call counter
Definition: newton.h:182
TAlgebra::matrix_type matrix_type
Matrix type.
Definition: newton.h:66
int m_lastNumSteps
Definition: newton.h:183
int last_num_newton_steps() const
Definition: newton.h:125
void clear_step_update(SmartPtr< INewtonUpdate > NU)
clears outer step update
Definition: newton.h:144
void set_line_search(SmartPtr< ILineSearch< vector_type > > spLineSearch)
sets the line search
Definition: newton.h:90
double total_average_linear_steps() const
Definition: newton_impl.h:400
std::vector< number > m_vLinSolverRates
Definition: newton.h:190
std::vector< number > m_vNonLinSolverRates
Definition: newton.h:189
virtual std::string config_string() const
returns information about configuration parameters
Definition: newton_impl.h:438
std::vector< int > m_vTotalLinSolverSteps
Definition: newton.h:187
SmartPtr< ILinearOperatorInverse< vector_type > > m_spLinearSolver
linear solver
Definition: newton.h:160
SmartPtr< ILineSearch< vector_type > > m_spLineSearch
LineSearch.
Definition: newton.h:166
double average_linear_steps(size_t call) const
Definition: newton_impl.h:376
int m_reassembe_J_freq
how often to reassemble the Jacobian (0 == 1 == in every step, i.e. classically)
Definition: newton.h:179
TAlgebra::vector_type vector_type
Vector type.
Definition: newton.h:63
SmartPtr< AssembledLinearOperator< algebra_type > > m_J
jacobi operator
Definition: newton.h:175
SmartPtr< AssembledOperator< algebra_type > > m_N
assembling routine
Definition: newton.h:173
TAlgebra algebra_type
Algebra type.
Definition: newton.h:60
void print_average_convergence() const
prints average linear solver convergence
Definition: newton_impl.h:328
size_t num_newton_steps() const
Definition: newton_impl.h:358
void set_convergence_check(SmartPtr< IConvergenceCheck< vector_type > > spConvCheck)
sets the convergence check
Definition: newton_impl.h:121
SmartPtr< IAssemble< TAlgebra > > m_spAss
assembling
Definition: newton.h:177
std::vector< int > m_vLinSolverCalls
Definition: newton.h:188
void set_linear_solver(SmartPtr< ILinearOperatorInverse< vector_type > > LinearSolver)
sets the linear solver
Definition: newton.h:84
int num_linsolver_calls(size_t call) const
Definition: newton_impl.h:364
void add_inner_step_update(SmartPtr< INewtonUpdate > NU)
add inner step update (applied before every linear solver step)
Definition: newton.h:132
int total_linsolver_steps() const
Definition: newton_impl.h:391
Wrapper for sequential matrices to handle them in parallel.
Definition: parallel_matrix.h:65
const NullSmartPtr SPNULL
The equivalent to NULL for smart pointers.
Definition: smart_pointer.h:90
CPUAlgebra::vector_type vector_type