Commit ea1697b4 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Add correct break condition to operator-list assemble method

parent dc0af1a2
...@@ -83,7 +83,7 @@ namespace AMDiS ...@@ -83,7 +83,7 @@ namespace AMDiS
Container& matVec) const Container& matVec) const
{ {
// do not assemble in case nothing to do // do not assemble in case nothing to do
if ((assembled_ && !changing_) || element_.empty()) if ((assembled_ && !changing_) || empty())
return; return;
// create a context for the element // create a context for the element
...@@ -94,26 +94,26 @@ namespace AMDiS ...@@ -94,26 +94,26 @@ namespace AMDiS
for (auto const& op : element_) for (auto const& op : element_)
op.assemble(elementContext, nodes..., matVec); op.assemble(elementContext, nodes..., matVec);
if (!intersection_.empty() || if (intersection_.empty() && (boundary_.empty() || !context.element().hasBoundaryIntersections()))
(!boundary_.empty() && context.element().hasBoundaryIntersections())) return;
// assemble intersection operators
for (auto const& is : intersections(context.gridView(), context.element()))
{ {
for (auto const& is : intersections(context.gridView(), context.element())) // create a context for the intersection
{ ContextGeometry intersectionContext{is,
// create a context for the intersection context.element(), context.geometry()};
ContextGeometry intersectionContext{is,
context.element(), context.geometry()}; if (is.boundary()) {
// assemble boundary operators
if (is.boundary()) { for (auto& data : boundary_) {
// assemble boundary operators if (data.bs(is))
for (auto& data : boundary_) { data.op.assemble(intersectionContext, nodes..., matVec);
if (data.bs(is))
data.op.assemble(intersectionContext, nodes..., matVec);
}
} else {
// assemble intersection operators
for (auto& op : intersection_)
op.assemble(intersectionContext, nodes..., matVec);
} }
} else {
// assemble intersection operators
for (auto& op : intersection_)
op.assemble(intersectionContext, nodes..., matVec);
} }
} }
} }
......
Markdown is supported
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