/// <summary> /// /// </summary> /// <param name="parallel"></param> /// <returns></returns> public GridScalarField2d GetLaplacian(bool parallel = false) { GridScalarField2d result = new GridScalarField2d(this); GetLaplacian(result.Values, parallel); return(result); }
/// <summary> /// /// </summary> /// <param name="parallel"></param> /// <returns></returns> public GridScalarField2d GetCurl(bool parallel = false) { GridScalarField2d result = new GridScalarField2d((Grid2d)this); GetCurl(result.Values, parallel); return(result); }
/// <summary> /// /// </summary> /// <param name="parallel"></param> /// <returns></returns> public GridScalarField2d GetDivergence(bool parallel = false) { GridScalarField2d result = new GridScalarField2d(this); GetDivergence(result.Values, parallel); return(result); }
/// <summary> /// /// </summary> /// <returns></returns> public GridScalarField2d Duplicate(bool copyValues) { var result = new GridScalarField2d(this); if (copyValues) { result.Set(this); } return(result); }
/// <summary> /// /// </summary> /// <param name="bitmap"></param> /// <param name="mapper"></param> /// <param name="origin"></param> /// <param name="scale"></param> /// <returns></returns> public static GridScalarField2d CreateFromImage(Bitmap bitmap, Func <Color, double> mapper, Vec2d origin, Vec2d scale) { int nx = bitmap.Width; int ny = bitmap.Height; var result = new GridScalarField2d(origin, scale, nx, ny); FieldIO.ReadFromImage(bitmap, result, mapper); return(result); }
/// <summary> /// /// </summary> /// <param name="bitmap"></param> /// <param name="mapper"></param> /// <param name="interval"></param> /// <returns></returns> public static GridScalarField2d CreateFromImage(Bitmap bitmap, Func <Color, double> mapper, Interval2d interval) { int nx = bitmap.Width; int ny = bitmap.Height; var result = new GridScalarField2d(interval, nx, ny); FieldIO.ReadFromImage(bitmap, result, mapper); return(result); }