|
| | NonlinearSolver ()=default |
| |
| virtual | ~NonlinearSolver ()=default |
| |
| | NonlinearSolver (const NonlinearSolver &)=delete |
| |
| NonlinearSolver & | operator= (const NonlinearSolver &)=delete |
| |
| | NonlinearSolver (NonlinearSolver &&) noexcept=delete |
| |
| NonlinearSolver & | operator= (NonlinearSolver &&) noexcept=delete |
| |
| virtual void | Define (const Vec &, Ops *)=0 |
| | 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.
|
| |
| bool | IsDefined () const |
| | Check if the nonlinear solver has been defined.
|
| |
| virtual void | Solve (Vec &, const Vec &, amrex::Real, amrex::Real, int) const =0 |
| | Solve the specified nonlinear equation for U. Picard: U = b + R(U). Newton: F(U) = U - b - R(U) = 0.
|
| |
| virtual void | PrintParams () const =0 |
| | Print parameters used by the nonlinear solver.
|
| |
| virtual void | GetSolverParams (amrex::Real &, amrex::Real &, int &)=0 |
| | Return the convergence parameters used by the nonlinear solver.
|
| |
| virtual bool | UsePreconditioner () |
| | Whether a preconditioner is used by the nonlinear solver.
|
| |
| void | Verbose (bool a_verbose) |
| | Allow caller to dynamically change the verbosity flag. For example, one may want to only print solver information every 100 steps.
|
| |
template<class Vec, class Ops>
class NonlinearSolver< Vec, Ops >
Top-level class for the nonlinear solver.
This class is templated on a vector class Vec, and an operator class Ops.
The Ops class must have the following function: ComputeRHS( R_vec, U_vec, time, nl_iter, from_jacobian ), where U_vec and R_vec are of type Vec.
The Vec class must have basic math operators, such as Copy, +=, -=, increment(), linComb(), scale(), etc.. See WarpXSolverVec.H for an example.