Time stepping¶
step_time.f90
¶
Quick access
- Routines
initialize_step_time()
,start_from_another_scheme()
,step_time()
,transp_lmloc_to_rloc()
,transp_rloc_to_lmloc()
,transp_rloc_to_lmloc_io()
Needed modules
iso_fortran_env
(output_unit()
)fields
: This module contains all the fields used in MagIC in the hybrid (LM,r) space as well as their radial derivatives. It defines both the LM-distributed arrays and the R-distributed arrays….fieldslast
: This module contains all the work arrays of the previous time-steps needed to time advance the code. They are needed in the time-stepping scheme….parallel_mod
: This module contains the blocking informationprecision_mod
: This module controls the precision used in MagICconstants
(zero()
,one()
,half()
): module containing constants and parameters used in the code.truncation
(n_r_max()
,l_max()
,l_maxmag()
,lm_max()
,fd_order()
,fd_order_bound()
): This module defines the grid points and the truncationnum_param
(n_time_steps()
,run_time_limit()
,tend()
,dtmax()
,dtmin()
,tscale()
,dct_counter()
,nl_counter()
,solve_counter()
,lm2phy_counter()
,td_counter()
,phy2lm_counter()
,f_exp_counter()
): Module containing numerical and control parametersradial_data
(nrstart()
,nrstop()
,nrstartmag()
,nrstopmag()
,n_r_icb()
,n_r_cmb()
): This module defines the MPI decomposition in the radial direction.radial_der
(get_dr_rloc()
,get_ddr_rloc()
,exch_ghosts()
,bulk_to_ghost()
): Radial derivatives functionsradial_functions
(rscheme_oc()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)logic
(l_mag()
,l_mag_lf()
,l_dtb()
,l_rms()
,l_hel()
,l_to()
,l_tomovie()
,l_r_field()
,l_cmb_field()
,l_htmovie()
,l_dtrmagspec()
,lverbose()
,l_b_nl_icb()
,l_par()
,l_b_nl_cmb()
,l_fluxprofs()
,l_viscbccalc()
,l_perppar()
,l_ht()
,l_dtbmovie()
,l_heat()
,l_conv()
,l_movie()
,l_runtimelimit()
,l_save_out()
,l_bridge_step()
,l_dt_cmb_field()
,l_chemical_conv()
,l_mag_kin()
,l_hemi()
,l_power()
,l_double_curl()
,l_pressgraph()
,l_probe()
,l_ab1()
,l_finite_diff()
,l_cond_ic()
,l_single_matrix()
,l_packed_transp()
,l_rot_ic()
,l_rot_ma()
,l_cond_ma()
,l_parallel_solve()
,l_mag_par_solve()
,l_phase_field()
,l_onset()
,l_geosmovie()
): Module containing the logicals that control the runinit_fields
(omega_ic1()
,omega_ma1()
): This module is used to construct the initial solution.lmloop_mod
(lmloop()
,finish_explicit_assembly()
,assemble_stage()
,finish_explicit_assembly_rdist()
,lmloop_rdist()
,assemble_stage_rdist()
)signals_mod
(initialize_signals()
,check_signals()
): This module handles the reading/writing of the signal.TAG file which allows to communicate with MagIC during its executiongraphout_mod
(open_graph_file()
,close_graph_file()
): This module contains the subroutines that store the 3-D graphic files.output_data
(tag()
,n_graph_step()
,n_graphs()
,n_t_graph()
,t_graph()
,n_spec_step()
,n_specs()
,n_t_spec()
,t_spec()
,n_movie_step()
,n_movie_frames()
,n_t_movie()
,t_movie()
,n_tomovie_step()
,n_tomovie_frames()
,n_t_tomovie()
,t_tomovie()
,n_pot_step()
,n_pots()
,n_t_pot()
,t_pot()
,n_rst_step()
,n_rsts()
,n_t_rst()
,t_rst()
,n_stores()
,n_log_step()
,n_logs()
,n_t_log()
,t_log()
,n_cmb_step()
,n_cmbs()
,n_t_cmb()
,t_cmb()
,n_r_field_step()
,n_r_fields()
,n_t_r_field()
,t_r_field()
,n_to_step()
,n_tos()
,n_t_to()
,t_to()
,n_probe_step()
,n_probe_out()
,n_t_probe()
,t_probe()
,log_file()
,n_log_file()
,n_time_hits()
): This module contains the parameters for output controlupdateb_mod
(get_mag_rhs_imp()
,get_mag_ic_rhs_imp()
,b_ghost()
,aj_ghost()
,get_mag_rhs_imp_ghost()
,fill_ghosts_b()
): This module handles the time advance of the magnetic field potentials b and aj as well as the inner core counterparts b_ic and aj_ic. It contains the computation of the implicit terms and the linearupdatewp_mod
(get_pol_rhs_imp()
,get_pol_rhs_imp_ghost()
,w_ghost()
,fill_ghosts_w()
,p0_ghost()
): This module handles the time advance of the poloidal potential w and the pressure p. It contains the computation of the implicit terms and the linear solves.updatewps_mod
(get_single_rhs_imp()
): This module handles the time advance of the poloidal potential w, the pressure p and the entropy s in one single matrix per degree. It contains the computation of the implicit terms and the linearupdates_mod
(get_entropy_rhs_imp()
,get_entropy_rhs_imp_ghost()
,s_ghost()
,fill_ghosts_s()
): This module handles the time advance of the entropy s. It contains the computation of the implicit terms and the linear solves….updatexi_mod
(get_comp_rhs_imp()
,get_comp_rhs_imp_ghost()
,xi_ghost()
,fill_ghosts_xi()
): This module handles the time advance of the chemical composition xi. It contains the computation of the implicit terms and the linear solves….updatephi_mod
(get_phase_rhs_imp()
,get_phase_rhs_imp_ghost()
,phi_ghost()
,fill_ghosts_phi()
): This module handles the time advance of the phase field phi. It contains the computation of the implicit terms and the linear solves….updatez_mod
(get_tor_rhs_imp()
,get_tor_rhs_imp_ghost()
,z_ghost()
,fill_ghosts_z()
): This module handles the time advance of the toroidal potential z It contains the computation of the implicit terms and the linear solves….output_mod
(output()
): This module handles the calls to the different output routines.time_schemes
(type_tscheme()
): This module defines an abstract class type_tscheme which is employed for the time advance of the code.useful
(l_correct_step()
,logwrite()
): This module contains several useful routines.communications
(lo2r_field()
,lo2r_flow()
,scatter_from_rank0_to_lo()
,lo2r_xi()
,r2lo_flow()
,r2lo_s()
,r2lo_xi()
,r2lo_field()
,lo2r_s()
,lo2r_press()
,lo2r_one()
,r2lo_one()
): This module contains the different MPI communicators used in MagIC.courant_mod
(dt_courant()
): This module handles the computation of Courant factors on grid space. It then checks whether the timestep size needs to be modified.timing
: This module contains functions that are used to measure the time spent.probe_mod
: Module for artificial sensors to compare time series of physical data with experiments. Probes are located in a radially symmetrical way
Variables
Subroutines and functions
-
subroutine
step_time_mod/
step_time
(time, tscheme, n_time_step, run_time_start)¶ This subroutine performs the actual time-stepping.
- Parameters
time [real ,inout]
tscheme [real ]
n_time_step [integer ,inout]
run_time_start [timer_type ,in]
- Called from
- Call to
check_signals()
,logwrite()
,l_correct_step()
,open_graph_file()
,transp_lmloc_to_rloc()
,radialloopg()
,finish_explicit_assembly_rdist()
,transp_rloc_to_lmloc()
,get_b_nl_bcs()
,finish_explicit_assembly()
,scatter_from_rank0_to_lo()
,transp_rloc_to_lmloc_io()
,output()
,close_graph_file()
,dt_courant()
,start_from_another_scheme()
,lmloop_rdist()
,lmloop()
,assemble_stage_rdist()
,assemble_stage()
,formattime()
-
subroutine
step_time_mod/
start_from_another_scheme
(time, l_bridge_step, n_time_step, tscheme)¶ This subroutine is used to initialize multisteps schemes whenever previous steps are not known. In that case a CN/AB2 scheme is used to bridge the missing steps.
- Parameters
time [real ,in]
l_bridge_step [logical ,in]
n_time_step [integer ,in]
tscheme [real ]
- Called from
- Call to
get_single_rhs_imp()
,bulk_to_ghost()
,exch_ghosts()
,fill_ghosts_w()
,get_pol_rhs_imp_ghost()
,get_pol_rhs_imp()
,fill_ghosts_s()
,get_entropy_rhs_imp_ghost()
,get_entropy_rhs_imp()
,fill_ghosts_z()
,get_tor_rhs_imp_ghost()
,get_tor_rhs_imp()
,fill_ghosts_xi()
,get_comp_rhs_imp_ghost()
,get_comp_rhs_imp()
,fill_ghosts_phi()
,get_phase_rhs_imp_ghost()
,get_phase_rhs_imp()
,fill_ghosts_b()
,get_mag_rhs_imp_ghost()
,get_mag_rhs_imp()
,get_mag_ic_rhs_imp()
-
subroutine
step_time_mod/
transp_lmloc_to_rloc
(comm_counter, l_rloc, lpresscalc, lhtcalc)¶ Here now comes the block where the LM distributed fields are redistributed to Rloc distribution which is needed for the radialLoop.
- Parameters
comm_counter [timer_type ,inout]
l_rloc [logical ,in]
lpresscalc [logical ,in]
lhtcalc [logical ,in]
- Called from
- Call to
-
subroutine
step_time_mod/
transp_rloc_to_lmloc
(comm_counter, istage, lrloc, lpressnext)¶ MPI transposition from r-distributed to LM-distributed
- Parameters
comm_counter [timer_type ,inout]
istage [integer ,in]
lrloc [logical ,in]
lpressnext [logical ,in]
- Called from
-
subroutine
step_time_mod/
transp_rloc_to_lmloc_io
(lpresscalc)¶ For now, most of the outputs use LM-distributed arrays as input. To handle that one has to transpose the missing fields.
- Parameters
lpresscalc [logical ,in]
- Called from
- Call to
courant.f90
¶
Description
This module handles the computation of Courant factors on grid space. It then checks whether the timestep size needs to be modified.
Quick access
- Variables
- Routines
courant()
,dt_courant()
,finalize_courant()
,initialize_courant()
Needed modules
parallel_mod
: This module contains the blocking informationprecision_mod
: This module controls the precision used in MagICtruncation
(n_phi_max()
,n_theta_max()
): This module defines the grid points and the truncationradial_data
(nrstart()
,nrstop()
): This module defines the MPI decomposition in the radial direction.radial_functions
(orho1()
,orho2()
,or4()
,or2()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)physical_parameters
(lffac()
,opm()
): Module containing the physical parametersnum_param
(delxr2()
,delxh2()
): Module containing numerical and control parametershorizontal_data
(o_sin_theta_e2()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderlogic
(l_mag()
,l_mag_lf()
,l_mag_kin()
,l_cour_alf_damp()
): Module containing the logicals that control the runuseful
(logwrite()
): This module contains several useful routines.constants
(half()
,one()
,two()
): module containing constants and parameters used in the code.
Variables
-
courant_mod/
file_handle
[integer,private]¶
-
Subroutines and functions
-
subroutine
courant_mod/
initialize_courant
(time, dt, tag)¶ This subroutine opens the timestep.TAG file which stores the time step changes of MagIC.
- Parameters
time [real ,in] :: time
dt [real ,in] :: time step
tag [character(len=*),in] :: trailing of the fime
- Called from
-
subroutine
courant_mod/
courant
(n_r, dtrkc, dthkc, vr, vt, vp, br, bt, bp, courfac, alffac)¶ courant condition check: calculates Courant advection lengths in radial direction dtrkc and in horizontal direction dthkc on the local radial level n_r
for the effective velocity, the abs. sum of fluid velocity and Alfven velocity is taken
instead of the full Alfven velocity a modified Alfven velocity is employed that takes viscous and Joule damping into account. Different Courant factors are used for the fluid velocity and the such modified Alfven velocity
- Parameters
n_r [integer ,in] :: radial level
dtrkc [real ,inout] :: Courant step (based on radial advection)
dthkc [real ,inout] :: Courant step based on horizontal advection
vr (*,*) [real ,in] :: radial velocity
vt (*,*) [real ,in] :: longitudinal velocity
vp (*,*) [real ,in] :: azimuthal velocity
br (*,*) [real ,in] :: radial magnetic field
bt (*,*) [real ,in] :: longitudinal magnetic field
bp (*,*) [real ,in] :: azimuthal magnetic field
courfac [real ,in]
alffac [real ,in]
- Called from
-
subroutine
courant_mod/
dt_courant
(l_new_dt, dt, dt_new, dtmax, dtrkc, dthkc, time)¶ This subroutine checks if the Courant criterion based on combined fluid and Alfven velocity is satisfied. It returns a new value for the time step size.
- Parameters
l_new_dt [logical ,out] :: flag indicating that time step is changed (=1) or not (=0)
dt [real ,in] :: old time step size
dt_new [real ,out] :: new time step size
dtmax [real ,in] ::
”
dtrkc (nrstop-(nrstart)+1) [real ,in] :: radial Courant time step as function of radial level
dthkc (nrstop-(nrstart)+1) [real ,in] :: horizontal Courant time step as function of radial level
time [real ,in] :: Current time
- Called from
- Call to
timing.f90
¶
Description
This module contains functions that are used to measure the time spent.
Quick access
- Types
- Routines
finalize()
,formattime()
,initialize()
,start_count()
,stop_count()
Needed modules
iso_fortran_env
(output_unit()
)mpimod
precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking information
Types
-
type
timing/
unknown_type
¶ - Type fields
%
n_counts
[integer ]%
tstart
[real ]%
ttot
[real ]
-
type
Variables
Subroutines and functions
-
subroutine
timing/
initialize
(this)¶ - Parameters
this [real ]
-
subroutine
timing/
finalize
(this[, message[, n_log_file]])¶ - Parameters
this [real ]
- Options
message [character(len=*),in,]
n_log_file [integer ,in,]
- Call to
-
subroutine
timing/
start_count
(this)¶ - Parameters
this [real ]
-
subroutine
timing/
stop_count
(this[, l_increment])¶ - Parameters
this [real ]
- Options
l_increment [logical ,in,]
-
subroutine
timing/
formattime
(n_out, message, time_in_sec)¶ - Parameters
n_out [integer ,in]
message [character(len=*),in]
time_in_sec [real ,in]
- Called from
Time schemes¶
time_schemes.f90
¶
Description
This module defines an abstract class type_tscheme which is employed for the time advance of the code.
Quick access
- Routines
Needed modules
iso_fortran_env
(output_unit()
)time_array
: This module defines two types that are defined to store the implicit/explicit terms at the different sub-stage/step.logic
(l_save_out()
): Module containing the logicals that control the runoutput_data
(log_file()
): This module contains the parameters for output controlprecision_mod
: This module controls the precision used in MagIC
Types
-
type
time_schemes/
unknown_type
¶ - Type fields
%
alffac
[real ]%
courfac
[real ]%
dt
(*) [real ,allocatable]%
family
[character(len=10)]%
intfac
[real ]%
istage
[integer ]%
l_assembly
[logical ]%
l_exp_calc
(*) [logical ,allocatable]%
l_imp_calc_rhs
(*) [logical ,allocatable]%
nexp
[integer ]%
nimp
[integer ]%
nold
[integer ]%
nstages
[integer ]%
time_scheme
[character(len=8)]%
wimp_lin
(*) [real ,allocatable]
-
type
Subroutines and functions
-
subroutine
time_schemes/
print_info
(this, n_log_file)¶ This subroutine prints some informations about the time stepping scheme
- Parameters
this [real ]
n_log_file [integer ,inout] :: File unit of the log.TAG file
- Called from
multistep_schemes.f90
¶
Description
This module defines the type_multistep which inherits from the abstract type_tscheme. It actually implements all the routine required to time-advance an IMEX multistep scheme such as CN/AB2, SBDF(2,3,4), CNLF, …
Quick access
- Routines
assemble_imex()
,assemble_imex_scalar()
,bridge_with_cnab2()
,get_time_stage()
,rotate_imex()
,rotate_imex_scalar()
,set_dt_array()
,set_imex_rhs()
,set_imex_rhs_ghost()
,set_imex_rhs_scalar()
,set_weights()
,start_with_ab1()
Needed modules
precision_mod
: This module controls the precision used in MagICiso_fortran_env
(output_unit()
)parallel_mod
: This module contains the blocking informationnum_param
(alpha()
): Module containing numerical and control parametersconstants
(one()
,half()
,two()
,zero()
): module containing constants and parameters used in the code.mem_alloc
(bytes_allocated()
): This little module is used to estimate the global memory allocation used in MagICuseful
(abortrun()
): This module contains several useful routines.output_data
(log_file()
): This module contains the parameters for output controllogic
(l_save_out()
): Module containing the logicals that control the runtime_schemes
(type_tscheme()
): This module defines an abstract class type_tscheme which is employed for the time advance of the code.time_array
: This module defines two types that are defined to store the implicit/explicit terms at the different sub-stage/step.
Types
-
type
multistep_schemes/
unknown_type
¶ - Type fields
%
wexp
(*) [real ,allocatable]%
wimp
(*) [real ,allocatable]
-
type
Subroutines and functions
-
subroutine
multistep_schemes/
initialize
(this, time_scheme, courfac_nml, intfac_nml, alffac_nml)¶ This subroutine allocates the arrays involved in the time advance of an IMEX multistep scheme.
- Parameters
this [real ]
time_scheme [character(len=72),inout]
courfac_nml [real ,in]
intfac_nml [real ,in]
alffac_nml [real ,in]
-
subroutine
multistep_schemes/
finalize
(this)¶ This subroutine deallocates the arrays involved in the time advance of an IMEX multistep scheme.
- Parameters
this [real ]
-
subroutine
multistep_schemes/
set_weights
(this, lmatnext)¶ This subroutine computes the weights involved in the time advance of an IMEX multistep scheme.
- Parameters
this [real ]
lmatnext [logical ,inout]
-
subroutine
multistep_schemes/
set_dt_array
(this, dt_new, dt_min, time, n_log_file, n_time_step, l_new_dtnext)¶ This subroutine adjusts the time step
- Parameters
this [real ]
dt_new [real ,in] :: New time step size
dt_min [real ,in] :: Minimum elligible time step before MagIC stops
time [real ,in] :: Time
n_log_file [integer ,inout]
n_time_step [integer ,in]
l_new_dtnext [logical ,in]
- Call to
-
subroutine
multistep_schemes/
set_imex_rhs
(this, rhs, dfdt)¶ This subroutine assembles the right-hand-side of an IMEX scheme
- Parameters
- Call to
-
subroutine
multistep_schemes/
set_imex_rhs_ghost
(this, rhs, dfdt, start_lm, stop_lm, ng)¶ This subroutine assembles the right-hand-side of an IMEX scheme for R-distributed arrays (finite difference with parallel solvers).
-
subroutine
multistep_schemes/
set_imex_rhs_scalar
(this, rhs, dfdt)¶ This subroutine assembles the right-hand-side of an IMEX scheme
- Parameters
this [real ]
rhs [real ,out]
dfdt [type_tscalar ,in]
-
subroutine
multistep_schemes/
rotate_imex
(this, dfdt)¶ This subroutine is used to roll the time arrays from one time step
- Parameters
this [real ]
dfdt [type_tarray ,inout]
- Call to
-
subroutine
multistep_schemes/
rotate_imex_scalar
(this, dfdt)¶ This subroutine is used to roll the time arrays from one time step
- Parameters
this [real ]
dfdt [type_tscalar ,inout]
-
subroutine
multistep_schemes/
bridge_with_cnab2
(this)¶ This subroutine is used to run the first bridging steps of an IMEX multistep scheme using a CN/AB2 scheme.
- Parameters
this [real ]
-
subroutine
multistep_schemes/
start_with_ab1
(this)¶ This subroutine is used to compute the first explicit iteration with an explicit Euler (AB1) scheme.
- Parameters
this [real ]
-
subroutine
multistep_schemes/
get_time_stage
(this, tlast, tstage)¶ - Parameters
this [real ]
tlast [real ,in]
tstage [real ,out]
-
subroutine
multistep_schemes/
assemble_imex
(this, rhs, dfdt)¶
-
subroutine
multistep_schemes/
assemble_imex_scalar
(this, rhs, dfdt)¶ - Parameters
this [real ]
rhs [real ,out]
dfdt [type_tscalar ,in]
dirk_schemes.f90
¶
Description
This module defines the type_dirk which inherits from the abstract type_tscheme. It actually implements all the routine required to time-advance an diagonally implicit Runge-Kutta scheme. It makes use of Butcher tables to construct the right-hand-sides.
Needed modules
iso_fortran_env
(output_unit()
)precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationnum_param
(alpha()
): Module containing numerical and control parametersconstants
(one()
,half()
,two()
,zero()
): module containing constants and parameters used in the code.mem_alloc
(bytes_allocated()
): This little module is used to estimate the global memory allocation used in MagICuseful
(abortrun()
): This module contains several useful routines.logic
(l_save_out()
): Module containing the logicals that control the runoutput_data
(log_file()
): This module contains the parameters for output controltime_schemes
(type_tscheme()
): This module defines an abstract class type_tscheme which is employed for the time advance of the code.time_array
: This module defines two types that are defined to store the implicit/explicit terms at the different sub-stage/step.
Types
-
type
dirk_schemes/
unknown_type
¶ - Type fields
%
butcher_ass_exp
(*) [real ,allocatable]%
butcher_ass_imp
(*) [real ,allocatable]%
butcher_c
(*) [real ,allocatable]%
butcher_exp
(*,*) [real ,allocatable]%
butcher_imp
(*,*) [real ,allocatable]
-
type
Subroutines and functions
-
subroutine
dirk_schemes/
initialize
(this, time_scheme, courfac_nml, intfac_nml, alffac_nml)¶ - Parameters
this [real ]
time_scheme [character(len=72),inout]
courfac_nml [real ,in]
intfac_nml [real ,in]
alffac_nml [real ,in]
-
subroutine
dirk_schemes/
finalize
(this)¶ - Parameters
this [real ]
-
subroutine
dirk_schemes/
set_weights
(this, lmatnext)¶ - Parameters
this [real ]
lmatnext [logical ,inout]
-
subroutine
dirk_schemes/
set_dt_array
(this, dt_new, dt_min, time, n_log_file, n_time_step, l_new_dtnext)¶ This subroutine adjusts the time step
- Parameters
this [real ]
dt_new [real ,in]
dt_min [real ,in]
time [real ,in]
n_log_file [integer ,inout]
n_time_step [integer ,in]
l_new_dtnext [logical ,in]
- Call to
-
subroutine
dirk_schemes/
set_imex_rhs
(this, rhs, dfdt)¶ This subroutine assembles the right-hand-side of an IMEX scheme
- Parameters
- Call to
-
subroutine
dirk_schemes/
set_imex_rhs_ghost
(this, rhs, dfdt, start_lm, stop_lm, ng)¶ This subroutine assembles the right-hand-side of an IMEX scheme in case an array with ghosts zones is provided
-
subroutine
dirk_schemes/
assemble_imex
(this, rhs, dfdt)¶ This subroutine performs the assembly stage of an IMEX-RK scheme
- Parameters
- Call to
-
subroutine
dirk_schemes/
set_imex_rhs_scalar
(this, rhs, dfdt)¶ This subroutine assembles the right-hand-side of an IMEX scheme
- Parameters
this [real ]
rhs [real ,out]
dfdt [type_tscalar ,in]
-
subroutine
dirk_schemes/
assemble_imex_scalar
(this, rhs, dfdt)¶ This subroutine performs the assembly stage of an IMEX-RK scheme for a scalar quantity
- Parameters
this [real ]
rhs [real ,out]
dfdt [type_tscalar ,in]
-
subroutine
dirk_schemes/
rotate_imex
(this, dfdt)¶ This subroutine is used to roll the time arrays from one time step
- Parameters
this [real ]
dfdt [type_tarray ,inout]
-
subroutine
dirk_schemes/
rotate_imex_scalar
(this, dfdt)¶ This subroutine is used to roll the time arrays from one time step
- Parameters
this [real ]
dfdt [type_tscalar ,inout]
-
subroutine
dirk_schemes/
bridge_with_cnab2
(this)¶ - Parameters
this [real ]
-
subroutine
dirk_schemes/
start_with_ab1
(this)¶ - Parameters
this [real ]
-
subroutine
dirk_schemes/
get_time_stage
(this, tlast, tstage)¶ - Parameters
this [real ]
tlast [real ,in]
tstage [real ,out]
time_array.f90
¶
Description
This module defines two types that are defined to store the implicit/explicit terms at the different sub-stage/step.
Quick access
- Routines
Needed modules
precision_mod
: This module controls the precision used in MagICconstants
(zero()
): module containing constants and parameters used in the code.mem_alloc
(bytes_allocated()
): This little module is used to estimate the global memory allocation used in MagIC
Types
-
type
time_array/
unknown_type
¶ - Type fields
%
expl
(*,*,*) [complex ,pointer]%
impl
(*,*,*) [complex ,allocatable]%
l_exp
[logical ]%
llm
[integer ]%
nrstart
[integer ]%
nrstop
[integer ]%
old
(*,*,*) [complex ,allocatable]%
ulm
[integer ]
-
type
-
type
time_array/
unknown_type
- Type fields
%
expl
(*) [real ,allocatable]%
impl
(*) [real ,allocatable]%
old
(*) [real ,allocatable]
-
type
Subroutines and functions
-
subroutine
time_array/
initialize
(this, llm, ulm, nrstart, nrstop, nold, nexp, nimp[, l_allocate_exp])¶ Memory allocation of the arrays and initial values set to zero
- Parameters
this [real ]
llm [integer ,in]
ulm [integer ,in]
nrstart [integer ,in]
nrstop [integer ,in]
nold [integer ,in]
nexp [integer ,in]
nimp [integer ,in]
- Options
l_allocate_exp [logical ,in,]
-
subroutine
time_array/
finalize
(this)¶ Memory deallocation
- Parameters
this [real ]
-
subroutine
time_array/
initialize_scalar
(this, nold, nexp, nimp)¶ This routine initializes time stepper help arrays in case of a scalar
- Parameters
this [real ]
nold [integer ,in] :: Number of old states
nexp [integer ,in] :: Number of explicit states
nimp [integer ,in] :: Number of implicit states
-
subroutine
time_array/
finalize_scalar
(this)¶ Memory deallocation
- Parameters
this [real ]