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" 31 #include "libmesh/wrapped_petsc.h" 35 # define LIBMESH_SAW_I 37 #include <petscsnes.h> 39 # undef I // Avoid complex.h contamination 77 virtual void reinit ()
override;
82 virtual void init ()
override;
94 virtual unsigned int solve ()
override;
106 #if !PETSC_VERSION_LESS_THAN(3,7,3) 107 #if defined(LIBMESH_ENABLE_AMR) && defined(LIBMESH_HAVE_METAPHYSICL) 122 #endif // #ifdef LIBMESH_HAVE_PETSC 124 #endif // LIBMESH_PETSC_DIFF_SOLVER_H virtual void init() override
The initialization function.
void clear()
The clear function.
void setup_petsc_data()
Common helper function to setup PETSc data structures.
virtual ~PetscDiffSolver()
Destructor.
virtual unsigned int solve() override
This method performs a solve.
The libMesh namespace provides an interface to certain functionality in the library.
This class defines a wrapper around the PETSc DM infrastructure.
PetscDiffSolver(sys_type &system)
Constructor.
This is a generic class that defines a solver to handle ImplicitSystem classes, including NonlinearIm...
This class defines a solver which uses a PETSc SNES context to handle a DifferentiableSystem.
const sys_type & system() const
PetscDMWrapper _dm_wrapper
Wrapper object for interacting with PetscDM.
WrappedPetsc< SNES > _snes
Nonlinear solver context.
virtual void reinit() override
The reinitialization function.
Manages consistently variables, degrees of freedom, coefficient vectors, and matrices for implicit sy...