![]() |
Dune-Fufem 2.12-git
|
Loading...
Searching...
No Matches
boundunaryoperator.hh
Go to the documentation of this file.
59 using Tree = typename std::decay_t<decltype(std::get<0>(std::declval<UnaryOperator>().basis()))>::LocalView::Tree;
80 using Coefficient = Dune::AutonomousValue<decltype(std::declval<Vector>()[std::declval<typename Basis::MultiIndex>()])>;
88 using Range = std::decay_t<decltype(MultOp()(std::declval<Coefficient>(), std::declval<typename UnaryOperator::Range>()))>;
96 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
97 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
106 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
107 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
110 BoundUnaryOperator(const UnaryOperator& unaryOperator, std::shared_ptr<const Vector> coefficients) :
116 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
117 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
128 using CacheManager = Dune::Fufem::Forms::CacheManager<typename Element::Geometry::ctype, Element::Geometry::mydimension>;
156 LocalOperator(LocalUnaryOperator&& localUnaryOperator, NodeFlags usedNodes, const Basis& basis, std::shared_ptr<const Vector> coefficients, UniqueCacheId cacheId) :
171 LocalOperator(LocalUnaryOperator(other.localUnaryOperator_), other.usedNodes_, other.basis_, other.coefficients_, other.cacheId_)
175 LocalOperator(std::move(other.localUnaryOperator_), other.usedNodes_, other.basis_, other.coefficients_, other.cacheId_)
190 void bind(const Intersection& intersection, const Element& element, const Element& otherElement)
316 auto usedNodes = TypeTree::makeTreeContainer(localView.tree(), [](auto&&) { return char(false); });
324 return LocalOperator(localOperator(boundUnaryOperator.unaryOperator_), usedNodes, rootBasis, boundUnaryOperator.coefficients_, boundUnaryOperator.cacheId_);
327 friend LocalFunctionAdaptor<LocalOperator> localFunction(const BoundUnaryOperator& boundUnaryOperator)
339 DUNE_THROW(Dune::NotImplemented, "Evaluation of BoundUnaryOperator in global coordinates is not implemented");
360 static_assert(isOperator_v<UnaryOperator>, "jacobian(BoundUnaryOperator<SumOperator<...>,V>(...)) is not implemented.");
366 static_assert(isOperator_v<UnaryOperator>, "gradient(BoundUnaryOperator<SumOperator<...>,V>(...)) is not implemented.");
372 static_assert(isOperator_v<UnaryOperator>, "grad(BoundUnaryOperator<SumOperator<...>,V>(...)) is not implemented.");
378 static_assert(isOperator_v<UnaryOperator>, "divergence(BoundUnaryOperator<SumOperator<...>,V>(...)) is not implemented.");
384 static_assert(isOperator_v<UnaryOperator>, "div(BoundUnaryOperator<SumOperator<...>,V>(...)) 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 >={})
Definition boundunaryoperator.hh:123
void registerOutsideLocalViews(const LV &... lvs)
Definition boundunaryoperator.hh:261
LocalOperator(LocalOperator &&other)
Definition boundunaryoperator.hh:174
void registerCaches(CacheManager &cacheManager)
Definition boundunaryoperator.hh:270
typename BoundUnaryOperator::Range Range
Definition boundunaryoperator.hh:129
void registerOutsideCaches(CacheManager &cacheManager)
Definition boundunaryoperator.hh:276
void bind(const Element &element)
Definition boundunaryoperator.hh:178
LocalOperator(const LocalOperator &other)
Definition boundunaryoperator.hh:170
void bindToCaches(CacheManager &cacheManager, OutsideCacheManager &... outsideCacheManager)
Definition boundunaryoperator.hh:282
typename BoundUnaryOperator::LocalUnaryOperator::Intersection Intersection
Definition boundunaryoperator.hh:127
void registerLocalViews(const LV &... lvs)
Register LocalViews managed outside.
Definition boundunaryoperator.hh:251
LocalOperator(LocalUnaryOperator &&localUnaryOperator, NodeFlags usedNodes, const Basis &basis, std::shared_ptr< const Vector > coefficients, UniqueCacheId cacheId)
Definition boundunaryoperator.hh:156
void unbind()
Unbind the local-function.
Definition boundunaryoperator.hh:210
typename BoundUnaryOperator::Element Element
Definition boundunaryoperator.hh:126
void bind(const Intersection &intersection, const Element &element, const Element &otherElement)
Definition boundunaryoperator.hh:190
auto quadratureRuleKey() const
Definition boundunaryoperator.hh:219
auto operator()(std::size_t index) const
Definition boundunaryoperator.hh:224
Wrapper binding a linear operator to a coefficient vector.
Definition boundunaryoperator.hh:56
const auto & coefficients() const
Definition boundunaryoperator.hh:353
friend LocalOperator localOperator(const BoundUnaryOperator &boundUnaryOperator)
Definition boundunaryoperator.hh:311
friend auto divergence(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:376
auto treePath() const
Definition boundunaryoperator.hh:306
typename Dune::Functions::GridViewEntitySet< GridView, 0 > EntitySet
Definition boundunaryoperator.hh:82
BoundUnaryOperator(const UnaryOperator &unaryOperator, Vector &&coefficients)
Definition boundunaryoperator.hh:100
const auto & unaryOperator() const
Definition boundunaryoperator.hh:348
friend auto grad(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:370
friend LocalFunctionAdaptor< LocalOperator > localFunction(const BoundUnaryOperator &boundUnaryOperator)
Definition boundunaryoperator.hh:327
friend auto gradient(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:364
Dune::AutonomousValue< decltype(std::declval< Vector >()[std::declval< typename Basis::MultiIndex >()])> Coefficient
Definition boundunaryoperator.hh:80
friend auto jacobian(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:358
typename Basis::GridView GridView
Definition boundunaryoperator.hh:81
BoundUnaryOperator(const UnaryOperator &unaryOperator, std::shared_ptr< const Vector > coefficients)
Definition boundunaryoperator.hh:110
typename EntitySet::GlobalCoordinate Domain
Definition boundunaryoperator.hh:83
const EntitySet & entitySet() const
Get associated set of entities the local-function can be bound to.
Definition boundunaryoperator.hh:343
Range operator()(const Domain &x) const
Evaluate function in global coordinates.
Definition boundunaryoperator.hh:337
typename EntitySet::LocalCoordinate LocalDomain
Definition boundunaryoperator.hh:84
std::decay_t< decltype(MultOp()(std::declval< Coefficient >(), std::declval< typename UnaryOperator::Range >()))> Range
Definition boundunaryoperator.hh:88
typename EntitySet::Element Element
Definition boundunaryoperator.hh:87
friend auto div(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:382
BoundUnaryOperator(const UnaryOperator &unaryOperator, const Vector &coefficients)
Definition boundunaryoperator.hh:90
A class for managing caches of different types.
Definition shapefunctioncache.hh:609
Dune::QuadratureRule< CT, dimension > QuadratureRule
Definition shapefunctioncache.hh:611
size_type registerCache(UniqueCacheId uniqueCacheId, Cache &&cache)
Register a new cache.
Definition shapefunctioncache.hh:747
Adaptor for turning a Fufem::Forms LocalOperator into a LocalFunction.
Definition localfunctionadaptor.hh:42
Base class for multilinear operator implementations.
Definition baseclass.hh:73
static constexpr std::size_t arity
Definition baseclass.hh:75
A simple cache implementation storing values.
Definition shapefunctioncache.hh:802
Base class for unary multilinear operator implementations.
Definition baseclass.hh:91
Objects of this class are used to uniquely identifies a cache.
Definition shapefunctioncache.hh:563
T forward(T... args)
auto gradient(const Op &op)
Obtain the gradient of an operator.
Definition userfunctions.hh:1161
auto divergence(const FEFunctionOperator< B, TP, argIndex > &op)
Obtain the divergence of an operator.
Definition userfunctions.hh:1071
auto jacobian(const FEFunctionOperator< B, TP, argIndex > &op)
Obtain the jacobian of an operator.
Definition userfunctions.hh:1058
auto grad(const Op &op)
Obtain the gradient of an operator.
Definition userfunctions.hh:1181
Definition baseclass.hh:22
STL namespace.
T resize(T... args)
Definition localoperators.hh:46
Definition localoperators.hh:397
Definition localoperators.hh:66
static void addTo(K1 &x, const K2 &y)
Definition localoperators.hh:70
