DUNE PDELab (2.8)
solverfactory.hh
26 using DirectSolverSignature = std::shared_ptr<InverseOperator<X,Y>>(const M&, const ParameterTree&);
32 using PreconditionerSignature = std::shared_ptr<Preconditioner<X,Y>>(const std::shared_ptr<M>&, const ParameterTree&);
34 using PreconditionerFactory = Singleton<ParameterizedObjectFactory<PreconditionerSignature<M,X,Y>>>;
38 using IterativeSolverSignature = std::shared_ptr<InverseOperator<X,Y>>(const std::shared_ptr<LinearOperator<X,Y>>&, const std::shared_ptr<ScalarProduct<X>>&, const std::shared_ptr<Preconditioner<X,Y>>, const ParameterTree&);
40 using IterativeSolverFactory = Singleton<ParameterizedObjectFactory<IterativeSolverSignature<X,Y>>>;
84 std::shared_ptr<Preconditioner> wrapPreconditioner4Parallel(const std::shared_ptr<Preconditioner>& prec,
95 return std::make_shared<BlockPreconditioner<X,Y,C,Preconditioner> >(prec, op->getCommunication());
103 return std::make_shared<NonoverlappingBlockPreconditioner<C,Preconditioner> >(prec, op->getCommunication());
107 std::shared_ptr<ScalarProduct<X>> createScalarProduct(const std::shared_ptr<MatrixAdapter<M,X,Y> >&)
112 std::shared_ptr<ScalarProduct<X>> createScalarProduct(const std::shared_ptr<OverlappingSchwarzOperator<M,X,Y,C> >& op)
118 std::shared_ptr<ScalarProduct<X>> createScalarProduct(const std::shared_ptr<NonoverlappingSchwarzOperator<M,X,Y,C> >& op)
177 result = DirectSolverFactory<matrix_type, Domain, Range>::instance().create(type, *mat, config);
188 prec = PreconditionerFactory<Operator, Domain, Range>::instance().create(prec_type, op, precConfig);
206 return PreconditionerFactory<Operator, Domain, Range>::instance().create(prec_type, op, config);
208 DUNE_THROW(InvalidStateException, "Could not obtain matrix from operator. Please pass in an AssembledLinearOperator.");
Default exception if a function was called while the object is not in a valid state for that function...
Definition: exceptions.hh:279
std::string get(const std::string &key, const std::string &defaultValue) const
get value as string
Definition: parametertree.cc:183
ParameterTree & sub(const std::string &sub)
get substructure by name
Definition: parametertree.cc:101
Base class for matrix free definition of preconditioners.
Definition: preconditioner.hh:30
static DUNE_EXPORT T & instance()
Get the instance of the singleton.
Definition: singleton.hh:68
Factory to assembly solvers configured by a ParameterTree.
Definition: solverfactory.hh:143
static std::shared_ptr< Solver > get(std::shared_ptr< Operator > op, const ParameterTree &config, std::shared_ptr< Preconditioner > prec=nullptr)
get a solver from the factory
Definition: solverfactory.hh:166
static std::shared_ptr< Preconditioner > getPreconditioner(std::shared_ptr< Operator > op, const ParameterTree &config)
Construct a Preconditioner for a given Operator.
Definition: solverfactory.hh:201
Define general, extensible interface for inverse operators.
typename detected_or< Default, Op, Args... >::type detected_or_t
Returns Op<Args...> if that is valid; otherwise returns the fallback type Default.
Definition: type_traits.hh:370
std::shared_ptr< InverseOperator< typename Operator::domain_type, typename Operator::range_type > > getSolverFromFactory(std::shared_ptr< Operator > op, const ParameterTree &config, std::shared_ptr< Preconditioner< typename Operator::domain_type, typename Operator::range_type > > prec=nullptr)
Instantiates an InverseOperator from an Operator and a configuration given as a ParameterTree.
Definition: solverfactory.hh:225
std::shared_ptr< ScalarProduct< X > > createScalarProduct(const Comm &comm, SolverCategory::Category category)
Definition: scalarproducts.hh:240
A hierarchical structure of string parameters.
Useful wrapper for creating singletons.
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23
![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)