diff --git a/dune/stuff/common/print.hh b/dune/stuff/common/print.hh index a41d71a8c0fb5e236340052b0e30fc6934e40344..e76088029b42489d2935aefc5a0f59cf629f4f77 100644 --- a/dune/stuff/common/print.hh +++ b/dune/stuff/common/print.hh @@ -24,10 +24,8 @@ // dune-stuff #include <dune/stuff/common/parameter/configcontainer.hh> -#include <dune/stuff/fem/functions/checks.hh> #include <dune/stuff/common/filesystem.hh> #include <dune/stuff/common/string.hh> -//#include <dune/istl/bcrsmatrix.hh> namespace Dune { namespace Stuff { @@ -446,23 +444,6 @@ private: const std::string name_; }; -#ifdef HAVE_DUNE_FEM -/** print min/max of a given DiscreteFucntion obtained by Stuff::getMinMaxOfDiscreteFunction - * \note hardcoded mult of values by sqrt(2) - **/ -template <class Function> -void printFunctionMinMax(std::ostream& stream, const Function& func) -{ - double min = 0.0; - double max = 0.0; - - Dune::Stuff::Fem::getMinMaxOfDiscreteFunction(func, min, max); - stream << " - " << func.name() << std::endl - << " min: " << std::sqrt(2.0) * min << std::endl - << " max: " << std::sqrt(2.0) * max << std::endl; -} // printFunctionMinMax -#endif // HAVE_DUNE_FEM - //! useful for visualizing sparsity patterns of matrices template <class Matrix> void matrixToGnuplotStream(const Matrix& matrix, std::ostream& stream) diff --git a/dune/stuff/common/vector.hh b/dune/stuff/common/vector.hh index fbae73cf3f69e0938592a8c1fb5375123eb3167e..26cfa4268dbe8cbbaad606fff1519a25704f044b 100644 --- a/dune/stuff/common/vector.hh +++ b/dune/stuff/common/vector.hh @@ -7,7 +7,8 @@ #include <dune/common/dynvector.hh> #include <dune/common/fvector.hh> #include <dune/common/deprecated.hh> -#include <dune/common/float_cmp.hh> + +#include "float_cmp.hh" namespace Dune { namespace Stuff { @@ -26,12 +27,10 @@ void clear(Dune::DenseVector<VectorImp>& vector) * Applies Dune::FloatCmp::eq() componentwise. */ template <class Field, int size> -bool float_cmp(const Dune::FieldVector<Field, size>& x, const Dune::FieldVector<Field, size>& y, const Field tol) +bool DUNE_DEPRECATED_MSG("Use Dune::Stuff::Common::FloatCMP::eq() instead!") + float_cmp(const Dune::FieldVector<Field, size>& x, const Dune::FieldVector<Field, size>& y, const Field tol) { - size_t failure = 0; - for (size_t ii = 0; ii < size; ++ii) - failure += Dune::FloatCmp::eq(x[ii], y[ii], tol); - return !bool(failure); + return FloatCmp::eq(x, y, tol); } template <class T>