Commit 0786af59 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Intel compiler problems with variadic arguments

parent ce0fece2
...@@ -60,14 +60,22 @@ namespace AMDiS ...@@ -60,14 +60,22 @@ namespace AMDiS
bool asmMatrix, bool asmVector) const; bool asmMatrix, bool asmVector) const;
template <class ElementContainer, class Container, class Operators, class Geometry, class... Bases> template <class ElementContainer, class Container, class Operators, class Geometry, class Basis>
void assembleElementOperators( void assembleElementOperators(
ElementContainer& elementContainer, ElementContainer& elementContainer,
Container& container, Container& container,
Operators& operators, Operators& operators,
Geometry const& geometry, Geometry const& geometry,
Bases const&... subBases) const; Basis const& subBasis) const;
template <class ElementContainer, class Container, class Operators, class Geometry, class RowBasis, class ColBasis>
void assembleElementOperators(
ElementContainer& elementContainer,
Container& container,
Operators& operators,
Geometry const& geometry,
RowBasis const& rowBasis,
ColBasis const& colBasis) const;
/// Finish insertion into the matrix and assembles boundary conditions /// Finish insertion into the matrix and assembles boundary conditions
/// Return the number of nonzeros assembled into the matrix /// Return the number of nonzeros assembled into the matrix
......
...@@ -93,24 +93,65 @@ void Assembler<Traits>::assemble( ...@@ -93,24 +93,65 @@ void Assembler<Traits>::assemble(
} }
template <class Traits>
template <class ElementContainer, class Container, class Operators, class Geometry, class LocalView>
void Assembler<Traits>::assembleElementOperators(
ElementContainer& elementContainer,
Container& container,
Operators& operators,
Geometry const& geometry,
LocalView const& localView) const
{
auto const& element = getElement(localView);
auto const& gridView = getGridView(localView);
bool add = false;
auto assemble_operators = [&](auto const& context, auto& operator_list) {
for (auto scaled : operator_list) {
scaled.op->bind(element, geometry);
bool add_op = scaled.op->assemble(context, elementContainer, localView.tree());
scaled.op->unbind();
add = add || add_op;
}
};
// assemble element operators
assemble_operators(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())
assemble_operators(intersection, operators.boundary);
else
assemble_operators(intersection, operators.intersection);
}
}
}
template <class Traits> template <class Traits>
template <class ElementContainer, class Container, class Operators, class Geometry, class... LocalViews> template <class ElementContainer, class Container, class Operators, class Geometry, class RowLocalViews, class ColLocalView>
void Assembler<Traits>::assembleElementOperators( void Assembler<Traits>::assembleElementOperators(
ElementContainer& elementContainer, ElementContainer& elementContainer,
Container& container, Container& container,
Operators& operators, Operators& operators,
Geometry const& geometry, Geometry const& geometry,
LocalViews const&... localViews) const RowLocalViews const& rowLocalView, ColLocalView const& colLocalView) const
{ {
auto const& element = getElement(localViews...); auto const& element = getElement(rowLocalView, colLocalView);
auto const& gridView = getGridView(localViews...); auto const& gridView = getGridView(rowLocalView, colLocalView);
bool add = false; bool add = false;
auto assemble_operators = [&](auto const& context, auto& operator_list) { auto assemble_operators = [&](auto const& context, auto& operator_list) {
for (auto scaled : operator_list) { for (auto scaled : operator_list) {
scaled.op->bind(element, geometry); scaled.op->bind(element, geometry);
bool add_op = scaled.op->assemble(context, elementContainer, localViews.tree()...); bool add_op = scaled.op->assemble(context, elementContainer, rowLocalView.tree(), colLocalView.tree());
scaled.op->unbind(); scaled.op->unbind();
add = add || add_op; add = add || add_op;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment