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