[FLASH-USERS] create global variable
Ji, Suoqing
suoqing at caltech.edu
Wed Mar 17 03:09:44 EDT 2021
Hi G Rigon,
Yes, this is doable by calling the subroutine IO_setScalar. You could call this subroutine in the file Simulation_sendOutputData.F90. It might be helpful to look at Driver_sendOutputData.F90 as an example, where the “time” and “step number” are outputted to check / plot files.
In addition, just a reminder that since it’s a global variable, any change on a local processor needs to be MPI-broadcasted when necessary.
Hope this helps!
Best regards,
—
Suoqing Ji
Sherman Fairchild Fellow
TAPIR & Walter Burke Institute for Theoretical Physics
California Institute of Technology
http://www.tapir.caltech.edu/~suoqing
On Mar 16, 2021, at 11:55 PM, RIGON Gabriel <gabriel.rigon at nagoya-u.jp<mailto:gabriel.rigon at nagoya-u.jp>> wrote:
Hi,
I would like to create a global variable for my FLASH simulations. By "global variable", I mean a variable which can be written in the output file (plotfile) and which hold the same value for the whole grid. Typically it will be a variable similar to the "time" or the "step number". I don't want to create a variable defined on the grid (such as the density, velocity...).
Is there a simple way to declare such variable (for instance in the Config file)?
Best regards,
G Rigon
--
Gabriel Rigon
Laboratory for Theoretical Astronomy & Astrophysics (TA-Lab)
Graduate School of Science
Division of Particle and Astrophysical Science
Nagoya University, Japan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210317/f80206aa/attachment-0001.htm>
More information about the flash-users
mailing list