DUNE-FEM (unstable)
solverfactory.hh
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
31 using PreconditionerSignature = std::shared_ptr<Preconditioner<typename OP::domain_type,typename OP::range_type>>(const std::shared_ptr<OP>&, const ParameterTree&);
33 using PreconditionerFactory = Singleton<ParameterizedObjectFactory<PreconditionerSignature<OP>>>;
37 using SolverSignature = std::shared_ptr<InverseOperator<typename OP::domain_type,typename OP::range_type>>(const std::shared_ptr<OP>&, const ParameterTree&);
64 DUNE_THROW(NoAssembledOperator, "Failed to cast to AssembledLinearOperator. Please pass in an AssembledLinearOperator.");
67 static const comm_type& getCommOrThrow(std::shared_ptr<LinearOperator<domain_type, range_type>> op){
73 DUNE_THROW(NoAssembledOperator, "Could not obtain communication object from operator. Please pass in a parallel operator.");
77 static std::shared_ptr<ScalarProduct<domain_type>> getScalarProduct(std::shared_ptr<LinearOperator<domain_type, range_type>> op)
152 std::shared_ptr<Preconditioner<typename Operator::domain_type, typename Operator::range_type>> prec = nullptr)
181 typename Operator::range_type>> prec = PreconditionerFactory<Operator>::instance().create(prec_type, op, config);
185 if(op->category() == SolverCategory::overlapping && prec->category() == SolverCategory::sequential)
187 else if(op->category() == SolverCategory::nonoverlapping && prec->category() == SolverCategory::sequential)
188 return std::make_shared<NonoverlappingBlockPreconditioner<Comm, Preconditioner<Domain, Range>> >(prec, comm);
Nonoverlapping parallel preconditioner.
Definition: novlpschwarz.hh:276
std::string get(const std::string &key, const std::string &defaultValue) const
get value as string
Definition: parametertree.cc:188
ParameterTree & sub(const std::string &sub)
get substructure by name
Definition: parametertree.cc:106
Base class for matrix free definition of preconditioners.
Definition: preconditioner.hh:33
static DUNE_EXPORT T & instance()
Get the instance of the singleton.
Definition: singleton.hh:70
A hierarchical structure of string parameters.
Useful wrapper for creating singletons.
std::shared_ptr< Preconditioner< typename Operator::domain_type, typename Operator::range_type > > getPreconditionerFromFactory(std::shared_ptr< Operator > op, const ParameterTree &config)
Construct a Preconditioner for a given Operator.
Definition: solverfactory.hh:175
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:151
Define general, extensible interface for inverse operators.
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:25
@ nonoverlapping
Category for non-overlapping solvers.
Definition: solvercategory.hh:27
@ overlapping
Category for overlapping solvers.
Definition: solvercategory.hh:29
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 21, 23:30, 2024)