/// <summary> /// Calculates extinction using DDA method. /// </summary> /// <param name="ddaConfig">The DDA configuration.</param> /// <param name="systemConfig">The dipole system configuration.</param> /// <param name="medium">The medium of the dipoles.</param> /// <returns>The simulation result.</returns> public static SimulationResultDictionary Calculate(DDAParameters ddaConfig, SystemConfig systemConfig, BaseMedium medium) { var manager = new MediumManager(medium, ddaConfig.IsSolidMaterial); var ext = new ExtinctionManager(manager); SimulationParameters parameters = new SimulationParameters { WavePropagation = ddaConfig.WavePropagation, IncidentMagnitude = ddaConfig.IncidentMagnitude.ConvertToCartesian(), SystemConfig = systemConfig, Spectrum = ParameterHelper.ReadWavelengthFromConfiguration(ddaConfig) }; return(ext.CalculateCrossExtinction(parameters)); }
public static Dictionary <double, double> Calculate() { bool solid = false; var manager = new MediumManager(ParameterHelper.ReadOpticalConstants("opt_const.txt"), solid); var ext = new ExtinctionManager(manager); SimulationParameters parameters = new SimulationParameters { WavePropagation = ParameterHelper.ReadWavePropagationFromConfiguration("ddaParameters.xml"), IncidentMagnitude = ParameterHelper.ReadIncidentMagnitudeFromConfiguration("ddaParameters.xml"), SystemConfig = ParameterHelper.ReadSystemConfig("dipols.txt"), WaveConfig = ParameterHelper.ReadWavelengthFromConfigration("ddaParameters.xml") }; return(ext.CalculateCrossExtinction(parameters)); }
public AllMedia(MediumManager manger) { InitializeComponent(); _mediumManager = manger; }