コード例 #1
0
 public FtSection(SectionGrid grid, ICore core) : base(grid, core)
 {
     NeighbourCanReceive = new int[6];
     OwnChanges          = new int[6];
     OwnIncreases        = new int[6];
     NewOwnChanges       = new int[6];
 }
コード例 #2
0
 public MatrixSortParticleSection(ICore core, SectionGrid grid, int cellSizeSingleDim) : base(grid, core)
 {
     XSize           = cellSizeSingleDim;
     YSize           = cellSizeSingleDim;
     ZSize           = cellSizeSingleDim;
     ParticlesMatrix = new Particle[XSize, YSize, ZSize];
     fillCounter     = new Point3();
 }
コード例 #3
0
 public NeighbourTransferSection(SectionGrid grid, ICore core) : base(grid, core)
 {
     CurrentParticles = new List <Particle>();
     for (var i = 0; i < 6; i++)
     {
         ToTransmit[i] = new List <Particle>();
     }
 }
コード例 #4
0
 public StrictBoundaryParticleSection(SectionGrid grid, ICore core) : base(grid, core)
 {
     OuterParticleGroups = new List <Particle> [6];
     for (var i = 0; i < 6; i++)
     {
         OuterParticleGroups[i] = new List <Particle>();
     }
     CentralParticles = new List <Particle>();
 }
コード例 #5
0
        private void UpdateButton_Click(object sender, EventArgs e)
        {
            SectionGrid.EndEdit();
            DataTable dataTable = new DataTable();

            SectionGrid.Update();
            RegistrationClass.RegistrationEntities.SaveChanges();

            ClearTextBoxes();
        }
コード例 #6
0
        private void TransferParticles(NeighbourTransferSection section, int i, SectionGrid grid, Point3 point3, SimulationStructure structure, int step)
        {
            if (!section.ToTransmit[i].Any())
            {
                return;
            }
            IParticleSection outParticleSection;
            Point3           ownPosition;

            grid.SectionCoreMapping.TryGetValue(section, out ownPosition);
            if (!grid.SectionCoreMapping.TryGetKey(ownPosition + point3, out outParticleSection))
            {
                return;
            }
            particleTransmissionCostCalculator.AddTransmissionCost(section, (NeighbourTransferSection)outParticleSection, section.ToTransmit[i].Count, structure, step);
            ((NeighbourTransferSection)outParticleSection).CurrentParticles.AddRange(section.ToTransmit[i]);
            section.ToTransmit[i] = new List <Particle>();
        }
コード例 #7
0
 public IParticleSection GetSection(Vector3 lowerBound, Vector3 upperBound, ICore core, SectionGrid grid)
 {
     return(new KMeansSection(grid, core)
     {
         LowerBound = lowerBound, UpperBound = upperBound, LocationStifness = sectionLocationStifness, LocationInertia = locationInertia, MaximumDifferenceRadiusSquared = maximumDifferenceRadiusSquared
     });
 }
コード例 #8
0
 public KMeansSection(SectionGrid grid, ICore core)
     : base(grid, core)
 {
 }
コード例 #9
0
 public ParticleSection(SectionGrid grid, ICore core, int elementsPerSide)
     : base(grid, core)
 {
     BulkParticles        = new List <Particle>();
     this.elementsPerSide = new[] { elementsPerSide, elementsPerSide, elementsPerSide, elementsPerSide, elementsPerSide, elementsPerSide };
 }
コード例 #10
0
 public IParticleSection GetSection(Vector3 lowerBound, Vector3 upperBound, ICore core, SectionGrid grid)
 {
     return(new FtSection(grid, core)
     {
         LowerBound = lowerBound, UpperBound = upperBound, MaximumDifferenceRadiusSquared = maxDifRadSquared, MaximumParticles = maxParticles
     });
 }
コード例 #11
0
 public IParticleSection GetSection(Vector3 lowerBound, Vector3 upperBound, ICore core, SectionGrid sectionGrid)
 {
     return(new StrictBoundaryParticleSection(sectionGrid, core)
     {
         LowerBound = lowerBound, UpperBound = upperBound
     });
 }
コード例 #12
0
 public IParticleSection GetSection(Vector3 lowerBound, Vector3 upperBound, ICore core, SectionGrid grid)
 {
     return(new ParticleSection(grid, core, initialElementsPerSide)
     {
         LowerBound = lowerBound, UpperBound = upperBound
     });
 }
コード例 #13
0
        public IParticleSection GetSection(Vector3 lowerBound, Vector3 upperBound, ICore core, SectionGrid grid)
        {
            var particleSection = (KMeansSection)decoFactory.GetSection(lowerBound, upperBound, core, grid);

            particleSection.CurrentPosition = (lowerBound + upperBound) / 2;
            return(particleSection);
        }
コード例 #14
0
 public IParticleSection GetSection(Vector3 lowerBound, Vector3 upperBound, ICore core, SectionGrid grid)
 {
     return(new HelsimSection(grid, core)
     {
         LowerBound = lowerBound, UpperBound = upperBound
     });
 }
コード例 #15
0
 public HelsimSection(SectionGrid grid, ICore core) : base(grid, core)
 {
 }
コード例 #16
0
 public IParticleSection GetSection(Vector3 lowerBound, Vector3 upperBound, ICore core, SectionGrid grid)
 {
     return(new MatrixSortParticleSection(core, grid, cellSize)
     {
         LowerBound = lowerBound, UpperBound = upperBound
     });
 }