36#ifndef OPM_NORMSUPPORT_HPP_HEADER
37#define OPM_NORMSUPPORT_HPP_HEADER
45 namespace ImplicitTransportDefault {
50 operator()(
double x,
const T& y) {
51 return std::max(std::abs(x), std::abs(y));
55 postprocess(
double nrm_inf) {
return nrm_inf; }
62 operator()(
double x,
const T& y) {
63 return std::abs(x) + std::abs(y);
67 postprocess(
double nrm_1) {
return nrm_1; }
74 operator()(
double x,
const T& y) {
75 const double ay = ::std::abs(y);
77 return std::abs(x) + ay*ay;
81 postprocess(
double nrm2) { return ::std::sqrt(nrm2); }
84 template <
class Vector,
template <
typename>
class NormImpl>
88 norm(
const Vector& v) {
89 typedef typename Vector::value_type VT;
91 double nrm = ::std::accumulate(v.begin(), v.end(), VT(0.0),
94 return NormImpl<VT>::postprocess(nrm);
Definition NormSupport.hpp:85
Definition NormSupport.hpp:71
Definition NormSupport.hpp:47
Definition NormSupport.hpp:59
Inverting small matrices.
Definition ImplicitAssembly.hpp:43