Пример #1
0
        public void TaskOneStone()
        {
            DGSystemController controller = new DGSystemController();
            controller.createDGElements(4, 3, 0.0, 20.0, 2);
            Matrix Solution = controller.GetSolution();
            Vector startV = ComputeV(Solution);
            string matlabStringStartH = MatLabConverter.ConvertToMatLabPlotStringWithAxisLabelAndTitle(controller.GetOriginNodes(), Solution.GetColumn(0), "Raumvariable x", "h", "Lösung h zum Zeitpunkt t = 0.0");
            string matlabStringStartV = MatLabConverter.ConvertToMatLabPlotStringWithAxisLabelAndTitle(controller.GetOriginNodes(), startV, "Raumvariable x", "v", "Lösung v zum Zeitpunkt t = 0.0");

            controller.ComputeSolution(2.3);
            Solution = controller.GetSolution();

            Vector endV = ComputeV(Solution);
            string matlabStringV = MatLabConverter.ConvertToMatLabPlotStringWithAxisLabelAndTitle(controller.GetOriginNodes(), endV, "Raumvariable x", "v", "Lösung v zum Zeitpunkt t = 2.3");

            string matlabStringH = MatLabConverter.ConvertToMatLabPlotStringWithAxisLabelAndTitle(controller.GetOriginNodes(), Solution.GetColumn(0), "Raumvariable x", "h", "Lösung h zum Zeitpunkt t = 2.3");
        }
Пример #2
0
        private void TaskOneWellBalanced()
        {
            DGSystemController controller = new DGSystemController();
            controller.createDGElements(100, 3, 0.0, 20.0, 2);
            Dictionary<double, double> Energy = controller.ComputeSolution(1.0);

            Console.WriteLine(controller.ComputeConstant().toString(15));
            Vector nodes = controller.GetOriginNodes();
            Vector constant = controller.ComputeConstant();

            string matlabString = MatLabConverter.ConvertToMatLabPlotStringWithAxisLabelAndTitle(nodes, constant, "Ort x", "h+b", "Well-Balanced Test");
        }