Assembler.hpp 842 Bytes
Newer Older
1
2
3
4
#pragma once

namespace AMDiS
{
5
6
7
8
9
10
  template <class GridView, class Element, class Operators, class ElementAssembler>
  void assembleOperators(
      GridView const& gridView,
      Element const& element,
      Operators& operators,
      ElementAssembler const& localAssembler)
11
  {
12
    // assemble element operators
Praetorius, Simon's avatar
Praetorius, Simon committed
13
    localAssembler(element, operators.onElement());
14
15

    // assemble intersection operators
Praetorius, Simon's avatar
Praetorius, Simon committed
16
17
    if (!operators.onIntersection().empty()
        || (!operators.onBoundary().empty() && element.hasBoundaryIntersections()))
18
19
20
    {
      for (auto const& intersection : intersections(gridView, element)) {
        if (intersection.boundary())
Praetorius, Simon's avatar
Praetorius, Simon committed
21
          localAssembler(intersection, operators.onBoundary());
22
        else
Praetorius, Simon's avatar
Praetorius, Simon committed
23
          localAssembler(intersection, operators.onIntersection());
24
25
26
      }
    }
  }
27
28

} // end namespace AMDiS