Beispiel #1
0
        private Rgb GetColorOf(IParticleSection particleSection, SimulationStructure structure)
        {
            var coord = getPictureCoordinatesFor(particleSection.UpperBound.X, particleSection.UpperBound.Z, structure);
            var r     = (0.5 + 0.4 * Math.Cos((double)coord.Item1 * 20 + coord.Item2 * 22)) * 256;
            var g     = (0.5 + 0.4 * Math.Cos((double)coord.Item1 * 18 + coord.Item2 * 20)) * 256;
            var b     = (0.5 + 0.4 * Math.Cos((double)coord.Item1 * 16 + coord.Item2 * 18)) * 256;


            return(new Rgb(Color.FromArgb((int)r, (int)g, (int)b)));
        }
Beispiel #2
0
        public void AddCost(IParticleSection section, IParticleSection otherSection, int nBParticles,
                            SimulationStructure structure, int step)
        {
            var core1 = section.Core;
            var core2 = otherSection.Core;

            if (core1 == core2)
            {
                return;
            }
            storage.AddCost(sendingCost, core1, step, nBParticles * particleReductionFactor * SendCost);
            storage.AddCost(receivingCost, core2, step, nBParticles * particleReductionFactor * ReceiveCost);
        }
Beispiel #3
0
 public void AddSection(IParticleSection particleSection)
 {
     sections.Add(particleSection);
 }
 public void AddSection(IParticleSection particleSection)
 {
     throw new Exception("Should not be used!!");
 }
 public void SetBoundarySection(IParticleSection overParticleSection)
 {
     bouncer.SetBoundarySection(overParticleSection);
 }
Beispiel #6
0
 public void AddSection(IParticleSection particleSection)
 {
     throw new NotImplementedException();
 }
Beispiel #7
0
 public void SetBoundarySection(IParticleSection ovrParticleSection)
 {
     overParticleSection = ovrParticleSection;
 }
Beispiel #8
0
 private void SortOuterParticles(IParticleSection particleSection, int step)
 {
     //DO NOTHING
 }
Beispiel #9
0
 public void AddTransmissionCost(IParticleSection fromSection, IParticleSection toSection, int nbParticles,
                                 SimulationStructure structure, int step)
 {
     ptcostCalculator.AddCost(fromSection, toSection, nbParticles, structure, step);
 }
Beispiel #10
0
 public void AddSection(IParticleSection particleSection)
 {
     throw new Exception("Should not add section to fictive core");
 }