Source file misc.M
The source file misc.M contains routines to calculate the total
energy, to monitor the load balance (average, minimum and maximum number
of particles per processor) and to subtract the total average from an array.
-
Subroutine energy:
The subroutine energy calculates and prints the total energy
contained in the system. It is used to monitor energy conservation as a
test for numerical reliability.
-
Subroutine load_balance:
The subroutine load_balance prints the average, the minimum
and the maximum number of particles per processor. It also shows how which
fraction of the particle buffer is in use at present. The code aborts when
the particle buffer turns out to be too small. For best performance all
processors should treat a similar number of particles, since all processors
have to wait until the last one has finished processing the particle data.
This goal, however, may conflict with the criteria for optimal multigrid
performance (nx=ny) and for minimum communication over head.
-
Subroutine subtract_average:
This routine is used to subtract the total average from a global data
field. It is called from source file p3d.F90
to subtract the average charge in case the switch subtract_average_rho
is in use.