Go to the documentation of this file.
20 #ifndef LIBMESH_PETSC_DIFF_SOLVER_H
21 #define LIBMESH_PETSC_DIFF_SOLVER_H
23 #include "libmesh/libmesh_common.h"
25 #ifdef LIBMESH_HAVE_PETSC
28 #include "libmesh/diff_solver.h"
29 #include "libmesh/petsc_macro.h"
30 #include "libmesh/petsc_dm_wrapper.h"
34 # define LIBMESH_SAW_I
36 #include <petscsnes.h>
38 # undef I // Avoid complex.h contamination
76 virtual void reinit ()
override;
81 virtual void init ()
override;
93 virtual unsigned int solve ()
override;
105 #if !PETSC_VERSION_LESS_THAN(3,7,3)
106 #if defined(LIBMESH_ENABLE_AMR) && defined(LIBMESH_HAVE_METAPHYSICL)
121 #endif // #ifdef LIBMESH_HAVE_PETSC
123 #endif // LIBMESH_PETSC_DIFF_SOLVER_H
void clear()
The clear function.
Manages consistently variables, degrees of freedom, coefficient vectors, and matrices for implicit sy...
virtual ~PetscDiffSolver()
Destructor.
PetscDMWrapper _dm_wrapper
Wrapper object for interacting with PetscDM.
The libMesh namespace provides an interface to certain functionality in the library.
This is a generic class that defines a solver to handle ImplicitSystem classes, including NonlinearIm...
const sys_type & system() const
void setup_petsc_data()
Common helper function to setup PETSc data structures.
This class defines a wrapper around the PETSc DM infrastructure.
virtual void reinit() override
The reinitialization function.
virtual unsigned int solve() override
This method performs a solve.
PetscDiffSolver(sys_type &system)
Constructor.
This class defines a solver which uses a PETSc SNES context to handle a DifferentiableSystem.
virtual void init() override
The initialization function.
SNES _snes
Nonlinear solver context.