Ejemplo n.º 1
0
 /// <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());
 }
Ejemplo n.º 2
0
 /// <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()));
 }