testing/icgen/random_verschillende_resoluties_N-GenIC/gadget3_64/run.c
void energy_statistics(void)
{
  compute_global_quantities_of_system();

  if(ThisTask == 0)
    {
      fprintf(FdEnergy,
	      "%g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g\n",
	      All.Time, SysState.EnergyInt, SysState.EnergyPot, SysState.EnergyKin, SysState.EnergyIntComp[0],
	      SysState.EnergyPotComp[0], SysState.EnergyKinComp[0], SysState.EnergyIntComp[1],
	      SysState.EnergyPotComp[1], SysState.EnergyKinComp[1], SysState.EnergyIntComp[2],
	      SysState.EnergyPotComp[2], SysState.EnergyKinComp[2], SysState.EnergyIntComp[3],
	      SysState.EnergyPotComp[3], SysState.EnergyKinComp[3], SysState.EnergyIntComp[4],
	      SysState.EnergyPotComp[4], SysState.EnergyKinComp[4], SysState.EnergyIntComp[5],
	      SysState.EnergyPotComp[5], SysState.EnergyKinComp[5], SysState.MassComp[0],
	      SysState.MassComp[1], SysState.MassComp[2], SysState.MassComp[3], SysState.MassComp[4],
	      SysState.MassComp[5]);

      fflush(FdEnergy);
    }
}
/*! This routine first calls a computation of various global
 * quantities of the particle distribution, and then writes some
 * statistics about the energies in the various particle components to
 * the file FdEnergy.
 */
This routine first calls a computation of various global
quantities of the particle distribution, and then writes some
statistics about the energies in the various particle components to
the file FdEnergy.
This routine first calls a computation of various global quantities of the particle distribution and then writes some statistics about the energies in the various particle components to the file FdEnergy .
void energy_statistics(void)
{
  compute_global_quantities_of_system();
  if(ThisTask == 0)
    {
      fprintf(FdEnergy,
	      "%g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g\n",
	      All.Time, SysState.EnergyInt, SysState.EnergyPot, SysState.EnergyKin, SysState.EnergyIntComp[0],
	      SysState.EnergyPotComp[0], SysState.EnergyKinComp[0], SysState.EnergyIntComp[1],
	      SysState.EnergyPotComp[1], SysState.EnergyKinComp[1], SysState.EnergyIntComp[2],
	      SysState.EnergyPotComp[2], SysState.EnergyKinComp[2], SysState.EnergyIntComp[3],
	      SysState.EnergyPotComp[3], SysState.EnergyKinComp[3], SysState.EnergyIntComp[4],
	      SysState.EnergyPotComp[4], SysState.EnergyKinComp[4], SysState.EnergyIntComp[5],
	      SysState.EnergyPotComp[5], SysState.EnergyKinComp[5], SysState.MassComp[0],
	      SysState.MassComp[1], SysState.MassComp[2], SysState.MassComp[3], SysState.MassComp[4],
	      SysState.MassComp[5]);
      fflush(FdEnergy);
    }
}
void energy_statistics ( void ) { compute_global_quantities_of_system ( ) ; if ( ThisTask == 0 ) { fprintf ( FdEnergy , " \n " , All . Time , SysState . EnergyInt , SysState . EnergyPot , SysState . EnergyKin , SysState . EnergyIntComp [ 0 ] , SysState . EnergyPotComp [ 0 ] , SysState . EnergyKinComp [ 0 ] , SysState . EnergyIntComp [ 1 ] , SysState . EnergyPotComp [ 1 ] , SysState . EnergyKinComp [ 1 ] , SysState . EnergyIntComp [ 2 ] , SysState . EnergyPotComp [ 2 ] , SysState . EnergyKinComp [ 2 ] , SysState . EnergyIntComp [ 3 ] , SysState . EnergyPotComp [ 3 ] , SysState . EnergyKinComp [ 3 ] , SysState . EnergyIntComp [ 4 ] , SysState . EnergyPotComp [ 4 ] , SysState . EnergyKinComp [ 4 ] , SysState . EnergyIntComp [ 5 ] , SysState . EnergyPotComp [ 5 ] , SysState . EnergyKinComp [ 5 ] , SysState . MassComp [ 0 ] , SysState . MassComp [ 1 ] , SysState . MassComp [ 2 ] , SysState . MassComp [ 3 ] , SysState . MassComp [ 4 ] , SysState . MassComp [ 5 ] ) ; fflush ( FdEnergy ) ; } }
This routine first calls a computation of various global
 quantities of the particle distribution, and then writes some
 statistics about the energies in the various particle components to
 the file FdEnergy.
This routine first calls a computation of various global quantities of the particle distribution and then writes some statistics about the energies in the various particle components to the file FdEnergy .