![]() |
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;
85 using Coefficient = Dune::AutonomousValue<decltype(std::declval<Vector>()[std::declval<typename Basis::MultiIndex>()])>;
93 using Range = std::decay_t<decltype(std::declval<Coefficient>() * std::declval<typename UnaryOperator::Range>())>;
101 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
102 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
111 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
112 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
115 BoundUnaryOperator(const UnaryOperator& unaryOperator, std::shared_ptr<const Vector> coefficients) :
121 static_assert(isOperatorOrSumOperator_v<UnaryOperator>, "The type passed to BoundUnaryOperator is not a operator.");
122 static_assert(UnaryOperator::arity==1, "The operator passed to BoundUnaryOperator is not unary.");
133 using CacheManager = Dune::Fufem::Forms::CacheManager<typename Element::Geometry::ctype, Element::Geometry::mydimension>;
161 LocalOperator(LocalUnaryOperator&& localUnaryOperator, NodeFlags usedNodes, const Basis& basis, std::shared_ptr<const Vector> coefficients, UniqueCacheId cacheId) :
176 LocalOperator(LocalUnaryOperator(other.localUnaryOperator_), other.usedNodes_, other.basis_, other.coefficients_, other.cacheId_)
180 LocalOperator(std::move(other.localUnaryOperator_), other.usedNodes_, other.basis_, other.coefficients_, other.cacheId_)
195 void bind(const Intersection& intersection, const Element& element, const Element& otherElement)
242 Dune::Fufem::Forms::LocalOperators::SumOp::addTo(y, localDoFs_[stencilIndex][localIndex] * value);
321 auto usedNodes = TypeTree::makeTreeContainer(localView.tree(), [](auto&&) { return char(false); });
333 friend LocalFunctionAdaptor<LocalOperator> localFunction(const BoundUnaryOperator& boundUnaryOperator)
344 DUNE_THROW(Dune::NotImplemented, "Evaluation of BoundUnaryOperator in global coordinates is not implemented");
static constexpr IntegralRange< std::decay_t< T > > range(T &&from, U &&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:1166
auto divergence(const FEFunctionOperator< B, TP, argIndex > &op)
Obtain the divergence of an operator.
Definition userfunctions.hh:1076
auto jacobian(const FEFunctionOperator< B, TP, argIndex > &op)
Obtain the jacobian of an operator.
Definition userfunctions.hh:1063
auto grad(const Op &op)
Obtain the gradient of an operator.
Definition userfunctions.hh:1186
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:358
friend LocalOperator localOperator(const BoundUnaryOperator &boundUnaryOperator)
Definition boundunaryoperator.hh:316
friend auto divergence(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:381
std::decay_t< decltype(std::declval< Coefficient >() *std::declval< typename UnaryOperator::Range >())> Range
Definition boundunaryoperator.hh:93
auto treePath() const
Definition boundunaryoperator.hh:311
typename Dune::Functions::GridViewEntitySet< GridView, 0 > EntitySet
Definition boundunaryoperator.hh:87
BoundUnaryOperator(const UnaryOperator &unaryOperator, Vector &&coefficients)
Definition boundunaryoperator.hh:105
const auto & unaryOperator() const
Definition boundunaryoperator.hh:353
friend auto grad(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:375
friend auto gradient(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:369
Dune::AutonomousValue< decltype(std::declval< Vector >()[std::declval< typename Basis::MultiIndex >()])> Coefficient
Definition boundunaryoperator.hh:85
friend auto jacobian(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:363
typename Basis::GridView GridView
Definition boundunaryoperator.hh:86
BoundUnaryOperator(const UnaryOperator &unaryOperator, std::shared_ptr< const Vector > coefficients)
Definition boundunaryoperator.hh:115
typename EntitySet::GlobalCoordinate Domain
Definition boundunaryoperator.hh:88
friend LocalFunctionAdaptor< LocalOperator > localFunction(const BoundUnaryOperator &boundUnaryOperator)
Definition boundunaryoperator.hh:333
const EntitySet & entitySet() const
Get associated set of entities the local-function can be bound to.
Definition boundunaryoperator.hh:348
Range operator()(const Domain &x) const
Evaluate function in global coordinates.
Definition boundunaryoperator.hh:342
typename EntitySet::LocalCoordinate LocalDomain
Definition boundunaryoperator.hh:89
typename EntitySet::Element Element
Definition boundunaryoperator.hh:92
friend auto div(const BoundUnaryOperator &f)
Definition boundunaryoperator.hh:387
BoundUnaryOperator(const UnaryOperator &unaryOperator, const Vector &coefficients)
Definition boundunaryoperator.hh:95
Definition boundunaryoperator.hh:128
void registerOutsideLocalViews(const LV &... lvs)
Definition boundunaryoperator.hh:266
LocalOperator(LocalOperator &&other)
Definition boundunaryoperator.hh:179
void registerCaches(CacheManager &cacheManager)
Definition boundunaryoperator.hh:275
typename BoundUnaryOperator::Range Range
Definition boundunaryoperator.hh:134
void registerOutsideCaches(CacheManager &cacheManager)
Definition boundunaryoperator.hh:281
void bind(const Element &element)
Definition boundunaryoperator.hh:183
LocalOperator(const LocalOperator &other)
Definition boundunaryoperator.hh:175
void bindToCaches(CacheManager &cacheManager, OutsideCacheManager &... outsideCacheManager)
Definition boundunaryoperator.hh:287
typename BoundUnaryOperator::LocalUnaryOperator::Intersection Intersection
Definition boundunaryoperator.hh:132
void registerLocalViews(const LV &... lvs)
Register LocalViews managed outside.
Definition boundunaryoperator.hh:256
LocalOperator(LocalUnaryOperator &&localUnaryOperator, NodeFlags usedNodes, const Basis &basis, std::shared_ptr< const Vector > coefficients, UniqueCacheId cacheId)
Definition boundunaryoperator.hh:161
void unbind()
Unbind the local-function.
Definition boundunaryoperator.hh:215
typename BoundUnaryOperator::Element Element
Definition boundunaryoperator.hh:131
void bind(const Intersection &intersection, const Element &element, const Element &otherElement)
Definition boundunaryoperator.hh:195
auto quadratureRuleKey() const
Definition boundunaryoperator.hh:224
auto operator()(std::size_t index) const
Definition boundunaryoperator.hh:229
Adaptor for turning a Fufem::Forms LocalOperator into a LocalFunction.
Definition localfunctionadaptor.hh:42
static void addTo(K1 &x, const K2 &y)
Definition localoperators.hh:40
Objects of this class are used to uniquely identifies a cache.
Definition shapefunctioncache.hh:569
A class for managing caches of different types.
Definition shapefunctioncache.hh:615
Dune::QuadratureRule< CT, dimension > QuadratureRule
Definition shapefunctioncache.hh:617
size_type registerCache(UniqueCacheId uniqueCacheId, Cache &&cache)
Register a new cache.
Definition shapefunctioncache.hh:753
A simple cache implementation storing values.
Definition shapefunctioncache.hh:808
T forward(T... args)
T resize(T... args)
