The MPI - Adaptive Mesh Refinement - Versatile Advection Code
Data Types | Modules | Functions/Subroutines | Variables
mod_supertimestepping.t File Reference

Go to the source code of this file.

Data Types

interface  mod_supertimestepping::subr2
 interface for the function which gets the timestep in dtnew in the derived type More...
interface  mod_supertimestepping::subr_e
 interface for error handling subroutine in the derived type More...
interface  mod_supertimestepping::subr5
 interface for the subroutines before_first_cycle and after_last_cycle in the derived type More...
interface  mod_supertimestepping::subr3
 for the subroutines in this module, which do not depend on the term, but on the parameter sts_method = 1/2 in the parameter file sts_add_source More...


module  mod_supertimestepping
 Generic supertimestepping method 1) in amrvac.par in sts_list set the following parameters which have the default values: sts_dtpar=0.9,sts_ncycles=1000,sts_method=1,sourcetype_sts=2 These parametes are general for all the methods added TODO: check if there is any need to have terms implemented with different sets of parameters, and these cannot be general anymore 2) then add programatically in the code a term with the subroutine add_sts_method This method takes as parameters a function which calculated the explicit timestep associated with the term, a subroutine which sets the source term types for the BC and the BC are generated from the variables startVar:endVar flux conservation (fixconserve) is done for the variables specified by ixChangeStart, ixChangeN, ixChangeFixC The following two steps are done in this way as in fortran it is not allowed to pass null function pointers as parameters: 3)in order to to have hooks before_first_cycle, after_last_cycle (e.g. conversion from e_tot to e_int before first sts cycle and back from e_int to e_tot after the last STS cycle for the thermal conductivity module) add them just afterwards with the subroutine set_conversion_methods_to_head 4) to add the hook for error handling (e.g check small values in the thermal conductivity module ) call set_error_handling_to_head which takes as parameter a subroutine the error handling subroutine is called before setting BC.


subroutine, public mod_supertimestepping::sts_init ()
 Initialize sts module. More...
pure logical function, public mod_supertimestepping::is_sts_initialized ()
subroutine, public mod_supertimestepping::add_sts_method (sts_getdt, sts_set_sources, startVar, nflux, startwbc, nwbc, evolve_B)
 subroutine which added programatically a term to be calculated using STS Params: sts_getdt function calculates the explicit timestep for this term sts_set_sources subroutine sets the source term startVar, endVar, nflux indices of start, end, and number of the variables that need fix conservation startwbc, nwbc indices of start and number of the variables that need ghost cell exchange These terms implemented by an element of the derived type sts_term are put in a linked list More...
subroutine, public mod_supertimestepping::set_conversion_methods_to_head (sts_before_first_cycle, sts_after_last_cycle)
 Set the hooks called before the first cycle and after the last cycle in the STS update This method should be called after add_sts_method. The hooks are added to the last term added with this subroutine Params: sts_before_first_cycle, sts_after_last_cycle subroutines which implement the hooks called before first cycle and after last cycle. More...
subroutine, public mod_supertimestepping::set_error_handling_to_head (sts_error_handling)
 Set the hook of error handling in the STS update. This method is called before updating the BC. This method should be called after add_sts_method. The hook is added to the last term added with this subroutine. Param: sts_error_handing the subroutine which handles the errors. More...
integer function mod_supertimestepping::sts_get_ncycles1 (dt, dtnew, dt_modified)
 method used to set the number of cycles for the STS1 method More...
logical function, public mod_supertimestepping::set_dt_sts_ncycles (my_dt)
 This sets the explicit dt and calculates the number of cycles for each of the terms implemented with STS. More...
pure double precision function mod_supertimestepping::chev (j, nu, N)
double precision function mod_supertimestepping::sum_chev (nu, N, limMax)
subroutine mod_supertimestepping::sts_add_source1 (my_dt)
 Iterates all the terms implemented with STS and adds the sources STS method 1 implementation. More...


integer, parameter, public mod_supertimestepping::sourcetype_sts_prior =0
integer, parameter, public mod_supertimestepping::sourcetype_sts_after =1
integer, parameter, public mod_supertimestepping::sourcetype_sts_split =2
integer, public mod_supertimestepping::sourcetype_sts = sourcetype_sts_split
procedure(subr3), pointer, public mod_supertimestepping::sts_add_source