diff --git a/dune/tectonic/ellipticenergy.hh b/dune/tectonic/ellipticenergy.hh index d078f7c7f0795f2e3528b851e1bb97b97ffd4139..68c8e480463ec2f32cf3477c27df4b817538f0f5 100644 --- a/dune/tectonic/ellipticenergy.hh +++ b/dune/tectonic/ellipticenergy.hh @@ -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; diff --git a/dune/tectonic/globalruinanonlinearity.hh b/dune/tectonic/globalruinanonlinearity.hh index 19b3e7dcb2074d323faa00f6b8178bc4d26c74c2..6a2c68c69f0b1feaa414c1cd2b1aa3bc300e45d2 100644 --- a/dune/tectonic/globalruinanonlinearity.hh +++ b/dune/tectonic/globalruinanonlinearity.hh @@ -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>( diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index 1742770e468e6ce94caa5bd278403e58549849c6..caa16bbe08263053b1a5b9e4caa80b8934b020ba 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -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); } }