Typedefs | Functions | Variables
oomph::BlackBoxFDNewtonSolver Namespace Reference

Namespace for black-box FD Newton solver. More...

Typedefs

typedef void(* ResidualFctPt) (const Vector< double > &parameters, const Vector< double > &unknowns, Vector< double > &residuals)
 
typedef void(* JacobianFctPt) (const Vector< double > &, const Vector< double > &, DenseDoubleMatrix &jacobian)
 

Functions

void black_box_fd_newton_solve (ResidualFctPt residual_fct, const Vector< double > &params, Vector< double > &unknowns, JacobianFctPt jacobian_fct)
 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 > &params, 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...
 

Detailed Description

Namespace for black-box FD Newton solver.

/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////

Typedef Documentation

◆ JacobianFctPt

typedef void(* oomph::BlackBoxFDNewtonSolver::JacobianFctPt) (const Vector< double > &, const Vector< double > &, DenseDoubleMatrix &jacobian)

Definition at line 60 of file black_box_newton_solver.h.

◆ ResidualFctPt

typedef void(* oomph::BlackBoxFDNewtonSolver::ResidualFctPt) (const Vector< double > &parameters, const Vector< double > &unknowns, Vector< double > &residuals)

Definition at line 55 of file black_box_newton_solver.h.

Function Documentation

◆ black_box_fd_newton_solve()

void oomph::BlackBoxFDNewtonSolver::black_box_fd_newton_solve ( ResidualFctPt  residual_fct,
const Vector< double > &  params,
Vector< double > &  unknowns,
JacobianFctPt  jacobian_fct 
)

Black-box FD Newton solver: Calling sequence for residual function is.

residual_fct(parameters,unknowns,residuals)

where all arguments are double Vectors. unknowns.size() = residuals.size()

Reset number of Newton iterations taken in most recent invocation

Definition at line 67 of file black_box_newton_solver.cc.

References Doc_Progress, FD_step, i, line_search(), Max_iter, N_iter_taken, oomph::oomph_info, oomph::DoubleMatrixBase::solve(), oomph::Matrix< T, MATRIX_TYPE >::sparse_indexed_output(), oomph::OomphInfo::stream_pt(), Tol, and Use_step_length_control.

◆ line_search()

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 233 of file black_box_newton_solver.cc.

References i.

Referenced by black_box_fd_newton_solve().

Variable Documentation

◆ Doc_Progress

bool oomph::BlackBoxFDNewtonSolver::Doc_Progress = false

Flag to indicate if progress of Newton iteration is to be documented (defaults to false)

Definition at line 51 of file black_box_newton_solver.cc.

Referenced by black_box_fd_newton_solve().

◆ FD_step

double oomph::BlackBoxFDNewtonSolver::FD_step = 1.0e-8

◆ Max_iter

unsigned oomph::BlackBoxFDNewtonSolver::Max_iter = 20

◆ N_iter_taken

unsigned oomph::BlackBoxFDNewtonSolver::N_iter_taken = 0

Number of Newton iterations taken in most recent invocation.

Definition at line 47 of file black_box_newton_solver.cc.

Referenced by black_box_fd_newton_solve().

◆ Tol

double oomph::BlackBoxFDNewtonSolver::Tol = 1.0e-8

Tolerance.

Definition at line 57 of file black_box_newton_solver.cc.

Referenced by black_box_fd_newton_solve().

◆ Use_step_length_control

bool oomph::BlackBoxFDNewtonSolver::Use_step_length_control = false

Use steplength control do make globally convergent (default false)

Definition at line 60 of file black_box_newton_solver.cc.

Referenced by black_box_fd_newton_solve().