Package org.openpixi.pixi.physics

Examples of org.openpixi.pixi.physics.Simulation


    ConstantForce force = new ConstantForce();
    force.ex = ex;
    force.bz = bz;
    stt.addForce(force);

    Simulation s = new Simulation(stt);
    s.prepareAllParticles();

    // Advance particle
    s.particlePush();

    // The simulation always creates its own copy of particles
    // (in fact the setting class does so)
    // and we would like to obtain the reference to our initial particle p.
    p = s.particles.get(0);

    //Remember old values after boundary check
    double sx = p.getPrevX();
    double sy = p.getPrevY();

    // Calculate current
    s.getInterpolation().interpolateToGrid(s.particles, s.grid, s.tstep);

    double jx = GridTestCommon.getJxSum(s.grid);
    double jy = GridTestCommon.getJySum(s.grid);

    if (VERBOSE) System.out.println("Total current " + text + ": jx = " + jx + ", jy = " + jy
View Full Code Here


        master = n.getMaster();
      }
    }

    // Run non-distributed simulation
    Simulation simulation = new Simulation(settings);
    simulation.run();

    settings.terminateThreads();

    // Compare results
    ResultsComparator comparator = new ResultsComparator();
View Full Code Here

        master = n.getMaster();
      }
    }

    // Create non-distributed simulation
    Simulation simulation = new Simulation(settings);

    for (int i = 0; i < settings.getIterations(); ++i) {
      simulation.step();
      runRunnables(stepRuns);
      runRunnables(collectRuns);

      ResultsComparator comparator = new ResultsComparator(i);
      compareResults(master, simulation, comparator);
View Full Code Here

TOP

Related Classes of org.openpixi.pixi.physics.Simulation

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.