Typedefs | Functions | Variables
oomph::BlackBoxFDNewtonSolver Namespace Reference

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 > &params, 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 > &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

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

Function pointer for residual function: Parameters, unknowns, residuals.

Definition at line 198 of file oomph_utilities.cc.

Function Documentation

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.

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 226 of file oomph_utilities.cc.

References Doc_Progress, FD_step, i, line_search(), Max_iter, N_iter_taken, oomph::oomph_info, oomph::DoubleMatrixBase::solve(), Tol, and Use_step_length_control.

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().

Variable Documentation

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.

Referenced by black_box_fd_newton_solve().

double oomph::BlackBoxFDNewtonSolver::FD_step =1.0e-8
unsigned oomph::BlackBoxFDNewtonSolver::Max_iter =20
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.

Referenced by black_box_fd_newton_solve().

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 black_box_fd_newton_solve(), 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.

Referenced by black_box_fd_newton_solve().