Пример #1
0
        public void Calculate()
        {
            Constant = 7;
            XValue   = 1;
            FxValue  = Math.Cos(3 * XValue);
            GxValue  = XValue;

            TimeStep = 0.1;
            XStep    = 0.01;

            XMinValue    = 0;
            XMaxValue    = 1;
            TimeMinValue = 0;
            TimeMaxValue = 1;

            Tau      = HyperbolicEquatation.Tau(Constant, TimeStep, XStep);
            IsStable = HyperbolicEquatation.IsStable(Constant, TimeStep, XStep);
            //TODO matrix is not filled
            ValueMatrix = CoreUtils.GenerateValueMatrix(
                XMinValue,
                XMaxValue,
                XStep,
                TimeMinValue,
                TimeMaxValue,
                TimeStep);
            ResultMatrix = CoreUtils.GenerateResultMatrix();
            //ResultMatrix = CoreUtils.GenerateResultMatrix(
            //    XMinValue,
            //    XMaxValue,
            //    XStep,
            //    TimeMinValue,
            //    TimeMaxValue,
            //    TimeStep);
        }
Пример #2
0
        static void Main(string[] args)
        {
            //var derivatives = DerrivativeUtils.FindDerrivatives(DerrivativeString);

            var constant = 7;
            var xValue   = 1;
            var fx       = Math.Cos(3 * xValue);
            var gx       = xValue;

            var timeStep = 0.1;
            var xStep    = 0.01;

            var xMinValue    = 0;
            var xMaxValue    = 1;
            var timeMinValue = 0;
            var timeMaxValue = 0;

            //TODO get tau that is stable
            var tau         = HyperbolicEquatation.Tau(constant, timeStep, xStep);
            var isStable    = HyperbolicEquatation.IsStable(constant, timeStep, xStep);
            var valueMatrix = CoreUtils.GenerateValueMatrix(
                xMinValue,
                xMaxValue,
                xStep,
                timeMinValue,
                timeMaxValue,
                timeStep);
            //var resultMatrix = CoreUtils.GenerateResultMatrix(
            //    xMinValue,
            //    xMaxValue,
            //    xStep,
            //    timeMinValue,
            //    timeMaxValue,
            //    timeStep);

            //RESULT will be matrix between 0 and some other number
            //Point count will be determined by step values
        }