Template Class LinearAdapter¶
Defined in File linear_adapter.h
Class Documentation¶
-
template<typename FieldVectorType, typename GlobalVectorType>
class LinearAdapter¶ Execution adapter for affine steady semantic systems.
solve()evaluates the affine residual at zero and overwrites its state with the result of the supplied direct linear solve. The incoming state is therefore storage, not a nonlinear initial guess.Public Types
-
using Parameters = LinearAdapterParameters¶
-
using Operator = dealii::LinearOperator<GlobalVectorType>¶
-
using LocalOperator = dealii::LinearOperator<FieldVectorType>¶
-
using MatrixType = typename Composition::MatrixType¶
-
using BlockMatrixType = typename Composition::BlockMatrixType¶
-
using SaddlePointMetadata = typename Composition::SaddlePointMetadata¶
-
using SolveFunction = std::function<void(const Operator&, const GlobalVectorType&, GlobalVectorType&)>¶
Public Functions
-
inline LinearAdapter(const LinearAdapterParameters ¶meters, const MPI_Comm communicator, SolveFunction solve = {})¶
-
inline const LinearAdapterParameters &solver_options() const¶
-
inline void setup_direct(const GlobalVectorType &state) const¶
Factorize the current linearization for subsequent direct solves.
-
template<typename Problem, typename ...Arguments>
inline auto add(const Problem &problem, const std::string &prefix = {}, const Arguments&... arguments)¶
-
inline GlobalVectorType make_state() const¶
-
inline void reinit(GlobalVectorType &state) const¶
-
inline FieldVectorType &field(GlobalVectorType &state, const FieldId id) const¶
-
inline const FieldVectorType &field(const GlobalVectorType &state, const FieldId id) const¶
-
inline void evaluate_residual(const GlobalVectorType &state, GlobalVectorType &residual) const¶
-
inline Operator jacobian(const GlobalVectorType &state) const¶
-
inline bool can_materialize_matrix(const GlobalVectorType &state) const¶
-
inline BlockMatrixType block_matrix(const GlobalVectorType &state) const¶
-
inline MatrixType monolithic_matrix(const GlobalVectorType &state) const¶
-
inline bool has_complete_local_preconditioners() const¶
-
inline const std::vector<SaddlePointMetadata> &saddle_points() const¶
-
inline LocalOperator schur_operator(const FieldId multiplier, const GlobalVectorType &state) const¶
-
inline Operator schur_preconditioner(const FieldId multiplier, const GlobalVectorType &state) const¶
-
inline Operator augmented_lagrangian_operator(const GlobalVectorType &state, const double gamma = 1.e1) const¶
-
inline BlockMatrixType augmented_lagrangian_matrix(const GlobalVectorType &state, const double gamma = 1.e1) const¶
-
inline Operator augmented_lagrangian_preconditioner(const GlobalVectorType &state, const double gamma = 1.e1) const¶
-
inline std::optional<LocalOperator> local_preconditioner(const FieldId field, const GlobalVectorType &state) const¶
-
inline Operator block_diagonal_preconditioner(const GlobalVectorType &state) const¶
-
inline Operator block_triangular_preconditioner(const GlobalVectorType &state, const bool lower = true) const¶
-
inline FieldVectorType pack(const GlobalVectorType &state) const¶
-
inline void unpack(const FieldVectorType &flat, GlobalVectorType &state) const¶
-
inline void solve_direct(GlobalVectorType &state) const¶
Solve using a freshly materialized matrix and the configured direct backend.
-
inline void solve_with_current_direct(GlobalVectorType &state) const¶
Reuse an explicitly prepared direct factorization.
-
inline void solve(GlobalVectorType &state) const¶
-
using Parameters = LinearAdapterParameters¶