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
138 this%nstage, this%tend_buf_size, &
139 this%low_storage_flag, this%imex_flag )
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
144 allocate ( this%coef_a_im(this%nstage,this%nstage), this%coef_b_im(this%nstage), this%coef_c_im(this%nstage) )
145
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, &
174 this%coef_a_ex, this%coef_b_ex, this%coef_c_ex, &
175 this%coef_sig_ex, this%coef_gam_ex, &
176 this%coef_a_im, this%coef_b_im, this%coef_c_im, &
177 this%tend_buf_indmap )
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)