Namespace for black-box FD Newton solver. More...
Typedefs | |
typedef void(* | ResidualFctPt) (const Vector< double > &, const Vector< double > &, Vector< double > &) |
Function pointer for residual function: Parameters, unknowns, residuals. More... | |
Functions | |
void | black_box_fd_newton_solve (ResidualFctPt residual_fct, const Vector< double > ¶ms, Vector< double > &unknowns) |
Black-box FD Newton solver: Calling sequence for residual function is. More... | |
void | line_search (const Vector< double > &x_old, const double half_residual_squared_old, const Vector< double > &gradient, ResidualFctPt residual_fct, const Vector< double > ¶ms, Vector< double > &newton_dir, Vector< double > &x, double &half_residual_squared, const double &stpmax) |
Line search helper for globally convergent Newton method. More... | |
Variables | |
unsigned | Max_iter =20 |
Max. # of Newton iterations. More... | |
unsigned | N_iter_taken =0 |
Number of Newton iterations taken in most recent invocation. More... | |
bool | Doc_Progress =false |
Flag to indicate if progress of Newton iteration is to be documented (defaults to false) More... | |
double | FD_step =1.0e-8 |
FD step. More... | |
double | Tol =1.0e-8 |
Tolerance. More... | |
bool | Use_step_length_control =false |
Use steplength control do make globally convergent (default false) More... | |
Namespace for black-box FD Newton solver.
typedef void(* oomph::BlackBoxFDNewtonSolver::ResidualFctPt)(const Vector< double > ¶meters, const Vector< double > &unknowns, Vector< double > &residuals) |
Function pointer for residual function: Parameters, unknowns, residuals.
Definition at line 198 of file oomph_utilities.cc.
void oomph::BlackBoxFDNewtonSolver::black_box_fd_newton_solve | ( | ResidualFctPt | residual_fct, |
const Vector< double > & | params, | ||
Vector< double > & | unknowns | ||
) |
Black-box FD Newton solver: Calling sequence for residual function is.
where all arguments are double Vectors. unknowns.size() = residuals.size()
Reset number of Newton iterations taken in most recent invocation
Definition at line 226 of file oomph_utilities.cc.
References FD_step, i, line_search(), Max_iter, oomph::oomph_info, and oomph::DoubleMatrixBase::solve().
void oomph::BlackBoxFDNewtonSolver::line_search | ( | const Vector< double > & | x_old, |
const double | half_residual_squared_old, | ||
const Vector< double > & | gradient, | ||
ResidualFctPt | residual_fct, | ||
const Vector< double > & | params, | ||
Vector< double > & | newton_dir, | ||
Vector< double > & | x, | ||
double & | half_residual_squared, | ||
const double & | stpmax | ||
) |
Line search helper for globally convergent Newton method.
Definition at line 390 of file oomph_utilities.cc.
References i.
Referenced by black_box_fd_newton_solve().
bool oomph::BlackBoxFDNewtonSolver::Doc_Progress =false |
Flag to indicate if progress of Newton iteration is to be documented (defaults to false)
Definition at line 210 of file oomph_utilities.cc.
double oomph::BlackBoxFDNewtonSolver::FD_step =1.0e-8 |
FD step.
Definition at line 213 of file oomph_utilities.cc.
Referenced by black_box_fd_newton_solve(), oomph::Problem::get_derivative_wrt_global_parameter(), oomph::Problem::get_fd_jacobian(), oomph::Problem::get_hessian_vector_products(), oomph::FoldHandler::get_jacobian(), oomph::PitchForkHandler::get_jacobian(), oomph::HopfHandler::get_jacobian(), oomph::AugmentedBlockFoldLinearSolver::resolve(), oomph::AugmentedBlockPitchForkLinearSolver::resolve(), oomph::AugmentedBlockFoldLinearSolver::solve(), oomph::AugmentedBlockPitchForkLinearSolver::solve(), oomph::BlockHopfLinearSolver::solve(), and oomph::BlockHopfLinearSolver::solve_for_two_rhs().
unsigned oomph::BlackBoxFDNewtonSolver::Max_iter =20 |
Max. # of Newton iterations.
Definition at line 203 of file oomph_utilities.cc.
Referenced by oomph::HyprePreconditioner::amg_iterations(), black_box_fd_newton_solve(), oomph::HypreInterface::hypre_solver_setup(), oomph::HypreInterface::HypreInterface(), oomph::HyprePreconditioner::HyprePreconditioner(), oomph::TrilinosAztecOOSolver::max_iter(), oomph::HypreSolver::max_iter(), oomph::HyprePreconditioner::set_amg_iterations(), oomph::CG< MATRIX >::solve_helper(), and oomph::BiCGStab< MATRIX >::solve_helper().
unsigned oomph::BlackBoxFDNewtonSolver::N_iter_taken =0 |
Number of Newton iterations taken in most recent invocation.
Definition at line 206 of file oomph_utilities.cc.
double oomph::BlackBoxFDNewtonSolver::Tol =1.0e-8 |
Tolerance.
Relative tolerance to within radius of points on DtN boundary are allowed to deviate from specified value.
Definition at line 216 of file oomph_utilities.cc.
Referenced by oomph::FourierDecomposedHelmholtzDtNMesh< ELEMENT >::setup_gamma(), and oomph::HelmholtzDtNMesh< ELEMENT >::setup_gamma().
bool oomph::BlackBoxFDNewtonSolver::Use_step_length_control =false |
Use steplength control do make globally convergent (default false)
Definition at line 219 of file oomph_utilities.cc.