Dune::Copasi
Loading...
Searching...
No Matches
functor_factory.hh
Go to the documentation of this file.
1#ifndef DUNE_COPASI_MODEL_LOCAL_EQUATIONS_FUNCTOR_FACTORY_HH
2#define DUNE_COPASI_MODEL_LOCAL_EQUATIONS_FUNCTOR_FACTORY_HH
3
4#include <dune-copasi-config.hh>
5
6#include <dune/common/fmatrix.hh>
7#include <dune/common/fvector.hh>
8#include <dune/common/parametertree.hh>
9
10#include <function2/function2.hpp>
11
12#include <functional>
13#include <string>
14
15namespace Dune::Copasi {
16
17template<std::size_t dim>
18struct LocalDomain;
19
20// the owner of the resulting function must hold the local equations for the lifetime of created
21// functors
22template<std::size_t dim>
24{
25public:
29
30 using ScalarFunctor = fu2::unique_function<Scalar() const noexcept>;
31 using VectorFunctor = fu2::unique_function<Vector() const noexcept>;
33
37
40
42
43 // ---------------------------------------------------------------------------
44 // Defines the interface for making functors that can be evaluated
45 // ---------------------------------------------------------------------------
48 const LocalDomain<dim>&,
49 int /*codim*/ = 0) const = 0;
50
53 const LocalDomain<dim>&,
54 int /*codim*/ = 0) const = 0;
55
58 const LocalDomain<dim>&,
59 int /*codim*/ = 0) const = 0;
60};
61
62} // namespace Dune::Copasi
63
64#endif // DUNE_COPASI_MODEL_LOCAL_EQUATIONS_FUNCTOR_FACTORY_HH
Definition functor_factory.hh:24
virtual TensorApplyFunctor make_tensor_apply(std::string_view, const ParameterTree &, const LocalDomain< dim > &, int=0) const =0
FieldVector< double, dim > Vector
Definition functor_factory.hh:27
FieldMatrix< double, dim, dim > Tensor
Definition functor_factory.hh:28
fu2::unique_function< Vector(Vector) const noexcept > TensorApplyFunctor
Definition functor_factory.hh:32
FieldVector< double, 1 > Scalar
Definition functor_factory.hh:26
fu2::unique_function< Vector() const noexcept > VectorFunctor
Definition functor_factory.hh:31
virtual VectorFunctor make_vector(std::string_view, const ParameterTree &, const LocalDomain< dim > &, int=0) const =0
fu2::unique_function< Scalar() const noexcept > ScalarFunctor
Definition functor_factory.hh:30
virtual ScalarFunctor make_scalar(std::string_view, const ParameterTree &, const LocalDomain< dim > &, int=0) const =0
Definition axis_names.hh:7
constexpr bool is_bitflags_v
Alias for Bitflag indicator.
Definition bit_flags.hh:24
Definition local_domain.hh:15