18#ifndef BFGSNonLinearSolver_h
19#define BFGSNonLinearSolver_h
50 const bool usePreconditioner,
51 const bool useRFOStep,
52 const unsigned int maxNumberIterations,
53 const unsigned int debugLevel,
54 const MPI_Comm & mpi_comm_parent,
55 const double trustRadius_maximum = 0.5,
56 const double trustRadius_initial = 0.02,
57 const double trustRadius_minimum = 1.0e-4,
58 const bool isCurvatureOnlyLineSearchStoppingCondition =
false);
79 const std::string checkpointFileName =
"",
80 const bool restart =
false);
88 save(
const std::string &checkpointFileName);
159 load(
const std::string &checkpointFileName);
dealii::ConditionalOStream pcout
Definition BFGSNonLinearSolver.h:217
~BFGSNonLinearSolver()
Destructor.
void checkWolfe()
Check if the step satifies the Strong Wolfe conditons.
const bool d_useRFOStep
Definition BFGSNonLinearSolver.h:213
bool d_wolfeCurvature
Definition BFGSNonLinearSolver.h:196
void scaleHessian()
Scale hessian according to eqn 6.20 of Nocedal and Wright.
std::vector< double > d_gradientNew
Definition BFGSNonLinearSolver.h:167
std::vector< double > d_valueNew
Definition BFGSNonLinearSolver.h:167
std::vector< double > d_deltaXNew
Definition BFGSNonLinearSolver.h:172
bool updateSolution(const std::vector< double > &step, nonlinearSolverProblem &problem)
Update solution x -> x + step.
bool d_stepAccepted
boolean parameter for step accepteance and Wolfe conditions.
Definition BFGSNonLinearSolver.h:196
double d_trustRadiusInitial
storage for trust region parameters.
Definition BFGSNonLinearSolver.h:192
nonLinearSolver::ReturnValueType solve(nonlinearSolverProblem &problem, const std::string checkpointFileName="", const bool restart=false)
Solve non-linear problem using a modified BFGS method.
void computeNewtonStep()
Compute the Quasi-Newton Step.
std::vector< double > d_value
Definition BFGSNonLinearSolver.h:163
void load(const std::string &checkpointFileName)
Load BFGS solver state from checkpoint file.
const bool d_usePreconditioner
Definition BFGSNonLinearSolver.h:213
double d_trustRadius
Definition BFGSNonLinearSolver.h:193
double d_trustRadiusMax
Definition BFGSNonLinearSolver.h:192
void save(const std::string &checkpointFileName)
Create checkpoint file for current state of the BFGS solver.
unsigned int d_iter
storage for current bfgs iteration count
Definition BFGSNonLinearSolver.h:179
unsigned int d_numberUnknowns
Definition BFGSNonLinearSolver.h:176
BFGSNonLinearSolver(const bool usePreconditioner, const bool useRFOStep, const unsigned int maxNumberIterations, const unsigned int debugLevel, const MPI_Comm &mpi_comm_parent, const double trustRadius_maximum=0.5, const double trustRadius_initial=0.02, const double trustRadius_minimum=1.0e-4, const bool isCurvatureOnlyLineSearchStoppingCondition=false)
Constructor.
void computeStep()
Compute the final update step using the trust radius and whether or not the previous step was accepte...
void initializeHessian(nonlinearSolverProblem &problem)
initialize hessian, either preconditioner or identity matrix.
double d_trustRadiusMin
Definition BFGSNonLinearSolver.h:192
void updateHessian()
Update Hessian according to damped BFGS rule: Procedure 18.2 of Nocedal and Wright.
std::vector< double > d_updateVector
Definition BFGSNonLinearSolver.h:172
int d_isReset
Definition BFGSNonLinearSolver.h:210
bool d_wolfeSufficientDec
Definition BFGSNonLinearSolver.h:196
bool d_useSingleAtomSolutionsInitialGuess
Definition BFGSNonLinearSolver.h:212
bool d_wolfeSatisfied
Definition BFGSNonLinearSolver.h:197
std::vector< double > d_Srfo
Definition BFGSNonLinearSolver.h:183
bool d_hessianScaled
Definition BFGSNonLinearSolver.h:202
void computeTrustRadius(nonlinearSolverProblem &problem)
Estimate the trust radius for the next step based on the previous step and check for trust radius max...
double d_normDeltaXnew
storage for inf norm of the update step.
Definition BFGSNonLinearSolver.h:189
std::vector< double > d_hessian
storage for the hessian in current bfgs step.
Definition BFGSNonLinearSolver.h:186
MPI_Comm mpi_communicator
Definition BFGSNonLinearSolver.h:216
std::vector< double > d_gradient
Definition BFGSNonLinearSolver.h:163
void computeRFOStep()
Compute step using the Rational Function Method.
std::vector< double > d_deltaX
Definition BFGSNonLinearSolver.h:172
bool d_isCurvatureOnlyLineSearchStoppingCondition
Definition BFGSNonLinearSolver.h:205
nonLinearSolver(const unsigned int debugLevel, const unsigned int maxNumberIterations, const double tolerance=0)
Constructor.
ReturnValueType
Definition nonLinearSolver.h:45
Abstract class for solver functions.
Definition nonlinearSolverProblem.h:30
Definition pseudoPotentialToDftfeConverter.cc:34