27 logical,
intent(in) :: prior
31 double precision :: w1(ixg^t,1:nw)
32 double precision :: qt
33 integer :: iigrid, igrid
53 if ((.not.prior).and.&
67 do iigrid=1,igridstail_active; igrid=igrids_active(iigrid);
72 call addsource2(0.5d0*
dt,0.5d0,ixg^
ll,
ixm^
ll,1,nw,qt,ps(igrid)%w,w1,qt,ps(igrid)%w,&
73 ps(igrid)%x,.true.,src_active)
78 do iigrid=1,igridstail_active; igrid=igrids_active(iigrid);
83 call addsource2(
dt ,1d0,ixg^
ll,
ixm^
ll,1,nw,qt,ps(igrid)%w,w1,qt,ps(igrid)%w,&
84 ps(igrid)%x,.true.,src_active)
89 do iigrid=1,igridstail_active; igrid=igrids_active(iigrid);
94 call addsource2(0.5d0*
dt,0.5d0,ixg^
ll,ixg^
ll,1,nw,qt,ps(igrid)%w,w1,qt,ps(igrid)%w,&
95 ps(igrid)%x,.true.,src_active)
96 call addsource2(
dt ,1d0,ixg^
ll,
ixm^
ll,1,nw,qt,ps(igrid)%w,w1,qt,ps(igrid)%w,&
97 ps(igrid)%x,.true.,src_active)
102 do iigrid=1,igridstail_active; igrid=igrids_active(iigrid);
107 call addsource2(0.25d0*
dt,0.25d0,ixg^
ll,ixg^
ll,1,nw,qt,ps(igrid)%w,w1,qt,ps(igrid)%w,&
108 ps(igrid)%x,.true.,src_active)
109 call addsource2(0.5d0*
dt,0.5d0,ixg^
ll,
ixm^
ll,1,nw,qt,ps(igrid)%w,w1,qt,ps(igrid)%w,&
110 ps(igrid)%x,.true.,src_active)
115 call mpistop(
"Error: Unknown type of sourcesplit!")
130 subroutine addsource2(qdt,dtfactor,ixI^L,ixO^L,iw^LIM,qtC,wCT,wCTprim,qt,&
131 w,x,qsourcesplit,src_active)
137 integer,
intent(in) :: ixi^
l, ixo^
l, iw^lim
138 double precision,
intent(in) :: qdt, dtfactor, qtc, qt
139 double precision,
intent(in) :: wct(ixi^s,1:nw), wctprim(ixi^s,1:nw), x(ixi^s,1:
ndim)
140 double precision,
intent(inout) :: w(ixi^s,1:nw)
141 logical,
intent(in) :: qsourcesplit
142 logical,
intent(inout),
optional :: src_active
144 logical :: tmp_active
156 call phys_add_source(qdt,dtfactor,ixi^
l,ixo^
l,wct,wctprim,w,x,qsourcesplit,tmp_active)
158 if (
present(src_active)) src_active = src_active .or. tmp_active
subroutine, public mpistop(message)
Exit MPI-AMRVAC with an error message.
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.
logical source_split_usr
Use split or unsplit way to add user's source terms, default: unsplit.
logical any_source_split
if any normal source term is added in split fasion
double precision global_time
The global simulation time.
integer, parameter ndim
Number of spatial dimensions for grid variables.
double precision, dimension(:), allocatable, parameter d
double precision dt
global time step
integer, parameter unitterm
Unit for standard output.
double precision, dimension(:,:), allocatable rnode
Corner coordinates.
double precision, dimension(^nd) dxlevel
store unstretched cell size of current level
This module defines the procedures of a physics module. It contains function pointers for the various...
procedure(sub_convert), pointer phys_to_primitive
logical phys_req_diagonal
Whether the physics routines require diagonal ghost cells, for example for computing a curl.
procedure(sub_global_source), pointer phys_global_source_after
procedure(sub_add_source), pointer phys_add_source
Module for handling split source terms (split from the fluxes)
subroutine, public addsource2(qdt, dtfactor, ixIL, ixOL, iwLIM, qtC, wCT, wCTprim, qt, w, x, qsourcesplit, src_active)
Add source within ixO for iws: w=w+qdt*S[wCT].
integer sourcesplit
How to apply dimensional splitting to the source terms, see Discretization.
integer, parameter sourcesplit_ssf
integer, parameter sourcesplit_ssfss
integer, parameter sourcesplit_sfs
integer, parameter sourcesplit_sf
subroutine, public add_split_source(prior)
Generic supertimestepping method 1) in amrvac.par in sts_list set the following parameters which have...
integer, public sourcetype_sts
pure logical function, public is_sts_initialized()
integer, parameter, public sourcetype_sts_prior
integer, parameter, public sourcetype_sts_split
integer, parameter, public sourcetype_sts_after
procedure(subr3), pointer, public sts_add_source
Module with all the methods that users can customize in AMRVAC.
procedure(source), pointer usr_source