public AggregateFormationSimulationRunner( IAggregateSizeDistributionFactory aggregateSizeDistributionFactory, IPrimaryParticleSizeDistributionFactory primaryParticleSizeDistributionFactory, IAggregateFormationFactory aggregateFormationFactory, INeighborslistFactory neighborslistFactory, IAggregateFormationConfig aggregateFormationConfig, ILogger logger) { _aggregateFormationConfig = aggregateFormationConfig ?? throw new ArgumentException(nameof(aggregateFormationConfig)); _logger = logger ?? throw new ArgumentException(nameof(logger)); _aggregateFormationService = new AggregateFormationService(aggregateSizeDistributionFactory, primaryParticleSizeDistributionFactory, aggregateFormationFactory, neighborslistFactory, _aggregateFormationConfig, logger); Progress = new Progress <ProgressReportModel>(); _cts = new CancellationTokenSource(); }
public AggregateFormationService( IAggregateSizeDistributionFactory aggregateSizeDistributionFactory, IPrimaryParticleSizeDistributionFactory primaryParticleSizeDistributionFactory, IAggregateFormationFactory aggregateFormationFactory, INeighborslistFactory neighborslistFactory, IAggregateFormationConfig config, ILogger logger) { _aggregateSizeDistributionFactory = aggregateSizeDistributionFactory ?? throw new ArgumentException(nameof(aggregateSizeDistributionFactory)); _primaryParticleSizeDistributionFactory = primaryParticleSizeDistributionFactory ?? throw new ArgumentException(nameof(primaryParticleSizeDistributionFactory)); _aggregateFormationFactory = aggregateFormationFactory ?? throw new ArgumentException(nameof(aggregateFormationFactory)); _neighborslistFactory = neighborslistFactory ?? throw new ArgumentException(nameof(neighborslistFactory)); _config = config ?? throw new ArgumentException(nameof(config)); _logger = logger ?? throw new ArgumentException(nameof(logger)); var rndGen = new Random(); _aggregateSizeDistribution = aggregateSizeDistributionFactory.Build(rndGen, config); _primaryParticleSizeDistribution = primaryParticleSizeDistributionFactory.Build(rndGen, config); _particleFactory = _aggregateFormationFactory.Build(_primaryParticleSizeDistribution, _neighborslistFactory, _config, _logger); }
public FullSimulationRunner( IAggregateFormationConfig aggregateFormationConfig, SimulationMonitor simulationMonitor, IAggregateSizeDistributionFactory aggregateSizeDistributionFactory, IPrimaryParticleSizeDistributionFactory primaryParticleSizeDistributionFactory, IAggregateFormationFactory aggregateFormationFactory, INeighborslistFactory neighborslistFactory, IFilmFormationConfig filmFormationConfig, ILogger logger) { _filmFormationConfig = filmFormationConfig; _progress = new Progress <ProgressReportModel>(); _filmFormationService = new FilmFormationService(filmFormationConfig); _cts = new CancellationTokenSource(); _aggregateFormationConfig = aggregateFormationConfig ?? throw new ArgumentException(nameof(aggregateFormationConfig)); _aggregateSizeDistributionFactory = aggregateSizeDistributionFactory; _primaryParticleSizeDistributionFactory = primaryParticleSizeDistributionFactory; _aggregateFormationFactory = aggregateFormationFactory; _neighborslistFactory = neighborslistFactory; _logger = logger ?? throw new ArgumentException(nameof(logger)); _aggregateFormationService = new AggregateFormationService(_aggregateSizeDistributionFactory, _primaryParticleSizeDistributionFactory, _aggregateFormationFactory, _neighborslistFactory, _aggregateFormationConfig, logger); }