20 #ifndef LIBMESH_LINEAR_IMPLICIT_SYSTEM_H 21 #define LIBMESH_LINEAR_IMPLICIT_SYSTEM_H 24 #include "libmesh/implicit_system.h" 34 template <
typename T>
class LinearSolver;
35 template <
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"; }
218 #endif // LIBMESH_LINEAR_IMPLICIT_SYSTEM_H 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.
ShellMatrix< Number > * get_shell_matrix()
void attach_shell_matrix(ShellMatrix< Number > *shell_matrix)
This function enables the user to provide a shell matrix, i.e.
virtual void assemble() override
Prepares matrix and _dof_map for matrix assembly.
virtual void create_static_condensation() override
Request that static condensation be performed for this system.
This is the EquationSystems class.
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.
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
LinearImplicitSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
virtual void reinit() override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
SubsetSolveMode _subset_solve_mode
If restrict-solve-to-subset mode is active, this member decides what happens with the dofs outside th...
virtual std::string system_type() const override
virtual LinearSolver< Number > * get_linear_solver() const override
The libMesh namespace provides an interface to certain functionality in the library.
virtual void solve() override
Assembles & solves the linear system A*x=b.
unsigned int number() const
Real final_linear_residual() const
virtual void init_data() override
Initializes new data members of the system.
unsigned int n_linear_iterations() const
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.
This is a base class for classes which represent subsets of the dofs of a System. ...
ImplicitSystem Parent
The type of the parent.
Real _final_linear_residual
The final residual for the linear system Ax=b.
LinearImplicitSystem sys_type
The type of system.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LinearImplicitSystem & operator=(const LinearImplicitSystem &)=delete
virtual void clear() override
Clear all the data structures associated with the system.
void detach_shell_matrix()
Detaches a shell matrix.
virtual void assemble() override
Prepares matrix and rhs for system assembly, then calls user assembly function.
const SystemSubset * _subset
The current subset on which to solve (or nullptr if none).
const std::string & name() const
SubsetSolveMode
defines an enum for the question what happens to the dofs outside the given subset when a system is s...
virtual ~LinearImplicitSystem()
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems...
Manages consistently variables, degrees of freedom, coefficient vectors, and matrices for implicit sy...