|
WarpX
|
Top-level class for the nonlinear solver. More...
#include <NonlinearSolver.H>
Public Member Functions | |
| 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 PreconditionerType | GetPreconditionerType () const |
| Return preconditioner type. | |
| virtual 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. | |
Protected Attributes | |
| bool | m_is_defined = false |
| bool | m_verbose = true |
| std::string | m_diagnostic_file |
| int | m_diagnostic_interval = 1 |
| bool | m_usePC = false |
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.
|
default |
|
virtualdefault |
|
delete |
|
deletenoexcept |
|
pure virtual |
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.
Implemented in NewtonSolver< Vec, Ops >, and PicardSolver< Vec, Ops >.
|
inlinevirtual |
Return preconditioner type.
Reimplemented in NewtonSolver< Vec, Ops >.
|
pure virtual |
Return the convergence parameters used by the nonlinear solver.
Implemented in NewtonSolver< Vec, Ops >, and PicardSolver< Vec, Ops >.
|
inlinenodiscard |
Check if the nonlinear solver has been defined.
|
delete |
|
deletenoexcept |
|
pure virtual |
Print parameters used by the nonlinear solver.
Implemented in NewtonSolver< Vec, Ops >, and PicardSolver< Vec, Ops >.
|
pure virtual |
Solve the specified nonlinear equation for U. Picard: U = b + R(U). Newton: F(U) = U - b - R(U) = 0.
Implemented in NewtonSolver< Vec, Ops >, and PicardSolver< Vec, Ops >.
|
inlinevirtual |
Allow caller to dynamically change the verbosity flag. For example, one may want to only print solver information every 100 steps.
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |