Skip to content
Snippets Groups Projects
Commit 7b1dfa20 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Cleanup

parent 0c5b82ee
Branches
No related tags found
No related merge requests found
......@@ -283,22 +283,15 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
LocalVectorType &ui, int m,
typename Dune::BitSetVector<block_size>::const_reference ignore) {
{
int ignore_component = block_size;
// Special value that indicates nothing should be ignored
int ic =
block_size; // Special value that indicates nothing should be ignored
switch (ignore.count()) {
case 0: // Full problem
break;
case 1: // 1 Dimension is fixed
// Only the X and Y components are allowed to be fixed in this manner
if (ignore[0]) {
ignore_component = 0;
break;
}
if (ignore[1]) {
ignore_component = 1;
break;
}
assert(false);
case 1:
for (ic = 0; ic < block_size; ++ic)
if (ignore[ic])
break;
break;
case block_size: // Ignore the whole node
return;
......@@ -320,8 +313,7 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
assert(localA != nullptr);
auto const phi = problem.phi.restriction(m);
Dune::EllipticEnergy<block_size> localJ(*localA, localb, phi,
ignore_component);
Dune::EllipticEnergy<block_size> localJ(*localA, localb, phi, ic);
Dune::minimise(localJ, ui, localsteps, bisection);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment