23 integer :: iigrid, igrid{#ifdef evolvingboundary , morton_no}
34 do iigrid=1,igridstail; igrid=igrids(iigrid);
39 {
#IFDEF EVOLVINGBOUNDARY
41 do morton_no=morton_start(
mype),morton_stop(
mype)
42 igrid=sfc_to_igrid(morton_no)
45 call mpi_allreduce(mpi_in_place,sfc_phybound,nleafs,mpi_integer,&
61 integer,
intent(in) :: igrid
68 call mpistop(
"usr_init_one_grid not defined")
81 integer :: iigrid, igrid
83 do iigrid=1,igridstail; igrid=igrids(iigrid);
88 call mpistop(
"usr_init_one_grid not defined")
subroutine, public alloc_node(igrid)
allocate arrays on igrid node
subroutine, public mpistop(message)
Exit MPI-AMRVAC with an error message.
subroutine recalculateb
re-calculate the magnetic field from the vector potential in a completely divergency free way
subroutine, public build_connectivity
subroutine, public getigrids
subroutine, public init_forest_root
build root forest
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...
type(state), pointer block
Block pointer for using one block and its previous state.
double precision global_time
The global simulation time.
integer, parameter ndim
Number of spatial dimensions for grid variables.
logical stagger_grid
True for using stagger grid.
logical, dimension(:), allocatable phyboundblock
True if a block has any physical boundary.
integer icomm
The MPI communicator.
integer mype
The rank of the current MPI task.
double precision, dimension(:), allocatable, parameter d
integer ixm
the mesh range of a physical block without ghost cells
integer ierrmpi
A global MPI error return code.
double precision, dimension(:,:), allocatable rnode
Corner coordinates.
double precision, dimension(^nd) dxlevel
store unstretched cell size of current level
logical use_multigrid
Use multigrid (only available in 2D and 3D)
logical slab_uniform
uniform Cartesian geometry or not (stretched Cartesian)
subroutine, public improve_initial_condition()
improve initial condition after initialization
subroutine, public initlevelone
Generate and initialize all grids at the coarsest level (level one)
subroutine, public modify_ic
modify initial condition
subroutine, public initial_condition(igrid)
fill in initial condition
Module to couple the octree-mg library to AMRVAC. This file uses the VACPP preprocessor,...
subroutine mg_setup_multigrid()
Setup multigrid for usage.
This module defines the procedures of a physics module. It contains function pointers for the various...
procedure(sub_clean_divb), pointer phys_clean_divb
Module with all the methods that users can customize in AMRVAC.
procedure(p_no_args), pointer usr_improve_initial_condition
procedure(init_one_grid), pointer usr_init_one_grid
Initialize earch grid block data.
procedure(init_vector_potential), pointer usr_init_vector_potential