Below you can find a list of frequently asked questions and answers.
There is a mailing list for the related AMRVAC code that you can send questions to: amrvacsers@ls.kuleuven.be
You can join the mailing-list by subscribing, so that you will be informed about important changes or (bug)fixes. You can also search the mailing list archive.
If you find issues or have feature requests specific to AGILE, its best to do this by raising a github issue.
agile.par ?Indeed, there is a quick and time-saving way to read your own parameters without having to give an explicit value in the usr file and recompile each time. Instead, add this in your usr file :
!> Read parameters from a file
subroutine params_read(files)
use mod_global_parameters, only: unitpar
character(len=*), intent(in) :: files(:)
integer :: n
namelist /my_list/ my_parameter_1, my_parameter_2 ! where you tell the code to read your own parameters
do n = 1, size(files)
open(unitpar, file=trim(files(n)), status="old")
read(unitpar, my_list, end=111)
111 close(unitpar)
end do
end subroutine params_read
with my_parameter_1 and my_parameter_2 to be defined at the very beginning of the user file, just before the “contains” statement. Doing so, you can use them anywhere in the usr file and they will have the value you defined in your par file adding the following lines :
&my_list
my_parameter_1 = 0.2d0
my_parameter_2 = 1.d0
/
convert_type= 'onegrid') back into standard output .dat that I can use to restart a simulation. My goal is to be able to change my data mid-simulation through another program.The idea of the onegrid option for conversion is that a hierarchical block AMR grid (as stored in the .dat files) can be saved to an equivalent uniform grid representation at a user-chosen level (combine level_io with onegrid). You then can use any software you like to handle uniform grid data. Converting back to the .dat format is then impossible. However, you can write a user-routine to read in the uniform data, and then use it to restart a similar uniform-grid (no AMR, just domain decomposed) simulation. The .dat files are all that is needed to do restarts.
If you want to change the data during the simulation, in principle you do not need another program to do that. For that purpose, we provide the generic subroutines
usr_process_grid
usr_process_global
or immediately after the advance step:
usr_process_adv_grid
usr_process_adv_global
or just once, at restart (and after reading in a .dat file), then use
which allows you to modify things during runtime (of course, it should make physical sense). See their interface in mod_usr_methods.t.
The logical variable save_physical_boundary can be set to true, which enforces the .dat files to also contain the ghost cell information for physical boundaries (i.e., those beyond the left or right edge of the domain, in each direction). You can use this file (like any other .dat file, to restart, and this helps if you want to use saved boundary info in your boundary value handling. However, all our present conversion options (like e.g. to .vtu files) do not store this extra info, and you can therefore not use them for visualizing the ghost cell info. For that, you will need to handle the .dat files directly, e.g. using python.
This means that your MPI library was compiled with a different version of
gfortran (and GCC) than you are using now. If you run on a cluster, contact
their support and ask them to fix it.
If you encounter this problem on your own machine, you can try to: