Examples of GlobalObject


Examples of aleph.GlobalObject

    {
      boolean in_write_mode;
      int level,index;
      int[] xp = new int[nDim];
      int[] xr = new int[nDim];
      GlobalObject gBody;
      GlobalObject gCell;
      Cell cell;
      Body body;
 
      while ( data.bodies_there < data.nbody) {

        gBody = bodyTab[data.bodies_there++];
        body = (Body) gBody.open( "r" );
        intcoord(xp, body.pos);
        try{
          gBody.release();
        }catch (AlephException e) {}
 
        gCell = root;
        level = iMax >> 1;
        while (true) {
          cell = (Cell) gCell.open( "r" );
          in_write_mode = false;
          index = subindex(xp, level);
          level >>= 1;
 
          if (cell.next[index] == null) {
            try{
              gCell.release();
            }catch (AlephException e) {}
            cell = (Cell) gCell.open( "w" );
            in_write_mode = true;
            if (cell.next[index] == null) {
              cell.next[index] = gBody;
              try{
                gCell.release();
              }catch (AlephException e) {}
              break;
            }
          }
          if (!cell.isCell(index)) {
            if (!in_write_mode) {
              try{
                gCell.release();
              }catch (AlephException e) {}
              cell = (Cell) gCell.open( "w" );
            }
            if (!cell.isCell(index)) {
              cell.next[index] = newCell(cell.next[index], level, data);
              cell.markCell(index);
            }
          }
          GlobalObject g = cell.next[index];
          try{
               gCell.release();
          }catch (AlephException e) {}
          gCell = g;
        }
View Full Code Here

Examples of aleph.GlobalObject

      this.data = data;
    }
 
    public Object run()
    {
      GlobalObject gBody;
      Body body;
      double[] dvel = new double[nDim];
      double[] pos0 = new double[nDim];
      double[] acc  = new double[nDim];
   
      while (data.bodies_there > 0) {
        gBody = bodyTab[--data.bodies_there];
        body = (Body) gBody.open( "r" );
        SETVS(acc, 0.0);
        SETV(pos0, body.pos);
 
        try{ // release as soon as possible
          gBody.release();
        } catch (AlephException e) { }
 
        hackgrav(gBody, gRoot, pos0, acc, rsize*rsize, true);
 
        // open for write
        body = (Body) gBody.open( "w" );
 
        MULVS(dvel, acc, dtime);
        ADDV(body.vel, body.vel, dvel);
        try{
          gBody.release();
        } catch (AlephException e) { }
      }
 
      return (Object) data;

View Full Code Here

Examples of aleph.GlobalObject

      this.data = data;
    }

    public Object run ()
    {
      GlobalObject gBody;
      Body body;
      double[] dpos = new double[nDim];
   
      while (data.bodies_there < data.nbody) {
        gBody = bodyTab[data.bodies_there++];
        body = (Body) gBody.open( "w" );
        MULVS(dpos, body.vel, dtime);
        ADDV(body.pos, body.pos, dpos);
        try{
          gBody.release();
        } catch( AlephException e ){}
      }

      return (Object) data;
View Full Code Here

Examples of com.orange.wink.model.GlobalObject

    }
    fileNames.add(f);
    wp.parse(fileNames);
    // wp.print();

    final GlobalObject scope = wp.getGlobalScope();
    if (scope != null) {
      getFunctions(fns, scope);
      getLiterals(lits, scope);
    }
View Full Code Here

Examples of com.orange.wink.model.GlobalObject

      ast = astBuilder.build(tree);
      // System.out.println(ast);
    } catch (final IOException e) {
      throw new WinkParseException(e);
    }
    addJsFile(fileName, new GlobalObject(ast));
  }
View Full Code Here

Examples of com.orange.wink.model.GlobalObject

  /**
   * @throws WinkParseException
   */
  public void print() throws WinkParseException {
    final GlobalObject scope = getGlobalScope();
    if (scope == null) {
      return;
    }

    System.out.println(scope.getAst().toStringInner());
    System.out.println(scope.getAst());

    // System.out.println("------------ FILES");
    // for (final WinkJsFile jsfile : jsFiles) {
    // System.out.println("- " + jsfile.getFilename());
    // }

    System.out.println("\n------------ MODEL");
    System.out.println(scope.toStringRecursive(null, 0));

    // System.out.println("\n------------ SOURCES");
    // printSource(scope);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.