@@ -44,7 +44,8 @@ module foodie_integrator_ms_runge_kutta_ssp
4444public :: integrator_ms_runge_kutta_ssp
4545
4646character (len= 99 ), parameter :: class_name_= ' ms_runge_kutta_ssp' ! < Name of the class of schemes.
47- character (len= 99 ), parameter :: supported_schemes_(1 :2 )= [trim (class_name_)// ' _steps_2_stages_2_order_3' , &
47+ character (len= 99 ), parameter :: supported_schemes_(1 :3 )= [trim (class_name_)// ' _steps_2_stages_2_order_3' , &
48+ trim (class_name_)// ' _steps_3_stages_2_order_3' , &
4849 trim (class_name_)// ' _steps_4_stages_5_order_8' ] ! < List of supported
4950 ! < schemes.
5051
@@ -54,8 +55,8 @@ module foodie_integrator_ms_runge_kutta_ssp
5455 ! <
5556 ! < @note The integrator must be created or initialized (initialize the *A,Ahat,B,Bhat,D,T* coefficients) before used.
5657 private
57- integer (I_P) :: steps= 0 ! < Number of time steps.
58- integer (I_P) :: stages= 0 ! < Number of stages.
58+ integer (I_P), public :: steps= 0 ! < Number of time steps.
59+ integer (I_P), public :: stages= 0 ! < Number of stages.
5960 real (R_P), allocatable :: A(:,:) ! < *A* coefficients.
6061 real (R_P), allocatable :: Ahat(:,:) ! < *Ahat* coefficients.
6162 real (R_P), allocatable :: B(:) ! < *B* coefficients.
@@ -175,7 +176,57 @@ subroutine initialize(self, scheme, stop_on_fail)
175176 call self% destroy
176177 select case (trim (adjustl (scheme)))
177178 case (' ms_runge_kutta_ssp_steps_2_stages_2_order_3' )
178- error stop ' error: "ms_runge_kutta_ssp_steps_2_stages_2_order_3" to be implemented!'
179+ self% steps = 2
180+ self% stages = 2
181+
182+ allocate (self% A(1 :self% stages, 1 :self% stages)) ; self% A = 0._R_P
183+ self% A(2 , 1 ) = 0.910683602522959_R_P
184+
185+ allocate (self% Ahat(1 :self% stages, 1 :self% steps)) ; self% Ahat = 0._R_P
186+ self% Ahat(2 , 1 ) = - 1.11985107194706e-19_R_P
187+
188+ allocate (self% B(1 :self% stages)) ; self% B = 0._R_P
189+ self% B(1 ) = 0.535898384862245_R_P
190+ self% B(2 ) = 0.803847577293368_R_P
191+
192+ allocate (self% Bhat(1 :self% steps)) ; self% Bhat = 0._R_P
193+ self% Bhat(1 ) = 0.267949192431123_R_P
194+
195+ allocate (self% D(1 :self% stages, 1 :self% steps)) ; self% D = 0._R_P
196+ self% D(2 , 1 ) = 1._R_P / 3._R_P
197+ self% D(2 , 2 ) = 2._R_P / 3._R_P
198+
199+ allocate (self% T(1 :self% steps)) ; self% T = 0._R_P
200+ self% T(1 ) = 0.607695154586736_R_P
201+ self% T(2 ) = 0.392304845413264_R_P
202+
203+ case (' ms_runge_kutta_ssp_steps_3_stages_2_order_3' )
204+ self% steps = 3
205+ self% stages = 2
206+
207+ allocate (self% A(1 :self% stages, 1 :self% stages)) ; self% A = 0._R_P
208+ self% A(2 , 1 ) = 0.731058363135786_R_P
209+
210+ allocate (self% Ahat(1 :self% stages, 1 :self% steps)) ; self% Ahat = 0._R_P
211+ self% Ahat(2 , 1 ) = 0.127467809251820_R_P
212+
213+ allocate (self% B(1 :self% stages)) ; self% B = 0._R_P
214+ self% B(1 ) = 0.618048297723782_R_P
215+ self% B(2 ) = 0.759677988437936_R_P
216+
217+ allocate (self% Bhat(1 :self% steps)) ; self% Bhat = 0._R_P
218+ self% Bhat(1 ) = 0.246670340394148_R_P
219+
220+ allocate (self% D(1 :self% stages, 1 :self% steps)) ; self% D = 0._R_P
221+ self% D(2 , 1 ) = 0.186433848116852_R_P
222+ self% D(2 , 2 ) = 1.80945758995975e-24_R_P
223+ self% D(2 , 3 ) = 0.813566151883148_R_P
224+
225+ allocate (self% T(1 :self% steps)) ; self% T = 0._R_P
226+ self% T(1 ) = 0.312198313277933_R_P
227+ self% T(2 ) = 2.58493941422821e-24_R_P
228+ self% T(3 ) = 0.687801686722067_R_P
229+
179230 case (' ms_runge_kutta_ssp_steps_4_stages_5_order_8' )
180231 self% steps = 4
181232 self% stages = 5
@@ -223,25 +274,25 @@ subroutine initialize(self, scheme, stop_on_fail)
223274 self% Bhat(3 ) = 0.541410372692778_R_P
224275
225276 allocate (self% D(1 :self% stages, 1 :self% steps)) ; self% D = 0._R_P
226- self% D(1 , 1 ) = 0.0273928990974108_R_P
227- self% D(2 , 1 ) = 0.283607987548794_R_P
228- self% D(3 , 1 ) = 0.0642241421937960_R_P
229- self% D(4 , 1 ) = 0.194681462814288_R_P
230-
231- self% D(1 , 2 ) = 0.554039201229659_R_P
232- self% D(2 , 2 ) = 0.0914454235177934_R_P
233- self% D(3 , 2 ) = 0.198601843371796_R_P
234- self% D(4 , 2 ) = 0.293086617882372_R_P
235-
236- self% D(1 , 3 ) = 0.348927848402249_R_P
237- self% D(2 , 3 ) = 0.437897855084625_R_P
238- self% D(3 , 3 ) = 0.662266498804591_R_P
239- self% D(4 , 3 ) = 0.158740367819382_R_P
240-
241- self% D(1 , 4 ) = 0.0696400512706807_R_P
242- self% D(2 , 4 ) = 0.187048733848788_R_P
243- self% D(3 , 4 ) = 0.0749075156298171_R_P
244- self% D(4 , 4 ) = 0.353491551483958_R_P
277+ self% D(2 , 1 ) = 0.0273928990974108_R_P
278+ self% D(3 , 1 ) = 0.283607987548794_R_P
279+ self% D(4 , 1 ) = 0.0642241421937960_R_P
280+ self% D(5 , 1 ) = 0.194681462814288_R_P
281+
282+ self% D(2 , 2 ) = 0.554039201229659_R_P
283+ self% D(3 , 2 ) = 0.0914454235177934_R_P
284+ self% D(4 , 2 ) = 0.198601843371796_R_P
285+ self% D(5 , 2 ) = 0.293086617882372_R_P
286+
287+ self% D(2 , 3 ) = 0.348927848402249_R_P
288+ self% D(3 , 3 ) = 0.437897855084625_R_P
289+ self% D(4 , 3 ) = 0.662266498804591_R_P
290+ self% D(5 , 3 ) = 0.158740367819382_R_P
291+
292+ self% D(2 , 4 ) = 0.0696400512706807_R_P
293+ self% D(3 , 4 ) = 0.187048733848788_R_P
294+ self% D(4 , 4 ) = 0.0749075156298171_R_P
295+ self% D(5 , 4 ) = 0.353491551483958_R_P
245296
246297 allocate (self% T(1 :self% steps)) ; self% T = 0._R_P
247298 self% T(1 ) = 0.0273988434707855_R_P
0 commit comments