FLASH-X
Doxygen Generated Documentation From Interface Source Code
Functions/Subroutines
Grid_conserveFluxes.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine Grid_conserveFluxes (axis, coarse_level)
 

Function/Subroutine Documentation

◆ Grid_conserveFluxes()

subroutine Grid_conserveFluxes ( integer  axis,
integer  coarse_level 
)

Flux conservation is necessary when 2 blocks of differing levels (meaning having different grid spacings) border one another.

This routine can perform flux conservation on the finest blocks eveywhere, the most typical usage for the Paramesh Grid, or on blocks of a certain level.

The routine overwrites the flux arrays maintained by the Grid unit.

axis - conserve fluxes in just one direction if IAXIS, JAXIS, KAXIS, or in all directions if ALLDIR. These constants are defined in constants.h.

coarse_level - refinement level. Selects the level (coarse level) for which fluxes are updated. Can be UNSPEC_LEVEL for all levels (except, as an optimizing shortcut, the highest possible one).

NOTES

Some implementations might ignore the level arguments, and always act as if it were UNSPEC_LEVEL.

This routine should only get called when Flash-X is configured to use level-wide flux arrays, i.e., when levelFlux source directories are included.

In comparison to Grid_communicateFluxes (which is to be used when a setup is configured without level-wide fluxe), invoking this routine triggers not only data communication within SPFS (like the latter), but also (unlike the latter) the copying of flux data from SPFS back to flux arrays.

SPFS means semi-permanent flux storage.

SEE ALSO

Grid_communicateFluxes

Definition at line 61 of file Grid_conserveFluxes.F90.