1#ifndef DUNE_COPASI_SOLVER_ISTL_FACTORY_INVERSE_HH
2#define DUNE_COPASI_SOLVER_ISTL_FACTORY_INVERSE_HH
8#include <dune/istl/scalarproducts.hh>
9#include <dune/istl/solver.hh>
11#ifdef DUNE_COPASI_DEFAULT_DIRECT_SOLVER
12#define DUNE_COPASI_DEFAULT_LINEAR_INVERSE_OPERATOR DUNE_COPASI_DEFAULT_DIRECT_SOLVER
14#define DUNE_COPASI_DEFAULT_LINEAR_INVERSE_OPERATOR DUNE_COPASI_DEFAULT_ITERATIVE_SOLVER
21template<Concept::LinearOperator Op,
class Alloc = std::allocator<Op>>
22std::shared_ptr<InverseOperator<typename Op::domain_type, typename Op::range_type>>
23makeInverseOperator(
const std::shared_ptr<Op>&
op,
30 if (
config.get(
"verbosity", 1) > 0)
31 spdlog::info(
"Creating linear solver with type '{}'",
type_name);
34 if constexpr (
requires {
op->getCommunication(); })
41 }
else if constexpr (Concept::AssembledLinearOperator<Op>) {
50 if constexpr (Concept::AssembledLinearOperator<Op>)
54 "The key '{}' is not a known inverse operator type.\nPossible iterative "
55 "solvers: {}\nPossible direct solvers: {}",
63template<Concept::LinearOperator Op,
class Alloc = std::allocator<Op>>
64std::shared_ptr<InverseOperator<typename Op::domain_type, typename Op::range_type>>
#define DUNE_COPASI_DEFAULT_LINEAR_INVERSE_OPERATOR
Definition inverse.hh:14
Definition block_jacobi.hh:14
std::shared_ptr< InverseOperator< typename Op::domain_type, typename Op::range_type > > makeInverseOperator(const std::shared_ptr< Op > &op, const ParameterTree &config, const Alloc &alloc=Alloc())
Definition inverse.hh:65
std::shared_ptr< Preconditioner< typename Op::domain_type, typename Op::range_type > > makePreconditioner(const std::shared_ptr< Op > &op, const ParameterTree &config, const Alloc &alloc=Alloc())
Definition preconditioner.hh:121
auto format_exception(Exception &&e, fmt::format_string< Args... > format, Args &&... args)
Definition exceptions.hh:23
constexpr bool is_bitflags_v
Alias for Bitflag indicator.
Definition bit_flags.hh:24