* computed on each cell.
*/
L2_norm,
+ /**
+ * The absolute value to
+ * the <i>p</i>th power is
+ * integrated and the pth
+ * root is computed on each
+ * cell. The exponent
+ * <i>p</i> is the last
+ * parameter of the
+ * function.
+ */
+ Lp_norm,
/**
* The maximum absolute
* value of the function.
* of the #H1_seminorm.
*/
H1_norm,
- /**
- * The absolute value to
- * the <i>p</i>th power is
- * integrated and the pth
- * root is computed on each
- * cell. The exponent
- * <i>p</i> is the last
- * parameter of the
- * function.
- */
- Lp_norm,
/**
* #Lp_norm of the gradient.
*/
* same as #H1_norm for
* <i>L<sup>p</sup></i>.
*/
- W1p_norm
+ W1p_norm,
+ /**
+ * #Linfty_norm of the gradient.
+ */
+ W1infty_seminorm,
+ /**
+ * same as #H1_norm for
+ * <i>L<sup>infty</sup></i>.
+ */
+ W1infty_norm
+
};
/**
{
case H1_seminorm:
case W1p_seminorm:
+ case W1infty_seminorm:
update_flags |= UpdateFlags (update_gradients);
break;
case H1_norm:
case W1p_norm:
+ case W1infty_norm:
update_flags |= UpdateFlags (update_gradients);
// no break!
default:
diff=std::sqrt(diff);
break;
case Linfty_norm:
+ case W1infty_norm:
std::fill_n (psi_scalar.begin(), n_q_points, 0.0);
for (unsigned int k=0; k<n_components; ++k)
for (unsigned int q=0; q<n_q_points; ++q)
0.0);
diff = std::sqrt(diff);
break;
+ case W1infty_seminorm:
+ case W1infty_norm:
+ Assert(false, ExcNotImplemented());
+ std::fill_n (psi_scalar.begin(), n_q_points, 0.0);
+ for (unsigned int k=0; k<n_components; ++k)
+ for (unsigned int q=0; q<n_q_points; ++q)
+ {
+ double t = 0.;
+ for (unsigned int d=0;d<dim;++d)
+ t = std::max(t,std::fabs(psi_grads[q][k][d])
+ * weight_vectors[q](k));
+
+ psi_scalar[q] = std::max(psi_scalar[q],t);
+ }
+
+ for (unsigned int i=0;i<psi_scalar.size();++i)
+ diff = std::max (diff, psi_scalar[i]);
+ break;
default:
break;
}