Newton method to solve nonlinear equation of form: F(U) = U - b - R(U) = 0. U is the solution vector, b is a constant, and R(U) is some nonlinear function of U, which is computed in the ComputeRHS() Ops function.
More...
#include <NewtonSolver.H>
|
| void | ParseParameters () |
| |
| void | EvalResidual (Vec &a_F, const Vec &a_U, const Vec &a_b, amrex::Real a_time, amrex::Real a_dt, int a_iter) const |
| | Compute the nonlinear residual: F(U) = U - b - R(U). More...
|
| |
template<class Vec, class Ops>
class NewtonSolver< Vec, Ops >
Newton method to solve nonlinear equation of form: F(U) = U - b - R(U) = 0. U is the solution vector, b is a constant, and R(U) is some nonlinear function of U, which is computed in the ComputeRHS() Ops function.
◆ NewtonSolver() [1/3]
template<class Vec , class Ops >
◆ ~NewtonSolver()
template<class Vec , class Ops >
◆ NewtonSolver() [2/3]
template<class Vec , class Ops >
◆ NewtonSolver() [3/3]
template<class Vec , class Ops >
◆ CurTime()
template<class Vec , class Ops >
| void NewtonSolver< Vec, Ops >::CurTime |
( |
amrex::Real |
a_time | ) |
const |
|
inline |
◆ CurTimeStep()
template<class Vec , class Ops >
| void NewtonSolver< Vec, Ops >::CurTimeStep |
( |
amrex::Real |
a_dt | ) |
const |
|
inline |
◆ Define()
template<class Vec , class Ops >
| void NewtonSolver< Vec, Ops >::Define |
( |
const Vec & |
, |
|
|
Ops * |
|
|
) |
| |
|
overridevirtual |
Read user-provided parameters that control the nonlinear solver. Allocate intermediate data containers needed by the solver. For Newton, setup the linear solver for computing the Newton step.
Implements NonlinearSolver< Vec, Ops >.
◆ EvalResidual()
template<class Vec , class Ops >
| void NewtonSolver< Vec, Ops >::EvalResidual |
( |
Vec & |
a_F, |
|
|
const Vec & |
a_U, |
|
|
const Vec & |
a_b, |
|
|
amrex::Real |
a_time, |
|
|
amrex::Real |
a_dt, |
|
|
int |
a_iter |
|
) |
| const |
|
private |
Compute the nonlinear residual: F(U) = U - b - R(U).
◆ GetSolverParams()
template<class Vec , class Ops >
| void NewtonSolver< Vec, Ops >::GetSolverParams |
( |
amrex::Real & |
, |
|
|
amrex::Real & |
, |
|
|
int & |
|
|
) |
| |
|
inlineoverridevirtual |
◆ operator=() [1/2]
template<class Vec , class Ops >
◆ operator=() [2/2]
template<class Vec , class Ops >
◆ ParseParameters()
template<class Vec , class Ops >
◆ PrintParams()
template<class Vec , class Ops >
◆ Solve()
template<class Vec , class Ops >
| void NewtonSolver< Vec, Ops >::Solve |
( |
Vec & |
, |
|
|
const Vec & |
, |
|
|
amrex::Real |
, |
|
|
amrex::Real |
|
|
) |
| const |
|
overridevirtual |
Solve the specified nonlinear equation for U. Picard: U = b + R(U). Newton: F(U) = U - b - R(U) = 0.
Implements NonlinearSolver< Vec, Ops >.
◆ m_atol
template<class Vec , class Ops >
Absolute tolerance for the Newton solver.
◆ m_cur_time
template<class Vec , class Ops >
◆ m_dt
template<class Vec , class Ops >
◆ m_dU
template<class Vec , class Ops >
Intermediate Vec containers used by the solver.
◆ m_F
template<class Vec , class Ops >
◆ m_gmres_atol
template<class Vec , class Ops >
Absolute tolerance for GMRES.
◆ m_gmres_maxits
template<class Vec , class Ops >
Maximum iterations for GMRES.
◆ m_gmres_restart_length
template<class Vec , class Ops >
Restart iteration for GMRES.
◆ m_gmres_rtol
template<class Vec , class Ops >
Relative tolerance for GMRES.
◆ m_gmres_verbose_int
template<class Vec , class Ops >
Verbosity flag for GMRES.
◆ m_linear_function
template<class Vec , class Ops >
The linear function used by GMRES to compute A*v. In the contect of JFNK, A = dF/dU (i.e., system Jacobian)
◆ m_linear_solver
template<class Vec , class Ops >
The linear solver (GMRES) object.
◆ m_maxits
template<class Vec , class Ops >
Maximum iterations for the Newton solver.
◆ m_ops
template<class Vec , class Ops >
◆ m_R
template<class Vec , class Ops >
◆ m_require_convergence
template<class Vec , class Ops >
Flag to determine whether convergence is required.
◆ m_rtol
template<class Vec , class Ops >
Relative tolerance for the Newton solver.
◆ m_update_pc
template<class Vec , class Ops >
◆ m_update_pc_init
template<class Vec , class Ops >
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/warpx/checkouts/24.08/Source/NonlinearSolvers/NewtonSolver.H