18#include "libmesh/static_condensation.h"
19#include "libmesh/static_condensation_dof_map.h"
20#include "libmesh/petsc_linear_solver.h"
62 DM
dm = LIBMESH_PETSC_NULLPTR;
69 auto ksp = petsc_solver.ksp();
71 LibmeshPetscCall(KSPGetDM(ksp, &
dm));
74 LibmeshPetscCall(PetscObjectTypeCompare((PetscObject)
dm, DMMOOSE, &ismoose));
79 LibmeshPetscCall(KSPSetDM(ksp,
dm));
81#if PETSC_VERSION_LESS_THAN(3, 25, 0)
82 LibmeshPetscCall(KSPSetDMActive(ksp, PETSC_FALSE));
84 LibmeshPetscCall(KSPSetDMActive(ksp, KSP_DMACTIVE_OPERATOR, PETSC_FALSE));
86 LibmeshPetscCall(DMDestroy(&
dm));
93 return petsc_solver.ksp();
PetscErrorCode PetscOptionItems *PetscErrorCode DM dm
PetscErrorCode DMMooseRegisterAll()
registerMooseObjectAliased("MooseApp", StaticCondensationFieldSplitPreconditioner, "SCFSP")
Implements a preconditioner designed to map onto PETSc's PCFieldSplit.
static InputParameters validParams()
Constructor.
std::string _decomposition_split
The decomposition split.
NonlinearSystemBase & _nl
The nonlinear system this FSP is associated with (convenience reference)
void createMooseDM(DM *dm)
creates the MOOSE data management object
Static condensation preconditioner.
libMesh::StaticCondensationDofMap & scDofMap()
std::string prefix() const
libMesh::StaticCondensation & scSysMat()
std::shared_ptr< Split > getSplit(const std::string &name)
Retrieves a split by name.
Implements a field split preconditioner for a statically condensed system.
static InputParameters validParams()
virtual void setupDM() override
setup the data management data structure that manages the field split
virtual const libMesh::System & system() const override
virtual std::string prefix() const override
virtual const libMesh::DofMapBase & dofMap() const override
virtual KSP getKSP() override
StaticCondensationFieldSplitPreconditioner(const InputParameters ¶meters)
const System & reduced_system() const
LinearSolver< Number > & reduced_system_solver()
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...