Example #1
0
 public P2D(string _filename, P2DReadMode mode = P2DReadMode.LOAD)
 {
     if (!File.Exists(_filename))
     {
         Error.Kill(this, "could not find file " + _filename + ".");
     }
     filename = _filename;
     read_init_default(mode);
 }
Example #2
0
        public static P2D FromCsv(string _filename, int _nx, int _ny, P2DReadMode mode = P2DReadMode.LOAD)
        {
            switch (mode)
            {
            case P2DReadMode.LOAD:
            {
                return(read_csv(_filename, _nx, _ny));
            }

            case P2DReadMode.STREAM:
            {
                Error.Kill("P2D", "stream loading not implemented yet.");
                break;
            }
            }
            return(null);
        }
Example #3
0
        private void read_init_default(P2DReadMode mode)
        {
            switch (mode)
            {
            case P2DReadMode.LOAD:
            {
                init_all_default_load();
                break;
            }

            case P2DReadMode.STREAM:
            {
                Error.Kill(this, "stream loading not implemented yet.");
                break;
            }
            }
        }