|
WarpX
|
Base class for preconditioners. More...
#include <Preconditioner.H>
Public Types | |
| using | RT = typename T::value_type |
Public Member Functions | |
| Preconditioner ()=default | |
| Default constructor. | |
| virtual | ~Preconditioner ()=default |
| Default destructor. | |
| Preconditioner (const Preconditioner &)=default | |
| Preconditioner & | operator= (const Preconditioner &)=default |
| Preconditioner (Preconditioner &&) noexcept=default | |
| Preconditioner & | operator= (Preconditioner &&) noexcept=default |
| virtual void | Define (const T &, Ops *const)=0 |
| Define the preconditioner. | |
| virtual void | Update (const T &a_U)=0 |
| Update the preconditioner. | |
| virtual void | Apply (T &a_x, const T &a_b)=0 |
| Apply (solve) the preconditioner given a RHS. | |
| virtual void | getPCMatrix (amrex::Gpu::DeviceVector< int > &, amrex::Gpu::DeviceVector< int > &, amrex::Gpu::DeviceVector< int > &, amrex::Gpu::DeviceVector< RT > &, int &, int &) |
| Get the sparse matrix form of the preconditioner. | |
| virtual bool | IsDefined () const =0 |
| Check if the nonlinear solver has been defined. | |
| virtual void | setName (const std::string &) |
| Set the name for screen output and parsing inputs. | |
| virtual void | printParameters () const |
| Print parameters. | |
| void | CurTime (const RT a_time) |
| Set the current time. | |
| void | CurTimeStep (const RT a_dt) |
| Set the current time step size. | |
Protected Attributes | |
| RT | m_time = 0.0 |
| RT | m_dt = 0.0 |
Base class for preconditioners.
This class is templated on a solution-type class T and an operator class Ops.
The Ops class must have the following function: (this will depend on the specific preconditioners inheriting from this class)
The T class must have the following functions: (this will depend on the specific preconditioners inheriting from this class)
| using Preconditioner< T, Ops >::RT = typename T::value_type |
|
default |
Default constructor.
|
virtualdefault |
Default destructor.
|
default |
|
defaultnoexcept |
|
pure virtual |
Apply (solve) the preconditioner given a RHS.
Given a right-hand-side b, solve: A x = b where A is a linear operator.
Implemented in CurlCurlMLMGPC< T, Ops >, JacobiPC< T, Ops >, and MatrixPC< T, Ops >.
|
inline |
Set the current time.
|
inline |
Set the current time step size.
|
pure virtual |
Define the preconditioner.
Implemented in CurlCurlMLMGPC< T, Ops >, JacobiPC< T, Ops >, and MatrixPC< T, Ops >.
|
inlinevirtual |
Get the sparse matrix form of the preconditioner.
If the preconditioner is based on constructing and solving the sparse matrix form, this function will return the sparse matrix form. Base class implementation aborts with an error message to ensure this function is not called for operator-form preconditioners
Reimplemented in MatrixPC< T, Ops >.
|
nodiscardpure virtual |
Check if the nonlinear solver has been defined.
Implemented in CurlCurlMLMGPC< T, Ops >, JacobiPC< T, Ops >, and MatrixPC< T, Ops >.
|
default |
|
defaultnoexcept |
|
inlinevirtual |
Print parameters.
Reimplemented in CurlCurlMLMGPC< T, Ops >, JacobiPC< T, Ops >, and MatrixPC< T, Ops >.
|
inlinevirtual |
Set the name for screen output and parsing inputs.
Reimplemented in MatrixPC< T, Ops >.
|
pure virtual |
Update the preconditioner.
Implemented in CurlCurlMLMGPC< T, Ops >, JacobiPC< T, Ops >, and MatrixPC< T, Ops >.
|
protected |
|
protected |