diff --git a/src/amdis/gridfunctions/DiscreteFunction.inc.hpp b/src/amdis/gridfunctions/DiscreteFunction.inc.hpp index 4f4af74e56efca33a48e856f369fd0194ab0994d..7ae9396dc6aa347e494321033aee9d76dbe7f97c 100644 --- a/src/amdis/gridfunctions/DiscreteFunction.inc.hpp +++ b/src/amdis/gridfunctions/DiscreteFunction.inc.hpp @@ -367,41 +367,6 @@ public: return dy; } - -private: - template <class T, class J, class RG> - void test_partial(std::vector<T> const& partial, std::size_t comp, J const& jacobian, RG const& referenceGradients) const - { - for (std::size_t i = 0; i < referenceGradients.size(); ++i) { // J^(-T) * D[phi] -> grad^T - auto grad = jacobian * Dune::MatVec::as_vector(referenceGradients[i]); - auto grad_ = Dune::Functions::flatVectorView(grad); - - if (std::abs(grad_[comp] - partial[i]) > 1.e-10) { - print_error(partial[i], comp, grad, jacobian, referenceGradients[i][0]); - error_exit("wrong partial derivatives"); - } - } - } - - template <class T, class G, class J, class RG> - void print_error(T const& partial_i, std::size_t comp, G const& grad_i, J const& jacobian, RG const& referenceGradient) const - { - msg(__PRETTY_FUNCTION__); - msg("jacobian = {}", jacobian); - auto&& jacobian_mat = Dune::MatVec::as_matrix(jacobian); - msg("jacobian_ = ["); - for (std::size_t i = 0; i < jacobian_mat.N(); ++i) { - for (std::size_t j = 0; j < jacobian_mat.M(); ++j) { - msg_("{} ",jacobian_mat[i][j]); - } - msg(";"); - } - msg("]"); - - msg("ref-grad = {}", referenceGradient); - auto grad_ = Dune::Functions::flatVectorView(grad_i); - msg("comp = {}, grad_ = ({}, {}), partial = {}", comp, grad_[0], grad_[1], partial_i); - } };