private static LaplacianScheme NewLaplacianScheme(string[] y) { LaplacianScheme x = null; if (y.Length > 1) { x = new LaplacianScheme(); x.SetHeader(ref y[0]); x.discretisation = y[1].ToEnum <DiscretisationType>(); if (x.discretisation != DiscretisationType.Gauss) { return(x); } x.interpolation = y[2].ToEnum <InterpolationType>(); x.snGradScheme = y[3].ToEnum <SurfaceNormalGradientType>(); if ((y.Length > 4) && (x.snGradScheme == SurfaceNormalGradientType.limited)) { x.psi = Convert.ToDecimal(y[4]); } } return(x); }
private static LaplacianScheme NewLaplacianScheme(string[] y) { LaplacianScheme x = null; if (y.Length > 1) { x = new LaplacianScheme(); x.SetHeader(ref y[0]); x.discretisation = y[1].ToEnum<DiscretisationType>(); if (x.discretisation != DiscretisationType.Gauss) return x; x.interpolation = y[2].ToEnum<InterpolationType>(); x.snGradScheme = y[3].ToEnum<SurfaceNormalGradientType>(); if ((y.Length > 4) && (x.snGradScheme == SurfaceNormalGradientType.limited)) { x.psi = Convert.ToDecimal(y[4]); } } return x; }