diff --git a/dune/solvers/norms/energynorm.hh b/dune/solvers/norms/energynorm.hh index 26b1317558e93d409ca1a9fde40b941a8baf38e7..4726bc65ca63de3a99b1c1aff1f26c0dc535932a 100644 --- a/dune/solvers/norms/energynorm.hh +++ b/dune/solvers/norms/energynorm.hh @@ -66,7 +66,7 @@ return std::sqrt(this->EnergyNorm<OperatorType,VectorType>::normSquared(f)); } - /** \brief Compute the square of the norm of the given vector + // \brief Compute the square of the norm of the given vector virtual field_type normSquared(const VectorType& f) const { if (iterationStep_ == NULL && matrix_ == NULL) @@ -88,7 +88,7 @@ return ret; } - /** \brief Compute the squared norm for a given vector and matrix + // \brief Compute the squared norm for a given vector and matrix DUNE_DEPRECATED static field_type normSquared(const VectorType& u, const OperatorType& A, const double tol=1e-10) diff --git a/dune/solvers/solvers/tcgsolver.hh b/dune/solvers/solvers/tcgsolver.hh index 69d0916b4cbfe1b0f489f5fa805fcc9622b79fb0..ef841a90a2a924bdcfe9a60da87f6f3b810dd1ff 100644 --- a/dune/solvers/solvers/tcgsolver.hh +++ b/dune/solvers/solvers/tcgsolver.hh @@ -34,18 +34,12 @@ class TruncatedCGSolver : public IterativeSolver<VectorType> return std::max(root1, root2); } - /** \brief Computes <a,Mb>, where M is the norm that defines the trust region - \todo This could be implemented without the temporary. - */ + /** \brief Computes <Mb,a>, where M is the norm that defines the trust region */ field_type trustRegionScalarProduct(const VectorType& a, const VectorType& b) const { - if (trustRegionNormMatrix_) { - VectorType tmp(b.size()); - tmp = 0; - trustRegionNormMatrix_->umv(b, tmp); - return a*tmp; - } + if (trustRegionNormMatrix_) + return Arithmetic::Axy(*trustRegionNormMatrix_, b, a); return a*b;