/// <summary> /// Projection of a 1D-function <paramref name="f"/> onto a DG-Field /// </summary> public static void ProjectField(this DGField u, _1D f) { if (u.Basis.GridDat.SpatialDimension != 1) { throw new ArgumentException("mismatch in spatial dimension"); } u.ProjectField(f.Vectorize()); }
/// <summary> /// L2Error w.r.t. a 1D-function <paramref name="f"/> of a DG-Field /// </summary> public static double L2Error(this DGField u, _1D f) { if (u.Basis.GridDat.SpatialDimension != 1) { throw new ArgumentException("mismatch in spatial dimension"); } return(u.L2Error(f.Vectorize())); }