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

[Cleanup] Kill an assertion (the code was buggy, too)

parent d5a6e945
No related branches found
No related tags found
No related merge requests found
......@@ -170,26 +170,6 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
// -grad is needed for Newton step
linearization.b *= -1.0;
// b should be a descent direction
{
VectorType const direction = linearization.b;
VectorType tmp = linearization.b; // b
Arithmetic::addProduct(tmp, -1.0, linearization.A, u); // b-Au
double const localA = tmp * direction; // <b-Au,v>
linearization.A.mv(direction, tmp); // Av
double const localb = tmp * direction; // <Av,v>
MyDirectionalConvexFunction<
Dune::GlobalNonlinearity<MatrixType, VectorType>> const
psi(localA, localb, problem.phi, u, direction);
Interval<double> D;
psi.subDiff(0, D);
if (!isnan(D[1]))
assert(D[1] <= 0);
}
// apply truncation to stiffness matrix and rhs
for (size_t row = 0; row < linearization.A.N(); ++row) {
auto const col_end = linearization.A[row].end();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment