Assembler.hpp 822 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
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    // assemble element operators
    localAssembler(element, operators.element);

    // assemble intersection operators
    if (!operators.intersection.empty()
        || (!operators.boundary.empty() && element.hasBoundaryIntersections()))
    {
      for (auto const& intersection : intersections(gridView, element)) {
        if (intersection.boundary())
          localAssembler(intersection, operators.boundary);
        else
          localAssembler(intersection, operators.intersection);
      }
    }
  }
27
28

} // end namespace AMDiS