[FLASH-USERS] Output files

Ryan Farber rjfarber at umich.edu
Sun May 17 18:43:42 EDT 2020


Hi Petr,

While I have not modified the dat file before, note that it should be easy
to write to stdout.
For example, if you're debugging and want to know the minimum and maximum
density before your code crashes you can do
==========
!! some flash file
use physicaldata, ONLY : unk
use Driver_data, ONLY : dr_globalMe ! or you can use pt_globalMe if you're
in a Particle file and want to stay modular for example

if (dr_globalMe == MASTER_PE) then
  write(*,*) "max dens: ", maxval(unk(DENS_VAR,:,:,:,:)) ! unk has indices
to variables, i, j, k, blocks
  write(*,*) "min dens: ", minval(unk(DENS_VAR,:,:,:,:))
endif
=========
Note that it's probably safer (especially for getting the minimum values, I
don't remember if the above will just yield zero) to loop over list of
blocks to find the maximum, minimum. Or do an MPI_ALLREDUCE. Many options :)

Best,
--------
Ryan


On Sun, May 17, 2020 at 2:04 AM petrk <petrk at physics.muni.cz> wrote:

> Hello users,
>
> Is there any possibility to write output data (for example for some
> particular quantities - density, pressure, etc.) explicitly to the ordinary
> .dat file and not to hdf?
>
> Thanks a lot,
>
> Petr
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20200517/bdbf94ec/attachment-0001.htm>


More information about the flash-users mailing list