Ejemplo n.º 1
0
        private GreenTensor CalculateGreenTensorAtoOSiteElectric(ObservationSite site)
        {
            var plan             = _plansCreater.CreateForAnomalyToObservationSites(site);
            var transceiver      = TranceiverUtils.CreateAnomalyToObservation(Model.Anomaly, site);
            var scalarCalculator = GreenScalarCalculator.NewAtoOElectricCalculator(Logger, Model);
            var scalars          = scalarCalculator.Calculate(plan, transceiver);

            var calc     = new AtoOSiteGreenTensorCalculator(Logger, Model, MemoryProvider);
            var segments = ScalarSegments.AllocateAndConvert(MemoryProvider, plan, scalars);

            var gt = calc.CalculateAtoOElectric(segments, site, MemoryLayoutOrder.AlongLateral);

            segments.Dispose();

            return(gt);
        }
Ejemplo n.º 2
0
        private unsafe GreenTensor CalculateGreenTensorAtoOLevelElectric(ObservationLevel level)
        {
            using (Solver.Profiler?.StartAuto(ProfilerEvent.AtoOGreenCalc))
            {
                var plan             = _plansCreater.CreateForAnomalyToObservationLevels(level);
                var transceiver      = TranceiverUtils.CreateAnomalyToObservation(Model.Anomaly, level);
                var scalarCalculator = GreenScalarCalculator.NewAtoOElectricCalculator(Logger, Model);
                var scalars          = scalarCalculator.Calculate(plan, transceiver);

                using (var segments = ScalarSegments.AllocateAndConvert(MemoryProvider, plan, scalars))
                {
                    var tensorPlan = new TensorPlan(_templateTensorPlan, level);
                    _gtc.ResetKnots();
                    var gt = _gtc.CalculateAtoOElectric(segments, MemoryLayoutOrder.AlongVertical, tensorPlan);

                    PerformGreenTensorFft(gt);
                    return(gt);
                }
            }
        }