30#include <oomph-lib-config.h>
41 namespace BlackBoxFDNewtonSolver
99 for (
unsigned i = 0;
i < ndof;
i++)
110 double max_res = std::fabs(*std::max_element(
118 <<
"\ni residual[i] unknown[i] " << std::endl;
119 for (
unsigned i = 0;
i < ndof;
i++)
140 for (
unsigned i = 0;
i < ndof;
i++)
149 for (
unsigned j = 0;
j < ndof;
j++)
175 for (
unsigned i = 0;
i < ndof;
i++)
178 for (
unsigned j = 0;
j < ndof;
j++)
192 for (
unsigned i = 0;
i < ndof;
i++)
212 for (
unsigned i = 0;
i < ndof;
i++)
223 <<
" steps " << std::endl;
250 for (
unsigned i = 0;
i <
n;
i++)
257 for (
unsigned i = 0;
i <
n;
i++)
263 for (
unsigned i = 0;
i <
n;
i++)
275 for (
unsigned i = 0;
i <
n;
i++)
285 for (
unsigned i = 0;
i <
n;
i++)
294 for (
unsigned i = 0;
i <
n;
i++)
306 "BlackBoxFDNewtonSolver::line_search()",
Class of matrices containing doubles, and stored as a DenseMatrix<double>, but with solving functiona...
void solve(DoubleVector &rhs)
Complete LU solve (replaces matrix by its LU decomposition and overwrites RHS with solution)....
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
void sparse_indexed_output(std::ostream &outfile, const unsigned &precision=0, const bool &output_bottom_right_zero=false) const
Indexed output function to print a matrix to the stream outfile as i,j,a(i,j) for a(i,...
std::ostream *& stream_pt()
Access function for the stream pointer.
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
unsigned Max_iter
Max. # of Newton iterations.
unsigned N_iter_taken
Number of Newton iterations taken in most recent invocation.
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.
void(* JacobianFctPt)(const Vector< double > &, const Vector< double > &, DenseDoubleMatrix &jacobian)
bool Doc_Progress
Flag to indicate if progress of Newton iteration is to be documented (defaults to false)
void black_box_fd_newton_solve(ResidualFctPt residual_fct, const Vector< double > ¶ms, Vector< double > &unknowns, JacobianFctPt jacobian_fct)
Black-box FD Newton solver: Calling sequence for residual function is.
void(* ResidualFctPt)(const Vector< double > ¶meters, const Vector< double > &unknowns, Vector< double > &residuals)
bool Use_step_length_control
Use steplength control do make globally convergent (default false)
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...