![]() |
Dune-Fufem 2.11-git
|
Loading...
Searching...
No Matches
boundunaryoperator.hh
Go to the documentation of this file.
68 using Tree = typename std::decay_t<decltype(std::get<0>(std::declval<UnaryOperator>().basis()))>::LocalView::Tree;
89 using Coefficient = Dune::AutonomousValue<decltype(std::declval<Vector>()[std::declval<typename Basis::MultiIndex>()])>;
97 using Range = std::decay_t<decltype(MultOp()(std::declval<Coefficient>(), std::declval<typename UnaryOperator::Range>()))>;
105 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
106 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
115 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
116 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
119 BoundUnaryOperator(const UnaryOperator& unaryOperator, std::shared_ptr<const Vector> coefficients) :
125 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
126 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
137 using CacheManager = Dune::Fufem::Forms::CacheManager<typename Element::Geometry::ctype, Element::Geometry::mydimension>;
165 LocalOperator(LocalUnaryOperator&& localUnaryOperator, NodeFlags usedNodes, const Basis& basis, std::shared_ptr<const Vector> coefficients, UniqueCacheId cacheId) :
180 LocalOperator(LocalUnaryOperator(other.localUnaryOperator_), other.usedNodes_, other.basis_, other.coefficients_, other.cacheId_)
184 LocalOperator(std::move(other.localUnaryOperator_), other.usedNodes_, other.basis_, other.coefficients_, other.cacheId_)
199 void bind(const Intersection& intersection, const Element& element, const Element& otherElement)
325 auto usedNodes = TypeTree::makeTreeContainer(localView.tree(), [](auto&&) { return char(false); });
336 friend LocalFunctionAdaptor<LocalOperator> localFunction(const BoundUnaryOperator& boundUnaryOperator)
348 DUNE_THROW(Dune::NotImplemented, "Evaluation of BoundUnaryOperator in global coordinates is not implemented");
static constexpr IntegralRange< T > range(T from, T to) noexcept
typename AutonomousValueType< T >::type AutonomousValue
std::ptrdiff_t index() const
#define DUNE_THROW(E,...)
void forEachLeafNode(Tree &&tree, LeafFunc &&leafFunc)
auto makeTreeContainer(const Tree &tree, LeafToValue &&leafToValue)
std::shared_ptr< T > stackobject_to_shared_ptr(T &t)
constexpr auto get(std::integer_sequence< T, II... >, std::integral_constant< std::size_t, pos >={})
auto gradient(const Op &op)
Obtain the gradient of an operator.
Definition userfunctions.hh:1167
auto divergence(const FEFunctionOperator< B, TP, argIndex > &op)
Obtain the divergence of an operator.
Definition userfunctions.hh:1077
auto jacobian(const FEFunctionOperator< B, TP, argIndex > &op)
Obtain the jacobian of an operator.
Definition userfunctions.hh:1064
auto grad(const Op &op)
Obtain the gradient of an operator.
Definition userfunctions.hh:1187
STL namespace.
Definition baseclass.hh:22
Base class for multilinear operator implementations.
Definition baseclass.hh:73
static constexpr std::size_t arity
Definition baseclass.hh:75
Base class for unary multilinear operator implementations.
Definition baseclass.hh:91
Wrapper binding a linear operator to a coefficient vector.
Definition boundunaryoperator.hh:65
const auto & coefficients() const
Definition boundunaryoperator.hh:362
friend LocalOperator localOperator(const BoundUnaryOperator &boundUnaryOperator)
Definition boundunaryoperator.hh:320
friend auto divergence(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:385
auto treePath() const
Definition boundunaryoperator.hh:315
typename Dune::Functions::GridViewEntitySet< GridView, 0 > EntitySet
Definition boundunaryoperator.hh:91
BoundUnaryOperator(const UnaryOperator &unaryOperator, Vector &&coefficients)
Definition boundunaryoperator.hh:109
const auto & unaryOperator() const
Definition boundunaryoperator.hh:357
friend auto grad(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:379
friend LocalFunctionAdaptor< LocalOperator > localFunction(const BoundUnaryOperator &boundUnaryOperator)
Definition boundunaryoperator.hh:336
friend auto gradient(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:373
Dune::AutonomousValue< decltype(std::declval< Vector >()[std::declval< typename Basis::MultiIndex >()])> Coefficient
Definition boundunaryoperator.hh:89
friend auto jacobian(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:367
typename Basis::GridView GridView
Definition boundunaryoperator.hh:90
BoundUnaryOperator(const UnaryOperator &unaryOperator, std::shared_ptr< const Vector > coefficients)
Definition boundunaryoperator.hh:119
typename EntitySet::GlobalCoordinate Domain
Definition boundunaryoperator.hh:92
const EntitySet & entitySet() const
Get associated set of entities the local-function can be bound to.
Definition boundunaryoperator.hh:352
Range operator()(const Domain &x) const
Evaluate function in global coordinates.
Definition boundunaryoperator.hh:346
typename EntitySet::LocalCoordinate LocalDomain
Definition boundunaryoperator.hh:93
std::decay_t< decltype(MultOp()(std::declval< Coefficient >(), std::declval< typename UnaryOperator::Range >()))> Range
Definition boundunaryoperator.hh:97
typename EntitySet::Element Element
Definition boundunaryoperator.hh:96
friend auto div(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:391
BoundUnaryOperator(const UnaryOperator &unaryOperator, const Vector &coefficients)
Definition boundunaryoperator.hh:99
Definition boundunaryoperator.hh:132
void registerOutsideLocalViews(const LV &... lvs)
Definition boundunaryoperator.hh:270
LocalOperator(LocalOperator &&other)
Definition boundunaryoperator.hh:183
void registerCaches(CacheManager &cacheManager)
Definition boundunaryoperator.hh:279
typename BoundUnaryOperator::Range Range
Definition boundunaryoperator.hh:138
void registerOutsideCaches(CacheManager &cacheManager)
Definition boundunaryoperator.hh:285
void bind(const Element &element)
Definition boundunaryoperator.hh:187
LocalOperator(const LocalOperator &other)
Definition boundunaryoperator.hh:179
void bindToCaches(CacheManager &cacheManager, OutsideCacheManager &... outsideCacheManager)
Definition boundunaryoperator.hh:291
typename BoundUnaryOperator::LocalUnaryOperator::Intersection Intersection
Definition boundunaryoperator.hh:136
void registerLocalViews(const LV &... lvs)
Register LocalViews managed outside.
Definition boundunaryoperator.hh:260
LocalOperator(LocalUnaryOperator &&localUnaryOperator, NodeFlags usedNodes, const Basis &basis, std::shared_ptr< const Vector > coefficients, UniqueCacheId cacheId)
Definition boundunaryoperator.hh:165
void unbind()
Unbind the local-function.
Definition boundunaryoperator.hh:219
typename BoundUnaryOperator::Element Element
Definition boundunaryoperator.hh:135
void bind(const Intersection &intersection, const Element &element, const Element &otherElement)
Definition boundunaryoperator.hh:199
auto quadratureRuleKey() const
Definition boundunaryoperator.hh:228
auto operator()(std::size_t index) const
Definition boundunaryoperator.hh:233
Adaptor for turning a Fufem::Forms LocalOperator into a LocalFunction.
Definition localfunctionadaptor.hh:42
Definition localoperators.hh:46
Definition localoperators.hh:66
static void addTo(K1 &x, const K2 &y)
Definition localoperators.hh:70
Definition localoperators.hh:341
Objects of this class are used to uniquely identifies a cache.
Definition shapefunctioncache.hh:566
A class for managing caches of different types.
Definition shapefunctioncache.hh:612
Dune::QuadratureRule< CT, dimension > QuadratureRule
Definition shapefunctioncache.hh:614
size_type registerCache(UniqueCacheId uniqueCacheId, Cache &&cache)
Register a new cache.
Definition shapefunctioncache.hh:750
A simple cache implementation storing values.
Definition shapefunctioncache.hh:805
T forward(T... args)
T resize(T... args)
