ruser_mesh_data values on restart #470
-
I have a time-dependent black hole interior to my spherical inner boundary (i.e. not on the grid) that is accreting mass through the inner boundary. The black hole contributes to the gravity felt by the gas that is on the grid. When I restart the simulation, I need to initialize the mass of the BH based on what it was at the time the restart file was generated. Reading the Wiki, it seems like I should be able to store the BH mass in a ruser_mesh_data variable and that value will be written to the restart file and then available upon restart. Is that correct? I am finding that after restart, the ruser_mesh_data variable is equal to 0 (it should be, e.g., 60) because the ruser_mesh_data arrays are allocated in InitUserMeshData, which is called again upon restart. Am I misunderstanding what is supposed to happen to these data upon restart? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
While the user-defined mesh/meshblock data are stored in a restart file and restored in the restarting process,
as written on the Wiki. So please make sure that you synchronize the data stored in ruser_mesh_data. You can do so, for example, using MPI_Allreduce in Mesh::UserWorkInLoop. |
Beta Was this translation helpful? Give feedback.
While the user-defined mesh/meshblock data are stored in a restart file and restored in the restarting process,
as written on the Wiki. So please make sure that you synchronize the data stored in ruser_mesh_data. You can do so, for example, using MPI_Allreduce in Mesh::UserWorkInLoop.