FE-Project
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
scale_timeint_rk Module Reference

module common / Runge-Kutta scheme More...

Data Types

type  timeint_rk
 

Functions/Subroutines

subroutine timeint_rk_init (this, rk_scheme_name, dt, var_num, ndim, size_each_var)
 

Detailed Description

module common / Runge-Kutta scheme

Description
Driver module to provide various Runge-Kutta schemes.
Author
Yuta Kawai, Team SCALE

Function/Subroutine Documentation

◆ timeint_rk_init()

subroutine scale_timeint_rk::timeint_rk_init ( class(timeint_rk), intent(inout) this,
character(*), intent(in) rk_scheme_name,
real(rp), intent(in) dt,
integer, intent(in) var_num,
integer, intent(in) ndim,
integer, dimension(ndim), intent(in) size_each_var )

Definition at line 116 of file scale_timeint_rk.F90.

118
122 implicit none
123 class(timeint_rk), intent(inout) :: this
124 character(*), intent(in) :: rk_scheme_name
125 real(RP), intent(in) :: dt
126 integer, intent(in) :: var_num
127 integer, intent(in) :: ndim
128 integer, intent(in) :: size_each_var(ndim)
129 !----------------------------------------
130
131 this%dt = dt
132 this%ndim = ndim
133 this%var_num = 1
134 allocate( this%size_each_var(ndim) )
135 this%size_each_var(:) = size_each_var(:)
136
137 call timeint_rk_butcher_tab_get_info( rk_scheme_name, & ! (in)
138 this%nstage, this%tend_buf_size, & ! (out)
139 this%low_storage_flag, this%imex_flag ) ! (out)
140
141 allocate ( this%coef_a_ex(this%nstage,this%nstage), this%coef_b_ex(this%nstage), this%coef_c_ex(this%nstage) )
142 allocate ( this%coef_sig_ex(this%nstage+1,this%nstage), this%coef_gam_ex(this%nstage+1,this%nstage) )
143! if (this%imex_flag) then
144 allocate ( this%coef_a_im(this%nstage,this%nstage), this%coef_b_im(this%nstage), this%coef_c_im(this%nstage) )
145! end if
146
147 select case(this%ndim)
148 case(1)
149 allocate( this%tend_buf1D_ex(size_each_var(1), var_num, this%tend_buf_size) )
150 if ( this%imex_flag ) then
151 allocate( this%tend_buf1D_im(size_each_var(1), var_num, this%tend_buf_size) )
152 end if
153 allocate( this%var0_1D(size_each_var(1), var_num) )
154 allocate( this%varTmp_1D(size_each_var(1), var_num) )
155 case(2)
156 allocate( this%tend_buf2D_ex(size_each_var(1),size_each_var(2), var_num, this%tend_buf_size) )
157 if ( this%imex_flag ) then
158 allocate( this%tend_buf2D_im(size_each_var(1),size_each_var(2), var_num, this%tend_buf_size) )
159 end if
160 allocate( this%var0_2D(size_each_var(1),size_each_var(2), var_num) )
161 allocate( this%varTmp_2D(size_each_var(1),size_each_var(2), var_num) )
162 case(3)
163 allocate( this%tend_buf3D_ex(size_each_var(1),size_each_var(2),size_each_var(3), var_num, this%tend_buf_size) )
164 if ( this%imex_flag ) then
165 allocate( this%tend_buf3D_im(size_each_var(1),size_each_var(2),size_each_var(3), var_num, this%tend_buf_size) )
166 end if
167 allocate( this%var0_3D(size_each_var(1),size_each_var(2),size_each_var(3), var_num) )
168 allocate( this%varTmp_3D(size_each_var(1),size_each_var(2),size_each_var(3), var_num) )
169 end select
170 allocate( this%tend_buf_indmap(this%nstage) )
171
173 rk_scheme_name, this%nstage, this%imex_flag, & ! (in)
174 this%coef_a_ex, this%coef_b_ex, this%coef_c_ex, & ! (out)
175 this%coef_sig_ex, this%coef_gam_ex, & ! (out)
176 this%coef_a_im, this%coef_b_im, this%coef_c_im, & ! (out)
177 this%tend_buf_indmap ) ! (out)
178
179 return
module common / Runge-Kutta scheme
subroutine, public timeint_rk_butcher_tab_get_info(rk_scheme_name, nstage, tend_buf_size, low_storage_flag, imex_flag)
subroutine, public timeint_rk_butcher_tab_get(rk_scheme_name, nstage, imex_flag, coef_a_ex, coef_b_ex, coef_c_ex, coef_sig_ex, coef_gam_ex, coef_a_im, coef_b_im, coef_c_im, tend_buf_indmap)

References scale_timeint_rk_butcher_tab::timeint_rk_butcher_tab_get(), and scale_timeint_rk_butcher_tab::timeint_rk_butcher_tab_get_info().