/usr/include/dune/pdelab/backend/solver.hh is in libdune-pdelab-dev 2.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=8 sw=2 sts=2:
#ifndef DUNE_PDELAB_BACKEND_SOLVER_HH
#define DUNE_PDELAB_BACKEND_SOLVER_HH
#include <dune/common/fvector.hh>
#include <dune/pdelab/backend/istl/utility.hh>
namespace Dune {
namespace PDELab {
//! \addtogroup Backend
//! \ingroup PDELab
//! \{
struct SequentialNorm
{/*! \brief compute global norm of a vector
\param[in] v the given vector
*/
template<class V>
typename Dune::template FieldTraits<typename V::ElementType >::real_type norm(const V& v) const
{
return istl::raw(v).two_norm();
}
};
// Status information of a linear solver
template<class RFType>
struct LinearSolverResult
{
bool converged; // Solver converged
unsigned int iterations; // number of iterations
double elapsed; // total user time in seconds
RFType reduction; // defect reduction
RFType conv_rate; // convergence rate (average reduction per step)
LinearSolverResult() :
converged(false), iterations(0), elapsed(0.0), reduction(0.0), conv_rate(0.0) {}
};
class LinearResultStorage
{
public:
/*! \brief Return access to result data */
const Dune::PDELab::LinearSolverResult<double>& result() const
{
return res;
}
protected:
Dune::PDELab::LinearSolverResult<double> res;
};
//! \} group Backend
} // end namespace PDELab
} // end namespace Dune
#endif // DUNE_PDELAB_BACKEND_SOLVER_HH
|