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"
50 #include "nestedNewtonRFSwitch.h"
52 #if ENABLE_NESTED_NEWTON_RESOLFUNC_UPDATE
61 template <
typename TAlgebra>
159 #if ENABLE_NESTED_NEWTON_RESOLFUNC_UPDATE
162 m_newtonUpdater = nU;
208 #if ENABLE_NESTED_NEWTON_RESOLFUNC_UPDATE
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:71
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:65
std::vector< SmartPtr< INewtonUpdate > > m_innerStepUpdate
Update.
Definition: newton.h:184
int total_linsolver_calls() const
Definition: newton_impl.h:433
void add_step_update(SmartPtr< INewtonUpdate > NU)
add outer step update (applied before every Newton step)
Definition: newton.h:148
std::vector< SmartPtr< INewtonUpdate > > m_stepUpdate
Definition: newton.h:185
void clear_average_convergence()
resets average linear solver convergence
Definition: newton_impl.h:458
void clear_inner_step_update(SmartPtr< INewtonUpdate > NU)
clears inner step update
Definition: newton.h:144
virtual bool prepare(vector_type &u)
prepare Operator
Definition: newton_impl.h:161
SmartPtr< IConvergenceCheck< vector_type > > m_spConvCheck
Convergence Check.
Definition: newton.h:178
SmartPtr< ILineSearch< vector_type > > line_search()
Definition: newton.h:100
void disable_line_search()
Definition: newton.h:99
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:156
virtual bool apply(vector_type &u)
apply Operator, i.e. N^{-1}(0) = u
Definition: newton_impl.h:168
NewtonSolver()
default constructor
Definition: newton_impl.h:81
virtual bool init(SmartPtr< IOperator< vector_type > > N)
This operator inverts the Operator N: Y -> X.
Definition: newton_impl.h:149
int num_linsolver_steps(size_t call) const
Definition: newton_impl.h:421
void write_debug(const vector_type &vec, std::string filename)
Definition: newton_impl.h:467
int m_dgbCall
call counter
Definition: newton.h:197
TAlgebra::matrix_type matrix_type
Matrix type.
Definition: newton.h:74
int m_lastNumSteps
Definition: newton.h:198
int last_num_newton_steps() const
Definition: newton.h:133
void clear_step_update(SmartPtr< INewtonUpdate > NU)
clears outer step update
Definition: newton.h:152
void set_line_search(SmartPtr< ILineSearch< vector_type > > spLineSearch)
sets the line search
Definition: newton.h:98
double total_average_linear_steps() const
Definition: newton_impl.h:451
std::vector< number > m_vLinSolverRates
Definition: newton.h:205
std::vector< number > m_vNonLinSolverRates
Definition: newton.h:204
virtual std::string config_string() const
returns information about configuration parameters
Definition: newton_impl.h:489
std::vector< int > m_vTotalLinSolverSteps
Definition: newton.h:202
SmartPtr< ILinearOperatorInverse< vector_type > > m_spLinearSolver
linear solver
Definition: newton.h:175
SmartPtr< ILineSearch< vector_type > > m_spLineSearch
LineSearch.
Definition: newton.h:181
double average_linear_steps(size_t call) const
Definition: newton_impl.h:427
int m_reassembe_J_freq
how often to reassemble the Jacobian (0 == 1 == in every step, i.e. classically)
Definition: newton.h:194
TAlgebra::vector_type vector_type
Vector type.
Definition: newton.h:71
SmartPtr< AssembledLinearOperator< algebra_type > > m_J
jacobi operator
Definition: newton.h:190
SmartPtr< AssembledOperator< algebra_type > > m_N
assembling routine
Definition: newton.h:188
TAlgebra algebra_type
Algebra type.
Definition: newton.h:68
void print_average_convergence() const
prints average linear solver convergence
Definition: newton_impl.h:379
size_t num_newton_steps() const
Definition: newton_impl.h:409
void set_convergence_check(SmartPtr< IConvergenceCheck< vector_type > > spConvCheck)
sets the convergence check
Definition: newton_impl.h:140
SmartPtr< IAssemble< TAlgebra > > m_spAss
assembling
Definition: newton.h:192
std::vector< int > m_vLinSolverCalls
Definition: newton.h:203
void set_linear_solver(SmartPtr< ILinearOperatorInverse< vector_type > > LinearSolver)
sets the linear solver
Definition: newton.h:92
int num_linsolver_calls(size_t call) const
Definition: newton_impl.h:415
void add_inner_step_update(SmartPtr< INewtonUpdate > NU)
add inner step update (applied before every linear solver step)
Definition: newton.h:140
int total_linsolver_steps() const
Definition: newton_impl.h:442
Definition: newtonUpdaterGeneric.h:25
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