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

tcgsolver.hh: Use Axy()

[[Imported from SVN: r12100]]
parent 03b85de8
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment