9 integer,
allocatable,
public ::
mag(:)
18 integer,
intent(in) :: ixi^
l, ixo^
l
19 double precision,
intent(in) :: w(ixi^s,1:nw)
20 double precision,
intent(inout) :: divb(ixi^s)
21 integer,
intent(in),
optional :: nth_in
22 integer :: ixc^
l, idir, nth
24 if(
present(nth_in))
then
33 ixc^
l=ixo^
l-
kr(idir,^
d);
34 divb(ixo^s)=divb(ixo^s)+
block%ws(ixo^s,idir)*
block%surfaceC(ixo^s,idir)-&
35 block%ws(ixc^s,idir)*
block%surfaceC(ixc^s,idir)
37 divb(ixo^s)=divb(ixo^s)/
block%dvolume(ixo^s)
subroutine, public get_divb(w, ixil, ixol, divb, nth_in)
Calculate div B within ixO.
integer, dimension(:), allocatable, public mag
Indices of the magnetic field.
Module with geometry-related routines (e.g., divergence, curl)
subroutine divvector(qvec, ixil, ixol, divq, nth_in)
subroutine divvectors(qvec, ixil, ixol, divq)
Calculate divergence of a vector qvec within ixL using limited extrapolation to cell edges.
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.
integer, dimension(3, 3) kr
Kronecker delta tensor.
integer, parameter ndim
Number of spatial dimensions for grid variables.
logical stagger_grid
True for using stagger grid.
character(len=std_len) typediv
double precision, dimension(:), allocatable, parameter d
integer ndir
Number of spatial dimensions (components) for vector variables.