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