for (const auto q : fe_values.quadrature_point_indices())
{
deallog << scalar_values[q] << std::endl;
- Assert((scalar_values[q] - vector_values[q][c]).norm() <=
- 1e-12 * scalar_values[q].norm(),
- ExcInternalError());
+ const auto norm = (scalar_values[q] - vector_values[q][c]).norm();
+ const auto tolerance =
+ std::max(1.e-11, 1.e-12 * scalar_values[q].norm());
+ Assert(norm <= tolerance, ExcInternalError());
}
}
}
deallog << scalar_values[q][d][e]
<< (d < dim - 1 || e < dim - 1 ? " " : "");
deallog << std::endl;
- Assert((scalar_values[q] - vector_values[q][c]).norm() <=
- 1e-12 * scalar_values[q].norm(),
- ExcInternalError());
+ const auto norm = (scalar_values[q] - vector_values[q][c]).norm();
+ const auto tolerance =
+ std::max(1.e-11, 1.e-12 * scalar_values[q].norm());
+ Assert(norm <= tolerance, ExcInternalError());
}
}
}
for (unsigned int d = 0; d < dim; ++d)
{
deallog << selected_vector_values[q][d] << std::endl;
- Assert((selected_vector_values[q][d] - vector_values[q][c + d])
- .norm() <= 1e-12 * selected_vector_values[q][d].norm(),
- ExcInternalError());
+ const auto norm =
+ (selected_vector_values[q][d] - vector_values[q][c + d]).norm();
+ const auto tolerance =
+ std::max(1.e-11, 1.e-12 * selected_vector_values[q][d].norm());
+ Assert(norm <= tolerance, ExcInternalError());
}
}
}
for (unsigned int f = 0; f < dim; ++f)
deallog << selected_vector_values[q][d][e][f] << ' ';
deallog << std::endl;
- Assert((selected_vector_values[q][d] - vector_values[q][c + d])
- .norm() <= 1e-12 * selected_vector_values[q][d].norm(),
- ExcInternalError());
+ const auto norm =
+ (selected_vector_values[q][d] - vector_values[q][c + d]).norm();
+ const auto tolerance =
+ std::max(1.e-11, 1.e-12 * selected_vector_values[q][d].norm());
+ Assert(norm <= tolerance, ExcInternalError());
}
}
}