5#include <amdis/GridFunctionOperator.hpp>
6#include <amdis/common/StaticSize.hpp>
7#include <amdis/utility/LocalToGlobalAdapter.hpp>
35 template <
class CG,
class Node,
class Quad,
class LocalFct,
class Vec>
36 void assemble(CG
const& contextGeo, Node
const& node, Quad
const& quad,
37 LocalFct
const& localFct, Vec& elementVector)
const
39 static_assert(static_size_v<typename LocalFct::Range> == 1,
"Expression must be of scalar type." );
40 static_assert(Node::isLeaf,
"Operator can be applied to Leaf-Nodes only.");
44 for (
auto const& qp : quad) {
46 decltype(
auto) local = contextGeo.coordinateInElement(qp.position());
49 auto dx = contextGeo.integrationElement(qp.position()) * qp.weight();
50 dx *= localFct(local);
53 auto const& partial = localBasis.
partialsAt(local, comp_);
55 for (std::size_t j = 0; j < localBasis.
size(); ++j) {
56 const auto local_j = node.localIndex(j);
57 elementVector[local_j] += dx * partial[j];
66 static constexpr int degree = 1;
first-order operator
Definition: FirstOrderPartialTest.hpp:27
Convert a simple (scalar) local basis into a global basis.
Definition: LocalToGlobalAdapter.hpp:65
auto const & partialsAt(typename Traits::DomainLocal const &x, std::size_t comp) const
Definition: LocalToGlobalAdapter.hpp:175
std::size_t size() const
Return the number of local basis functions.
Definition: LocalToGlobalAdapter.hpp:96
Registry to specify a tag for each implementation type.
Definition: GridFunctionOperator.hpp:216
Definition: FirstOrderPartialTest.hpp:19