12 integer :: igrid, iigrid, levnew
27 do iigrid=1,igridstail; igrid=igrids(iigrid);
28 ps1(igrid)%w = pso(igrid)%w
29 pso(igrid)%w = ps(igrid)%w
30 ps(igrid)%w = ps1(igrid)%w
73 integer :: igrid,iigrid, my_levmin, my_levmax
85 do iigrid=1,igridstail; igrid=igrids(iigrid);
100 if(
mype .eq. 0)
write(*,*)
'Using TRACL(ine) global method'
101 if(
mype .eq. 0)
write(*,*)
'By default, magnetic field lines are traced every 4 grid cells'
105 if(
mype .eq. 0)
write(*,*)
'Using TRACB(lock) global method'
106 if(
mype .eq. 0)
write(*,*)
'Currently, only valid in Cartesian uniform settings'
107 if(
mype .eq. 0)
write(*,*)
'By default, magnetic field lines are traced every 4 grid cells'
111 if(
mype .eq. 0)
write(*,*)
'Using TRACL(ine) method with a mask'
112 if(
mype .eq. 0)
write(*,*)
'By default, magnetic field lines are traced every 4 grid cells'
116 if(
mype .eq. 0)
write(*,*)
'Using TRACB(lock) method with a mask'
117 if(
mype .eq. 0)
write(*,*)
'Currently, only valid in Cartesian uniform settings'
118 if(
mype .eq. 0)
write(*,*)
'By default, magnetic field lines are traced every 4 grid cells'
subroutine resettree_convert
Force the tree to desired level(s) from level_io(_min/_max) used for conversion to vtk output.
subroutine initialize_after_settree
subroutine settree
Build up AMR.
subroutine resettree
reset AMR and (de)allocate boundary flux storage at level changes
subroutine errest
Do all local error estimation which determines (de)refinement.
subroutine forcedrefine_grid_io(igrid, w)
Module containing all the time stepping schemes.
subroutine, public advance(iit)
Advance all the grids over one time step, including all sources.
subroutine, public deallocatebfaces
Module to coarsen and refine grids for AMR.
subroutine, public amr_coarsen_refine
coarsen and refine blocks to update AMR grid
Module for flux conservation near refinement boundaries.
subroutine, public deallocatebflux
subroutine, public allocatebflux
update ghost cells of all blocks including physical boundaries
subroutine getbc(time, qdt, psb, nwstart, nwbc, req_diag)
do update ghost cells of all blocks including physical boundaries
This module contains definitions of global parameters and variables and some generic functions/subrou...
double precision global_time
The global simulation time.
logical stagger_grid
True for using stagger grid.
integer mype
The rank of the current MPI task.
logical phys_trac
Use TRAC (Johnston 2019 ApJL, 873, L22) for MHD or 1D HD.
logical reset_grid
If true, rebuild the AMR grid upon restarting.
integer refine_max_level
Maximal number of AMR levels.
subroutine init_trac_block(mask)
subroutine init_trac_line(mask)
subroutine setdt()
setdt - set dt for all levels between levmin and levmax. dtpar>0 --> use fixed dtpar for all level dt...