Package org.openpixi.pixi.distributed.partitioning

Examples of org.openpixi.pixi.distributed.partitioning.SimplePartitioner


  private static final int NUM_PARTITIONS_SPC = 8;

  public void testPeriodicMapsGeneric() {

    // Create partitions
    Partitioner partitioner = new SimplePartitioner();
    IntBox[] partitions = partitioner.partition(NUM_CELLS_X_GEN, NUM_CELLS_Y_GEN, NUM_PARTITIONS_GEN);
    IntBox globalSimulation = new IntBox(0, NUM_CELLS_X_GEN - 1, 0, NUM_CELLS_Y_GEN - 1);

    // Go through each partition and test its neighbor map
    for (int i = 0; i < partitions.length; ++i) {
      NeighborMap neighborMap = new NeighborMap(
View Full Code Here



  public void testHardwallMapsGeneric() {

    // Create partitions
    Partitioner partitioner = new SimplePartitioner();
    IntBox[] partitions = partitioner.partition(NUM_CELLS_X_GEN, NUM_CELLS_Y_GEN, NUM_PARTITIONS_GEN);
    IntBox globalSimulation = new IntBox(0, NUM_CELLS_X_GEN - 1, 0, NUM_CELLS_Y_GEN - 1);

    // Go through each partition and test its neighbor map
    for (int i = 0; i < partitions.length; ++i) {
      NeighborMap neighborMap = new NeighborMap(
View Full Code Here


  public void testPeriodicMapSpecific() {

    // Create partitions
    Partitioner partitioner = new SimplePartitioner();
    IntBox[] partitions = partitioner.partition(NUM_CELLS_X_SPC, NUM_CELLS_Y_SPC, NUM_PARTITIONS_SPC);
    IntBox globalSimulation = new IntBox(0, NUM_CELLS_X_SPC - 1, 0, NUM_CELLS_Y_SPC - 1);

    int myPartID = 0;
    NeighborMap neighborMap = new NeighborMap(
        myPartID, partitions, globalSimulation, GeneralBoundaryType.Periodic);
View Full Code Here


  public void testHardwallMapSpecific() {

    // Create partitions
    Partitioner partitioner = new SimplePartitioner();
    IntBox[] partitions = partitioner.partition(NUM_CELLS_X_SPC, NUM_CELLS_Y_SPC, NUM_PARTITIONS_SPC);
    IntBox globalSimulation = new IntBox(0, NUM_CELLS_X_SPC - 1, 0, NUM_CELLS_Y_SPC - 1);

    int myPartID = 0;
    NeighborMap neighborMap = new NeighborMap(
        myPartID, partitions, globalSimulation, GeneralBoundaryType.Hardwall);
View Full Code Here

  }


  public void distributeProblem() {
    // Partition the problem
    Partitioner partitioner = new SimplePartitioner();
    partitions = partitioner.partition(
        settings.getGridCellsX(), settings.getGridCellsY(), settings.getNumOfNodes());

    // Log the partitioning scheme
    Logger logger = LoggerFactory.getLogger(this.getClass());
    logger.debug("Problem partitioning:\n{}", partitioner);
View Full Code Here

  private static final int NUM_CELLS_Y = 32;
  private static final int NUM_PARTITIONS = 16;


  public void testPartition() throws Exception {
    SimplePartitioner partitioner = new SimplePartitioner();
    IntBox[] partitions = partitioner.partition(NUM_CELLS_X, NUM_CELLS_Y, NUM_PARTITIONS);

    Assert.assertEquals(NUM_PARTITIONS, partitions.length);

    int largestXmax = Integer.MIN_VALUE;
    int smallestXmin = Integer.MAX_VALUE;
View Full Code Here

TOP

Related Classes of org.openpixi.pixi.distributed.partitioning.SimplePartitioner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.