Go to the documentation of this file.
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;
64 const std::string &
name,
65 const unsigned int number);
91 virtual void clear ()
override;
102 virtual void reinit ()
override;
123 virtual void solve ()
override;
141 virtual void assembly(
bool get_residual,
143 bool apply_heterogeneous_constraints =
false,
144 bool apply_no_constraints =
false)
override;
150 virtual std::string
system_type ()
const override {
return "LinearImplicit"; }
225 #endif // LIBMESH_LINEAR_IMPLICIT_SYSTEM_H
Real _final_linear_residual
The final residual for the linear system Ax=b.
Manages consistently variables, degrees of freedom, coefficient vectors, and matrices for implicit sy...
virtual void clear() override
Clear all the data structures associated with the system.
virtual std::string system_type() const override
const SystemSubset * _subset
The current subset on which to solve (or nullptr if none).
virtual void release_linear_solver(LinearSolver< Number > *) const override
Releases a pointer to a linear solver acquired by this->get_linear_solver()
The libMesh namespace provides an interface to certain functionality in the library.
virtual void assemble() override
Prepares matrix and rhs for system assembly, then calls user assembly function.
virtual void solve() override
Assembles & solves the linear system A*x=b.
unsigned int number() const
ImplicitSystem Parent
The type of the parent.
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 > * _shell_matrix
User supplies shell matrix or nullptr if no shell matrix is used.
virtual void init_data() override
Initializes new data members of the system.
virtual LinearSolver< Number > * get_linear_solver() const override
virtual void assemble() override
Prepares matrix and _dof_map for matrix assembly.
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.
SubsetSolveMode _subset_solve_mode
If restrict-solve-to-subset mode is active, this member decides what happens with the dofs outside th...
This is a base class for classes which represent subsets of the dofs of a System.
virtual ~LinearImplicitSystem()
Destructor.
This is the EquationSystems class.
unsigned int n_linear_iterations() const
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems.
void detach_shell_matrix()
Detaches a shell matrix.
LinearImplicitSystem(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
const std::string & name() const
Real final_linear_residual() const
unsigned int _n_linear_iterations
The number of linear iterations required to solve the linear system Ax=b.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
ShellMatrix< Number > * get_shell_matrix()
LinearImplicitSystem sys_type
The type of system.
void attach_shell_matrix(ShellMatrix< Number > *shell_matrix)
This function enables the user to provide a shell matrix, i.e.
virtual void reinit() override
Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be use...
std::unique_ptr< LinearSolver< Number > > linear_solver
The LinearSolver defines the interface used to solve the linear_implicit system.