private static void NormalizeAfterHankelForE(ScalarPlanItem item, InnerResult r) { const double pi2 = 2 * System.Math.PI; for (int i = 0; i < r.I1.Length; i++) { r.I1[i] = -r.I1[i] / (pi2 * item.Rho[i]); } for (int i = 0; i < r.I2.Length; i++) { r.I2[i] = r.I2[i] / (pi2 * item.Rho[i]); } for (int i = 0; i < r.I3.Length; i++) { r.I3[i] = r.I3[i] / (pi2 * item.Rho[i]); } for (int i = 0; i < r.I4.Length; i++) { r.I4[i] = r.I4[i] / (pi2 * item.Rho[i]); } for (int i = 0; i < r.I5.Length; i++) { r.I5[i] = r.I5[i] / (pi2 * item.Rho[i]); } }
public static InnerResult NormalizeAndPerformHankelFast(ResultH h, ScalarPlanItem planItem) { NormalizeBeforeHankelForH(h, planItem); var r = CalculateHankelForHFast(planItem, h); NormalizeAfterHankelForH(planItem, r); return(r); }
public static InnerResult NormalizeAndPerformHankel(ResultE e, ScalarPlanItem planItem, OmegaModel model, int corrBackgroundRc) { NormalizeBeforeHankelForE(model, corrBackgroundRc, e, planItem); var r = CalculateHankelForE(planItem, e); NormalizeAfterHankelForE(planItem, r); return(r); }
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]; } }
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); }
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], }); }
private static ResultE InitResultE(ScalarPlanItem planItem) { var length = planItem.Lambdas.Length; var r = new ResultE { U1 = planItem.CalculateI1 ? new Complex[length] : new Complex[0], U2 = planItem.CalculateI2 ? new Complex[length] : new Complex[0], U3 = planItem.CalculateI3 ? new Complex[length] : new Complex[0], U4 = planItem.CalculateI4 ? new Complex[length] : new Complex[0], U5 = planItem.CalculateI5 ? new Complex[length] : new Complex[0], }; return(r); }
private static InnerResult CalculateHankelForE(ScalarPlanItem item, ResultE r) { var hankel = item.HankelCoefficients; var length = item.Rho.Length; return(new InnerResult { Rho = item.Rho, I1 = item.CalculateI1 ? hankel.ConvoluteWithHank1(r.U1, length) : new Complex[0], I2 = item.CalculateI2 ? hankel.ConvoluteWithHank1(r.U2, length) : new Complex[0], I3 = item.CalculateI3 ? hankel.ConvoluteWithHank0(r.U3, length) : new Complex[0], I4 = item.CalculateI4 ? hankel.ConvoluteWithHank0(r.U4, length) : new Complex[0], I5 = item.CalculateI5 ? hankel.ConvoluteWithHank1(r.U5, length) : new Complex[0], }); }
private static void NormalizeBeforeHankelForE(OmegaModel model, int corrBackgroundRc, ResultE r, ScalarPlanItem item) { var lambdas = item.Lambdas; var zetaRc2 = 2 * model.Section1D[corrBackgroundRc].Zeta; var iOmegaMu0 = Complex.ImaginaryOne * model.Omega * Mu0; for (int i = 0; i < r.U1.Length; i++) { r.U1[i] *= (iOmegaMu0 / 2); } for (int i = 0; i < r.U2.Length; i++) { r.U2[i] /= zetaRc2; } for (int i = 0; i < r.U3.Length; i++) { r.U3[i] *= lambdas[i] / zetaRc2; } for (int i = 0; i < r.U4.Length; i++) { r.U4[i] *= -lambdas[i] / zetaRc2; } for (int i = 0; i < r.U5.Length; i++) { r.U5[i] *= (lambdas[i] * lambdas[i]) / zetaRc2; } }
protected PlanCalculator(OmegaModel model, AlphaBeta alphaBeta, ScalarPlanItem planItem) { _model = model; _alphaBeta = alphaBeta; _planItem = planItem; }
public VolumeToPointPlanCalculator(OmegaModel model, AlphaBeta alphaBeta, ScalarPlanItem planItem) : base(model, alphaBeta, planItem) { }