Exemple #1
0
        private Complex[][] GetBMatrix(Complex lambda)
        {
            var b = new Complex[_problemData.Ksi1.PartitionsAmount][];

            for (var i = 0; i < _problemData.Ksi1.PartitionsAmount; i++)
            {
                b[i] = new Complex[_problemData.Ksi2.PartitionsAmount];
                for (var j = 0; j < _problemData.Ksi2.PartitionsAmount; j++)
                {
                    var i1 = i;
                    var j1 = j;

                    Complex Func(double ksi1, double ksi2) =>
                    Complex.Sqrt(_problemData.P(ksi1, ksi2) - _problemData.LambdaValue) *
                    GetKFunctionDerivativeC1(
                        _problemData.Ksi1.GetKsiForPartition(i1),
                        _problemData.Ksi2.GetKsiForPartition(j1),
                        lambda)(ksi1, ksi2);

                    b[i][j] = IntegralCalculator.ComputeIntegralForProblem(Func, _problemData)
                              * Complex.Sqrt(_problemData.P(
                                                 _problemData.Ksi1.GetKsiForPartition(i1),
                                                 _problemData.Ksi2.GetKsiForPartition(j1))
                                             - _problemData.LambdaValue);
                }
            }

            return(b);
        }
Exemple #2
0
        private Complex[][] GetDMatrixAndriychukC1C2(Complex lambda)
        {
            var n = 2 * _problemData.N + 1;
            var m = 2 * _problemData.M + 1;
            var k = 0;
            var l = 0;
            var d = new Complex[n][];

            for (var i = 0; i < n; i++)
            {
                d[i] = new Complex[m];
                for (var j = 0; j < m; j++)
                {
                    var i1 = i;
                    var j1 = j;

                    Complex FuncE(double ksi1, double ksi2)
                    {
                        var angle = -(lambda * (i1 - _problemData.N - k) * ksi1 + _problemData.GetC2(lambda) * (j1 - _problemData.M - l) * ksi2);

                        return(Complex.Cos(angle) + Complex.ImaginaryOne * Complex.Sin(angle));
                    }

                    Complex Func(double ksi1, double ksi2) =>
                    Complex.Sqrt(_problemData.P(ksi1, ksi2) - _problemData.LambdaValue) *
                    FuncE(ksi1, ksi2);

                    d[i][j] = lambda * _problemData.GetC2(lambda) / (4 * Math.Pow(Math.PI, 2))
                              * IntegralCalculator.ComputeIntegralForProblem(Func, _problemData);
                }
            }

            for (int i = 0; i < d.Length; i++)
            {
                d[i][i] -= 1;
            }

            return(d);
        }
Exemple #3
0
        private Complex[][] GetBMatrixAndriychuk(Complex lambda)
        {
            var n = 2 * _problemData.N + 1;
            var m = 2 * _problemData.M + 1;
            var k = 0;
            var l = 0;
            var b = new Complex[n][];

            for (var i = 0; i < n; i++)
            {
                b[i] = new Complex[m];
                for (var j = 0; j < m; j++)
                {
                    var i1 = i;
                    var j1 = j;

                    Complex FuncE(double ksi1, double ksi2)
                    {
                        var angle = -(lambda * (i1 - _problemData.N - k) * ksi1 + _problemData.GetC2(lambda) * (j1 - _problemData.M - l) * ksi2);

                        return(Complex.Cos(angle) + Complex.ImaginaryOne * Complex.Sin(angle));
                    }

                    Complex Func(double ksi1, double ksi2) =>
                    Complex.Sqrt(_problemData.P(ksi1, ksi2) - _problemData.LambdaValue) *
                    FuncE(ksi1, ksi2) *
                    ksi1;

                    b[i][j] = -Complex.ImaginaryOne *
                              (i1 - _problemData.N - k) *
                              IntegralCalculator.ComputeIntegralForProblem(Func, _problemData);
                }
            }

            return(b);
        }