Example #1
0
        static public XDGTestControl AllUpTestControl()
        {
            var ctrl = new XDGTestControl();

            ctrl.SetDGdegree(2);

            ctrl.InitialValues_Evaluators.Add("Phi", XDGTestMain.Phi0);
            ctrl.InitialValues_Evaluators.Add("Pressure#A", XDGTestMain.PressureExactA);
            ctrl.InitialValues_Evaluators.Add("Pressure#B", XDGTestMain.PressureExactB);

            ctrl.GridFunc = delegate() {
                var xNodes = GenericBlas.Linspace(-0.33333, 0.666667, 7);
                var yNodes = GenericBlas.Linspace(-1, 1, 13);
                var grd    = Grid2D.Cartesian2DGrid(xNodes, yNodes);
                return(grd);
            };

            //ctrl.ImmediatePlotPeriod = 1;
            //ctrl.SuperSampling = 3;

            ctrl.TimesteppingMode = Solution.Control.AppControl._TimesteppingMode.Transient;
            ctrl.dtFixed          = 1.0;
            ctrl.NoOfTimesteps    = 1;


            return(ctrl);
        }
Example #2
0
        static public XDGTestControl RestartTest_FirstControl(string DbPath, out int[] ExpectedTimeSteps)
        {
            var ctrl = new XDGTestControl();

            ctrl.SetDGdegree(2);

            ctrl.InitialValues_Evaluators.Add("Phi", XDGTestMain.Phi0);
            ctrl.InitialValues_Evaluators.Add("Pressure#A", XDGTestMain.PressureExactA);
            ctrl.InitialValues_Evaluators.Add("Pressure#B", XDGTestMain.PressureExactB);

            ctrl.GridFunc = delegate()  {
                var xNodes = GenericBlas.Linspace(-1.0 / 3.0, 10.0 / 3.0, 11 * 3 + 1);
                var yNodes = GenericBlas.Linspace(-1, 1, 6 * 2 + 1);
                var grd    = Grid2D.Cartesian2DGrid(xNodes, yNodes);

                //Guid GridGuid = TestDb.Controller.DBDriver.SaveGrid(grd, TestDb);
                return(grd);
            };

            //ctrl.ImmediatePlotPeriod = 1;
            //ctrl.SuperSampling = 3;

            ctrl.TimesteppingMode = Solution.Control.AppControl._TimesteppingMode.Transient;
            ctrl.dtFixed          = 0.1;
            ctrl.NoOfTimesteps    = 10;

            ctrl.DbPath       = DbPath;
            ctrl.saveperiod   = 5;
            ctrl.rollingSaves = false;
            ExpectedTimeSteps = new int[] { 0, 4, 5, 9, 10 };

            return(ctrl);
        }
Example #3
0
        static public XDGTestControl RestartTest_SecondControl(string DbPath, Guid RestartSession, out int[] ExpectedTimeSteps)
        {
            var ctrl = new XDGTestControl();

            ctrl.SetDGdegree(2);

            ctrl.RestartInfo = Tuple.Create(RestartSession, default(TimestepNumber));

            ctrl.TimesteppingMode = Solution.Control.AppControl._TimesteppingMode.Transient;
            ctrl.dtFixed          = 0.1;
            ctrl.NoOfTimesteps    = 20;

            ctrl.DbPath       = DbPath;
            ctrl.saveperiod   = 50;
            ctrl.rollingSaves = true;
            ExpectedTimeSteps = new int[] { 10, 29, 30 };


            return(ctrl);
        }