20#ifndef LIBMESH_LINEAR_IMPLICIT_SYSTEM_H
21#define LIBMESH_LINEAR_IMPLICIT_SYSTEM_H
24#include "libmesh/implicit_system.h"
34template <
typename T>
class LinearSolver;
35template <
typename T>
class ShellMatrix;
63 const std::string &
name,
64 const unsigned int number);
96 virtual void clear ()
override;
107 virtual void reinit ()
override;
128 virtual void solve ()
override;
140 virtual void assembly(
bool get_residual,
142 bool apply_heterogeneous_constraints =
false,
143 bool apply_no_constraints =
false)
override;
149 virtual std::string
system_type ()
const override {
return "LinearImplicit"; }
This is the EquationSystems class.
Manages consistently variables, degrees of freedom, coefficient vectors, and matrices for implicit sy...
virtual void assemble() override
Prepares matrix and rhs for system assembly, then calls user assembly function.
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
void attach_shell_matrix(ShellMatrix< Number > *shell_matrix)
This function enables the user to provide a shell matrix, i.e.
LinearImplicitSystem & operator=(const LinearImplicitSystem &)=delete
Real final_linear_residual() const
LinearImplicitSystem(const LinearImplicitSystem &)=delete
Special functions.
virtual LinearSolver< Number > * get_linear_solver() const override
virtual void assembly(bool get_residual, bool get_jacobian, bool apply_heterogeneous_constraints=false, bool apply_no_constraints=false) override
Assembles a residual in rhs and/or a jacobian in matrix, as requested.
virtual void restrict_solve_to(const SystemSubset *subset, const SubsetSolveMode subset_solve_mode=SUBSET_ZERO) override
After calling this method, any solve will be limited to the given subset.
virtual std::string system_type() const override
virtual void init_data() override
Initializes new data members of the system.
ShellMatrix< Number > * _shell_matrix
User supplies shell matrix or nullptr if no shell matrix is used.
unsigned int _n_linear_iterations
The number of linear iterations required to solve the linear system Ax=b.
virtual void solve() override
Assembles & solves the linear system A*x=b.
virtual void reinit() override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
LinearImplicitSystem sys_type
The type of system.
void detach_shell_matrix()
Detaches a shell matrix.
Real _final_linear_residual
The final residual for the linear system Ax=b.
ShellMatrix< Number > * get_shell_matrix()
unsigned int n_linear_iterations() const
virtual void create_static_condensation() override
Request that static condensation be performed for this system.
virtual void assemble() override
Prepares matrix and _dof_map for matrix assembly.
virtual void clear() override
Clear all the data structures associated with the system.
LinearImplicitSystem(LinearImplicitSystem &&)=default
SubsetSolveMode _subset_solve_mode
If restrict-solve-to-subset mode is active, this member decides what happens with the dofs outside th...
const SystemSubset * _subset
The current subset on which to solve (or nullptr if none).
virtual ~LinearImplicitSystem()
ImplicitSystem Parent
The type of the parent.
This base class can be inherited from to provide interfaces to linear solvers from different packages...
Generic shell matrix, i.e.
This is a base class for classes which represent subsets of the dofs of a System.
const std::string & name() const
unsigned int number() const
The libMesh namespace provides an interface to certain functionality in the library.
SubsetSolveMode
defines an enum for the question what happens to the dofs outside the given subset when a system is s...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real