Exemplo n.º 1
0
static void load_value_execute(UM_machine machine, Um_instruction instruction)
{

        unsigned A = Bitpack_getu(instruction, BITS_PER_REG_NUM, 25);
        UM_word value = Bitpack_getu(instruction, BITS_PER_VALUE, 0);

        loadv(machine, value, A);
}
Exemplo n.º 2
0
int main() 
{

  int i;

  history_file = fopen("hist.data", "w");

  init();			/* do initialisation */
  loadx();			/* load particles onto grid */
  particle_bc();		/* particle boundary conditions */
                     
  loadv();			/* define velocity distribution */

  density();			/* compute initial density from particles */
  add_neutral();                   /* background ion density */
  laser();                      /* initialise laser field */
  field();			/* compute initial electric field */

  diagnostics();		/* output initial conditions */

 
  for (itime=1; itime<=ntrun; itime++) 
    {

      push();			/* Push particles */
      particle_bc();		/* particle boundary conditions */

      density();		/* compute density */

      laser();                  /* update laser field */
      field();		        /* compute electric field (Poisson) */

      diagnostics();		/* output snapshots and time-histories */

    }


  close(history_file);          /*   close time-hist files */


}