Exemple #1
0
        public void CalculateAnomalyFieldE(ObservationLevel level, AnomalyCurrent jQ, AnomalyCurrent field)
        {
            if (_eGreenTensors.ContainsKey(level))
            {
                using (Solver.Profiler?.StartAuto(ProfilerEvent.AtoOFields))
                {
                    CalculateAnomalyFieldE(jQ, field, _eGreenTensors[level]);
                }

                return;
            }
            var greenTensor = CalculateGreenTensorAtoOLevelElectric(level);
            var arg         = new GreenTensorCalculatedEventArgs(level, greenTensor);

            OnGreenTensorECalculated(arg);

            using (Solver.Profiler?.StartAuto(ProfilerEvent.AtoOFields))
            {
                CalculateAnomalyFieldE(jQ, field, greenTensor);
            }

            if (arg.SupressGreenTensorDisposal)
            {
                _eGreenTensors.Add(level, greenTensor);
            }
            else
            {
                greenTensor.Dispose();
            }
        }
Exemple #2
0
 private void OnGreenTensorHCalculated(GreenTensorCalculatedEventArgs e)
 => GreenTensorHCalculated?.Invoke(this, e);
Exemple #3
0
 private void AToO_GreenTensorECalculated(object sender, GreenTensorCalculatedEventArgs e)
 {
     e.SupressGreenTensorDisposal = true;
     AtoOGreenTensorECalculated?.Invoke(this, e);
 }