7 #include <dune/common/shared_ptr.hh> 8 #include <dune/geometry/quadraturerules.hh> 10 #include <amdis/ContextGeometry.hpp> 11 #include <amdis/AssemblerInterface.hpp> 12 #include <amdis/common/Concepts.hpp> 13 #include <amdis/typetree/FiniteElementType.hpp> 21 template <
class Traits,
class Operator,
class... Nodes>
27 using LocalContext =
typename Traits::LocalContext;
30 using ElementContainer =
typename Traits::ElementContainer;
36 : op_(
Dune::wrap_or_move(op))
41 : op_(
Dune::wrap_or_move(
std::move(op)))
45 explicit Assembler(std::reference_wrapper<Operator> op)
46 : op_(
Dune::wrap_or_move(op.get()))
79 void assemble(LocalContext
const& localContext, Nodes
const&... nodes,
80 ElementContainer& ElementContainer)
final 83 assembleImpl(contextGeo, nodes..., ElementContainer);
92 template <
class CG,
class RN,
class CN,
class Mat>
93 void assembleImpl(CG
const& contextGeo, RN
const& rowNode, CN
const& colNode, Mat& elementMatrix)
95 op_->calculateElementMatrix(contextGeo, rowNode, colNode, elementMatrix);
99 template <
class CG,
class Node,
class Vec>
100 void assembleImpl(CG
const& contextGeo, Node
const& node, Vec& elementVector)
102 op_->calculateElementVector(contextGeo, node, elementVector);
127 std::shared_ptr<Operator> op_;
129 Element
const* element_ =
nullptr;
130 Geometry
const* geometry_ =
nullptr;
135 template <
class Traits,
class Operator,
class... Nodes>
typename Element::Geometry Geometry
The geometry of the Element.
Definition: AssemblerInterface.hpp:30
Implementation of interface AssemblerBase.
Definition: Assembler.hpp:22
Definition: AdaptiveGrid.hpp:373
void assemble(LocalContext const &localContext, Nodes const &... nodes, ElementContainer &ElementContainer) final
Implementation of AssemblerBase::assemble.
Definition: Assembler.hpp:79
Definition: FieldMatVec.hpp:12
Geometry const & geometry() const
return the geometry of the bound element
Definition: Assembler.hpp:117
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
auto makeAssembler(Operator &&op, Nodes const &...)
Generate a Assembler on a given LocalContext LC (element or intersection)
Definition: Assembler.hpp:136
Assembler(std::reference_wrapper< Operator > op)
Constructor. Stores the reference to the operator.
Definition: Assembler.hpp:45
Abstract base-class of a Assembler.
Definition: AssemblerInterface.hpp:21
Wrapper class for element and geometry.
Definition: ContextGeometry.hpp:43
Element const & element() const
return the bound entity (of codim 0)
Definition: Assembler.hpp:110
void unbind() final
Implementation of AssemblerBase::unbind.
Definition: Assembler.hpp:66
Assembler(Operator const &op)
Constructor. Stores a copy of operator op.
Definition: Assembler.hpp:35
void bind(Element const &element, Geometry const &geometry) final
Implementation of AssemblerInterface::bind.
Definition: Assembler.hpp:54
Assembler(Operator &&op)
Constructor. Stores a copy of operator op.
Definition: Assembler.hpp:40
typename ContextType::Entity Element
The codim=0 grid entity.
Definition: AssemblerInterface.hpp:28