Closed liangwang0734 closed 1 month ago
What you want to do here is to make sure to dump out data in double precision (-h5double
) and dump both the conservative variables (cons
) and face centered B-fields (b
). Then you basically just use the code from https://github.com/PrincetonUniversity/athena/blob/master/src/pgen/from_array.cpp in your pgen to read those hdf5 files and set the corresponding mesh block data.
Thank you @msbc , I will try that.
@liangwang0734 I just realized that I forgot to mention that the -h5double
flag is a configuration time option, so you'll have to recompile your athena executable.
Hi Athena++ community, how I can set the state variable values in a restart file using an external data source (with B field also on Yee mesh)?