OGS
|
Newton-Raphson solver for system of equations using an Eigen linear solvers library. The current implementation does not update the solution itself, but calls a function for the solution's update with the current increment.
Definition at line 33 of file NewtonRaphson.h.
#include <NewtonRaphson.h>
Classes | |
struct | FirstArgument |
struct | FirstArgument< R(C::*)(Arg, Args...) const > |
Public Member Functions | |
NewtonRaphson (LinearSolver &linear_solver, JacobianMatrixUpdate jacobian_update, ResidualUpdate residual_update, SolutionUpdate solution_update, NewtonRaphsonSolverParameters const &solver_parameters) | |
std::optional< int > | solve (JacobianMatrix &jacobian) const |
Private Types | |
template<typename F > | |
using | FirstArgumentType |
using | JacobianMatrix = FirstArgumentType<JacobianMatrixUpdate> |
using | ResidualVector = FirstArgumentType<ResidualUpdate> |
Private Attributes | |
LinearSolver & | _linear_solver |
JacobianMatrixUpdate | _jacobian_update |
ResidualUpdate | _residual_update |
SolutionUpdate | _solution_update |
const int | _maximum_iterations |
Maximum number of iterations. | |
const double | _residuum_tolerance_squared |
Error tolerance for the residuum. | |
const double | _increment_tolerance_squared |
Error tolerance for the increment. | |
|
private |
Definition at line 55 of file NewtonRaphson.h.
|
private |
Definition at line 58 of file NewtonRaphson.h.
|
private |
Definition at line 59 of file NewtonRaphson.h.
|
inline |
Definition at line 62 of file NewtonRaphson.h.
|
inline |
Returns true and the iteration number if succeeded, otherwise false and an undefined value for the number of iterations.
Definition at line 81 of file NewtonRaphson.h.
References NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::_increment_tolerance_squared, NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::_jacobian_update, NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::_linear_solver, NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::_maximum_iterations, NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::_residual_update, NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::_residuum_tolerance_squared, NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::_solution_update, and ERR().
Referenced by ProcessLib::WellboreCompensateNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::WellboreSimulator::WellboreSimulatorFEM< ShapeFunction, GlobalDim >::assemble(), and ProcessLib::TwoPhaseFlowWithPrho::TwoPhaseFlowWithPrhoMaterialProperties::computeConstitutiveRelation().
|
private |
Error tolerance for the increment.
Definition at line 143 of file NewtonRaphson.h.
Referenced by NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::solve().
|
private |
Definition at line 136 of file NewtonRaphson.h.
Referenced by NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::solve().
|
private |
Definition at line 135 of file NewtonRaphson.h.
Referenced by NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::solve().
|
private |
Maximum number of iterations.
Definition at line 139 of file NewtonRaphson.h.
Referenced by NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::solve().
|
private |
Definition at line 137 of file NewtonRaphson.h.
Referenced by NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::solve().
|
private |
Error tolerance for the residuum.
Definition at line 141 of file NewtonRaphson.h.
Referenced by NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::solve().
|
private |
Definition at line 138 of file NewtonRaphson.h.
Referenced by NumLib::NewtonRaphson< LinearSolver, JacobianMatrixUpdate, ResidualUpdate, SolutionUpdate >::solve().