@@ -76,6 +76,7 @@ module foodie
7676use foodie_integrator_ms_runge_kutta_ssp, only : integrator_ms_runge_kutta_ssp
7777use foodie_integrator_runge_kutta_emd, only : integrator_runge_kutta_emd
7878use foodie_integrator_runge_kutta_low_storage, only : integrator_runge_kutta_ls
79+ use foodie_integrator_runge_kutta_lssp, only : integrator_runge_kutta_lssp
7980use foodie_integrator_runge_kutta_ssp, only : integrator_runge_kutta_ssp
8081use penf, only : I_P, R_P
8182
@@ -97,19 +98,21 @@ module foodie
9798public :: integrator_ms_runge_kutta_ssp
9899public :: integrator_runge_kutta_emd
99100public :: integrator_runge_kutta_ls
101+ public :: integrator_runge_kutta_lssp
100102public :: integrator_runge_kutta_ssp
101103public :: is_available
102104public :: is_class_available
103105public :: is_scheme_available
104106
105107contains
106- function foodie_integrator (scheme , tolerance , nu , alpha ) result(integrator)
108+ function foodie_integrator (scheme , stages , tolerance , nu , alpha ) result(integrator)
107109 ! < Return a concrete instance of [[integrator_object]] given a scheme selection.
108110 ! <
109111 ! < This is the FOODIE integrators factory.
110112 ! <
111113 ! < @note If an error occurs the error status of [[integrator_object]] is updated.
112114 character (* ), intent (in ) :: scheme ! < Selected integrator given.
115+ integer (I_P), intent (in ), optional :: stages ! < Stages of multi-stage methods.
113116 real (R_P), intent (in ), optional :: tolerance ! < Tolerance on the local truncation error.
114117 real (R_P), intent (in ), optional :: nu ! < Williams-Robert-Asselin filter coefficient.
115118 real (R_P), intent (in ), optional :: alpha ! < Robert-Asselin filter coefficient.
@@ -120,12 +123,13 @@ function foodie_integrator(scheme, tolerance, nu, alpha) result(integrator)
120123 type (integrator_back_df) :: int_back_df ! < Integrator back differentiation formula.
121124 type (integrator_euler_explicit) :: int_euler_explicit ! < Integrator euler explicit.
122125 type (integrator_leapfrog) :: int_leapfrog ! < Integrator leapfrog.
123- type (integrator_lmm_ssp) :: int_lmm_ssp ! < Integrator lmm ssp .
124- type (integrator_lmm_ssp_vss) :: int_lmm_ssp_vss ! < Integrator lmm ssp_vss .
126+ type (integrator_lmm_ssp) :: int_lmm_ssp ! < Integrator LMM SSP .
127+ type (integrator_lmm_ssp_vss) :: int_lmm_ssp_vss ! < Integrator LMM SSP VSS .
125128 type (integrator_ms_runge_kutta_ssp) :: int_ms_runge_kutta_ssp ! < Integrator multistep Runge Kutta ssp.
126129 type (integrator_runge_kutta_emd) :: int_runge_kutta_emd ! < Integrator Runge Kutta_embdedded.
127130 type (integrator_runge_kutta_ls) :: int_runge_kutta_ls ! < Integrator Runge Kutta low storage.
128- type (integrator_runge_kutta_ssp) :: int_runge_kutta_ssp ! < Integrator Runge Kutta ssp.
131+ type (integrator_runge_kutta_lssp) :: int_runge_kutta_lssp ! < Integrator linear Runge Kutta SSP.
132+ type (integrator_runge_kutta_ssp) :: int_runge_kutta_ssp ! < Integrator Runge Kutta SSP.
129133
130134 if (index (trim (adjustl (scheme)), trim (int_adams_bashforth_moulton% class_name())) > 0 ) then
131135 allocate (integrator_adams_bashforth_moulton :: integrator)
@@ -189,6 +193,12 @@ function foodie_integrator(scheme, tolerance, nu, alpha) result(integrator)
189193 type is (integrator_runge_kutta_ls)
190194 call integrator% initialize(scheme= scheme)
191195 endselect
196+ elseif (index (trim (adjustl (scheme)), trim (int_runge_kutta_lssp% class_name())) > 0 ) then
197+ allocate (integrator_runge_kutta_lssp :: integrator)
198+ select type (integrator)
199+ type is (integrator_runge_kutta_lssp)
200+ call integrator% initialize(scheme= scheme, stages= stages)
201+ endselect
192202 elseif (index (trim (adjustl (scheme)), trim (int_runge_kutta_ssp% class_name())) > 0 ) then
193203 allocate (integrator_runge_kutta_ssp :: integrator)
194204 select type (integrator)
@@ -210,12 +220,13 @@ pure function foodie_integrator_class_names() result(names)
210220 type (integrator_back_df) :: int_back_df ! < Integrator back differentiation formula.
211221 type (integrator_euler_explicit) :: int_euler_explicit ! < Integrator euler explicit.
212222 type (integrator_leapfrog) :: int_leapfrog ! < Integrator leapfrog.
213- type (integrator_lmm_ssp) :: int_lmm_ssp ! < Integrator lmm ssp .
214- type (integrator_lmm_ssp_vss) :: int_lmm_ssp_vss ! < Integrator lmm ssp_vss .
223+ type (integrator_lmm_ssp) :: int_lmm_ssp ! < Integrator lmm SSP .
224+ type (integrator_lmm_ssp_vss) :: int_lmm_ssp_vss ! < Integrator lmm SSP VSS .
215225 type (integrator_ms_runge_kutta_ssp) :: int_ms_runge_kutta_ssp ! < Integrator multistep Runge Kutta ssp.
216- type (integrator_runge_kutta_emd) :: int_runge_kutta_emd ! < Integrator Runge Kutta_embdedded .
226+ type (integrator_runge_kutta_emd) :: int_runge_kutta_emd ! < Integrator Runge Kutta embdedded .
217227 type (integrator_runge_kutta_ls) :: int_runge_kutta_ls ! < Integrator Runge Kutta low storage.
218- type (integrator_runge_kutta_ssp) :: int_runge_kutta_ssp ! < Integrator Runge Kutta ssp.
228+ type (integrator_runge_kutta_lssp) :: int_runge_kutta_lssp ! < Integrator linear Runge Kutta SSP.
229+ type (integrator_runge_kutta_ssp) :: int_runge_kutta_ssp ! < Integrator Runge Kutta SSP.
219230
220231 names = [ int_adams_bashforth % class_name()]
221232 names = [names, int_adams_bashforth_moulton % class_name()]
@@ -228,6 +239,7 @@ pure function foodie_integrator_class_names() result(names)
228239 names = [names, int_ms_runge_kutta_ssp % class_name()]
229240 names = [names, int_runge_kutta_emd % class_name()]
230241 names = [names, int_runge_kutta_ls % class_name()]
242+ names = [names, int_runge_kutta_lssp % class_name()]
231243 names = [names, int_runge_kutta_ssp % class_name()]
232244 end function foodie_integrator_class_names
233245
@@ -244,12 +256,13 @@ pure function foodie_integrator_schemes(class_name) result(schemes)
244256 type (integrator_back_df) :: int_back_df ! < Integrator back differentiation formula.
245257 type (integrator_euler_explicit) :: int_euler_explicit ! < Integrator euler explicit.
246258 type (integrator_leapfrog) :: int_leapfrog ! < Integrator leapfrog.
247- type (integrator_lmm_ssp) :: int_lmm_ssp ! < Integrator lmm ssp .
248- type (integrator_lmm_ssp_vss) :: int_lmm_ssp_vss ! < Integrator lmm ssp_vss .
259+ type (integrator_lmm_ssp) :: int_lmm_ssp ! < Integrator lmm SSP .
260+ type (integrator_lmm_ssp_vss) :: int_lmm_ssp_vss ! < Integrator lmm SSP VSS .
249261 type (integrator_ms_runge_kutta_ssp) :: int_ms_runge_kutta_ssp ! < Integrator multistep Runge Kutta ssp.
250- type (integrator_runge_kutta_emd) :: int_runge_kutta_emd ! < Integrator Runge Kutta_embdedded .
262+ type (integrator_runge_kutta_emd) :: int_runge_kutta_emd ! < Integrator Runge Kutta embdedded .
251263 type (integrator_runge_kutta_ls) :: int_runge_kutta_ls ! < Integrator Runge Kutta low storage.
252- type (integrator_runge_kutta_ssp) :: int_runge_kutta_ssp ! < Integrator Runge Kutta ssp.
264+ type (integrator_runge_kutta_lssp) :: int_runge_kutta_lssp ! < Integrator linear Runge Kutta SSP.
265+ type (integrator_runge_kutta_ssp) :: int_runge_kutta_ssp ! < Integrator Runge Kutta SSP.
253266
254267 if (present (class_name)) then
255268 if (trim (int_adams_bashforth% class_name()) == trim (adjustl (class_name))) then
@@ -274,6 +287,8 @@ pure function foodie_integrator_schemes(class_name) result(schemes)
274287 schemes = int_runge_kutta_emd% supported_schemes()
275288 elseif (trim (int_runge_kutta_ls% class_name()) == trim (adjustl (class_name))) then
276289 schemes = int_runge_kutta_ls% supported_schemes()
290+ elseif (trim (int_runge_kutta_lssp% class_name()) == trim (adjustl (class_name))) then
291+ schemes = int_runge_kutta_lssp% supported_schemes()
277292 elseif (trim (int_runge_kutta_ssp% class_name()) == trim (adjustl (class_name))) then
278293 schemes = int_runge_kutta_ssp% supported_schemes()
279294 endif
@@ -289,6 +304,7 @@ pure function foodie_integrator_schemes(class_name) result(schemes)
289304 schemes = [schemes, int_ms_runge_kutta_ssp % supported_schemes()]
290305 schemes = [schemes, int_runge_kutta_emd % supported_schemes()]
291306 schemes = [schemes, int_runge_kutta_ls % supported_schemes()]
307+ schemes = [schemes, int_runge_kutta_lssp % supported_schemes()]
292308 schemes = [schemes, int_runge_kutta_ssp % supported_schemes()]
293309 endif
294310 end function foodie_integrator_schemes
0 commit comments