20#ifndef LIBMESH_IMPLICIT_SYSTEM_H
21#define LIBMESH_IMPLICIT_SYSTEM_H
24#include "libmesh/explicit_system.h"
34template <
typename T>
class LinearSolver;
35class StaticCondensation;
65 const std::string &
name,
66 const unsigned int number);
98 virtual void clear ()
override;
117 virtual std::string
system_type ()
const override {
return "Implicit"; }
141 virtual std::pair<unsigned int, Real>
155 { libmesh_not_implemented(); }
176 { libmesh_not_implemented(); }
185 virtual std::pair<unsigned int, Real>
196 virtual std::pair<unsigned int, Real>
209 virtual std::pair<unsigned int, Real>
224 virtual std::pair<unsigned int, Real>
346 template <
typename T>
This is the EquationSystems class.
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...
virtual void assemble() override
Prepares matrix and rhs for system assembly, then calls user assembly function.
bool zero_out_matrix_and_rhs
By default, the system will zero out the matrix and the right hand side.
virtual std::pair< unsigned int, Real > weighted_sensitivity_solve(const ParameterVector ¶meters, const ParameterVector &weights) override
Assembles & solves the linear system(s) (dR/du)*u_w = sum(w_p*-dR/dp), for those parameters p contain...
virtual std::pair< unsigned int, Real > get_linear_solve_parameters() const
const SparseMatrix< Number > & get_system_matrix() const
StaticCondensation * _sc_system_matrix
The system matrix for static condensation problems.
void create_static_condensation_system_matrix()
Create the static condensation system matrix.
ImplicitSystem sys_type
The type of system.
StaticCondensation & get_static_condensation()
virtual LinearSolver< Number > * get_linear_solver() const
virtual void assemble_residual_derivatives(const ParameterVector ¶meters) override
Residual parameter derivative function.
SparseMatrix< Number > * matrix
The system matrix.
virtual void clear() override
Clear all the data structures associated with the system.
ExplicitSystem Parent
The type of the parent.
virtual std::string system_type() const override
ImplicitSystem(const ImplicitSystem &)=delete
Special functions.
ImplicitSystem(ImplicitSystem &&)=default
virtual void adjoint_qoi_parameter_sensitivity(const QoISet &qoi_indices, const ParameterVector ¶meters, SensitivityData &sensitivities) override
Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with r...
virtual void disable_cache() override
Avoids use of any cached data that might affect any solve result.
virtual void qoi_parameter_hessian_vector_product(const QoISet &qoi_indices, const ParameterVector ¶meters, const ParameterVector &vector, SensitivityData &product) override
For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters...
virtual std::pair< unsigned int, Real > adjoint_solve(const QoISet &qoi_indices=QoISet()) override
Assembles & solves the linear system (dR/du)^T*z = dq/du, for those quantities of interest q specifie...
virtual std::pair< unsigned int, Real > weighted_sensitivity_adjoint_solve(const ParameterVector ¶meters, const ParameterVector &weights, const QoISet &qoi_indices=QoISet()) override
Assembles & solves the linear system(s) (dR/du)^T*z_w = sum(w_p*(d^2q/dudp - d^2R/dudp*z)),...
virtual ~ImplicitSystem()
virtual void create_static_condensation() override
Request that static condensation be performed for this system.
virtual std::pair< unsigned int, Real > sensitivity_solve(const ParameterVector ¶meters) override
Assembles & solves the linear system(s) (dR/du)*u_p = -dR/dp, for those parameters contained within p...
virtual void qoi_parameter_hessian(const QoISet &qoi_indices, const ParameterVector ¶meters, SensitivityData &hessian) override
For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters...
void setup_static_condensation_preconditioner(T &solver)
Sets up the static condensation preconditioner for the supplied solver.
virtual void assembly(bool, bool, bool=false, bool=false)
Assembles a residual in rhs and/or a jacobian in matrix, as requested.
std::unique_ptr< LinearSolver< Number > > linear_solver
This class handles all the details of interfacing with various linear algebra packages like PETSc or ...
virtual void add_matrices() override
Adds the system matrix.
virtual void solve() override
For explicit systems, just assemble and solve the system A*x=b.
ImplicitSystem & operator=(const ImplicitSystem &)=delete
virtual void forward_qoi_parameter_sensitivity(const QoISet &qoi_indices, const ParameterVector ¶meters, SensitivityData &sensitivities) override
Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with r...
This base class can be inherited from to provide interfaces to linear solvers from different packages...
Data structure for specifying which Parameters should be independent variables in a parameter sensiti...
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a pa...
Data structure for holding completed parameter sensitivity calculations.
const std::string & name() const
Parameters parameters
Parameters for the system. If a parameter is not provided, it should be retrieved from the EquationSy...
unsigned int number() const
The libMesh namespace provides an interface to certain functionality in the library.