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

Cleanup

parent 3df076f6
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,8 @@ template <int dim> class EllipticEnergy {
double operator()(SmallVector const &v) const {
SmallVector y(0);
Arithmetic::addProduct(y, 0.5, A, v);
y -= b; // 1/2 Av - b
return y * v + (*phi)(v); // <1/2 Av - b,v> + H(|v|)
y -= b;
return y * v + (*phi)(v);
}
SmallMatrix const &A;
......
......@@ -29,7 +29,7 @@ class GlobalRuinaNonlinearity
auto trivialNonlinearity = make_shared<LocalFriction<dim> const>(
make_shared<TrivialFunction const>());
for (size_t i = 0; i < restrictions.size(); ++i) {
restrictions[i] = nodalIntegrals[i] == 0
restrictions[i] = (nodalIntegrals[i] == 0)
? trivialNonlinearity
: make_shared<LocalFriction<dim> const>(
make_shared<FrictionPotential const>(
......
......@@ -315,15 +315,13 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
if (j == m)
localA = &(*it); // localA = A[m][m]
else
Arithmetic::addProduct(localb, -1.0, *it, u[j]); // b-Au
Arithmetic::addProduct(localb, -1.0, *it, u[j]);
}
assert(localA != nullptr);
auto const phi = problem.phi.restriction(m);
Dune::EllipticEnergy<block_size> localJ(*localA, localb, phi,
ignore_component);
LocalVectorType correction;
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