You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementing sparse matrix representation of Jacobian and using PETSc preconditioners (BLAST-WarpX#6184)
Implemented a `MatrixPC` preconditioner that constructs the sparse
matrix representing the Jacobian for the implicit/semi-implicit time
integrators. Currently, this PC provides no native matrix solvers; it
relies on PETSc's preconditioners and matrix solvers. In the PETSc
interfaces for the JFNK algorithm, added the option of using
matrix-based preconditioners.
In this PR, the matrix comprises the Maxwell's equation terms
(discretized curl-curl) and the diagonal element of the mass matrix (for
the current term).
Other changes:
+ Implemented a wrapper for PETSc's SNES module to solve nonlinear
systems; it is an alternative to the native Newton solver.
+ Streamlined the PETSc interface by creating a `PETScSolver_impl` base
class that contains everything common to the linear and nonlinear
solvers. `KSP_impl` and `SNES_impl` now inherit from it.
Minor changes:
+ Moved PETSc initialization and finalizing calls to `main.cpp` to allow
for the use of command line inputs.
+ Simplified initializing the nonlinear solver based on user input by
removing `nlsolver_type_str` and directly using `AMREX_ENUM` types.
CI test will be added in a later PR.
0 commit comments