Пример #1
0
        private InnerResult CalculateForH(AuxContainerFast c, ICalculatorU u)
        {
            var h = new ResultH();

            var zeta = _model.Section1D.GetAllSection1DZeta();

            c.Eta = CalculateEta(_planItem.Lambdas);
            c.Exp = CalculateExp(c.Eta);

            c.P   = CalculateP1(c.Eta, c.Exp);
            c.Q   = CalculateQ1(c.Eta, c.Exp);
            c.A   = CalculateA1(c);
            h.U11 = _planItem.CalculateI4 ? u.CalculateU1() : new Complex[0];
            h.U31 = _planItem.CalculateI1 ? u.CalculateU3() : new Complex[0];

            c.P       = CalculatePSigma(zeta, c.Eta, c.Exp);
            c.Q       = CalculateQSigma(c.Eta, c.Exp);
            c.A       = CalculateASigma(c);
            h.U1Sigma = _planItem.CalculateI3 ? u.CalculateU1() : new Complex[0];
            h.U4Sigma = _planItem.CalculateI2 ? u.CalculateU4() : new Complex[0];

            var result = ScalarMathUtils.NormalizeAndPerformHankelFast(h, _planItem);

            return(result);
        }
Пример #2
0
        public static InnerResult NormalizeAndPerformHankelFast(ResultH h, ScalarPlanItem planItem)
        {
            NormalizeBeforeHankelForH(h, planItem);
            var r = CalculateHankelForHFast(planItem, h);

            NormalizeAfterHankelForH(planItem, r);

            return(r);
        }
Пример #3
0
        private static void NormalizeBeforeHankelForH(ResultH r, ScalarPlanItem item)
        {
            var lambdas = item.Lambdas;

            for (int i = 0; i < r.U1Sigma.Length; i++)
            {
                r.U1Sigma[i] *= lambdas[i];
            }

            for (int i = 0; i < r.U11.Length; i++)
            {
                r.U11[i] *= lambdas[i];
            }
        }
Пример #4
0
        private static ResultH InitResultH(ScalarPlanItem plan)
        {
            var length = plan.Lambdas.Length;

            var r = new ResultH
            {
                U11     = new Complex[length],
                U1Sigma = new Complex[length],
                U31     = new Complex[length],
                U4Sigma = new Complex[length],
            };

            return(r);
        }
Пример #5
0
        private static InnerResult CalculateHankelForHFast(ScalarPlanItem item, ResultH r)
        {
            var hankel = item.HankelCoefficients;
            var length = item.Rho.Length;

            return(new InnerResult
            {
                Rho = item.Rho,

                I1 = item.CalculateI1 ? hankel.ConvoluteWithHank1Fast(r.U31, length) : new Complex[0],
                I2 = item.CalculateI2 ? hankel.ConvoluteWithHank1Fast(r.U4Sigma, length) : new Complex[0],
                I3 = item.CalculateI3 ? hankel.ConvoluteWithHank0Fast(r.U1Sigma, length) : new Complex[0],
                I4 = item.CalculateI4 ? hankel.ConvoluteWithHank0Fast(r.U11, length) : new Complex[0],
            });
        }