예제 #1
0
        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);
        }
예제 #2
0
 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;
 }