Return the list of all available intergrator schemes, or only the schemes belonging to the given class name.
In the case the class name passed is not available the schemes array is returned not allocated and not warnings are given: it is up to the caller to check the status of the schemes array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | optional | :: | class_name | Return only the schemes belogn to the given class. |
Available integrators.
pure function foodie_integrator_schemes(class_name) result(schemes)
!< Return the list of all available intergrator schemes, or only the schemes belonging to the given class name.
!<
!< @note In the case the class name passed is not available the schemes array is returned not allocated and not warnings are
!< given: it is up to the caller to check the status of the schemes array.
character(*), intent(in), optional :: class_name !< Return only the schemes belogn to the given class.
character(len=99), allocatable :: schemes(:) !< Available integrators.
type(integrator_adams_bashforth) :: int_adams_bashforth !< Integrator Adams Bashforth.
type(integrator_adams_bashforth_moulton) :: int_adams_bashforth_moulton !< Integrator Adams Bashforth Moulton.
type(integrator_adams_moulton) :: int_adams_moulton !< Integrator Adams Moulton.
type(integrator_back_df) :: int_back_df !< Integrator back differentiation formula.
type(integrator_euler_explicit) :: int_euler_explicit !< Integrator euler explicit.
type(integrator_leapfrog) :: int_leapfrog !< Integrator leapfrog.
type(integrator_lmm_ssp) :: int_lmm_ssp !< Integrator lmm SSP.
type(integrator_lmm_ssp_vss) :: int_lmm_ssp_vss !< Integrator lmm SSP VSS.
type(integrator_ms_runge_kutta_ssp) :: int_ms_runge_kutta_ssp !< Integrator multistep Runge Kutta ssp.
type(integrator_runge_kutta_emd) :: int_runge_kutta_emd !< Integrator Runge Kutta embdedded.
type(integrator_runge_kutta_ls) :: int_runge_kutta_ls !< Integrator Runge Kutta low storage.
type(integrator_runge_kutta_lssp) :: int_runge_kutta_lssp !< Integrator linear Runge Kutta SSP.
type(integrator_runge_kutta_ssp) :: int_runge_kutta_ssp !< Integrator Runge Kutta SSP.
if (present(class_name)) then
if (trim(int_adams_bashforth%class_name()) == trim(adjustl(class_name))) then
schemes = int_adams_bashforth%supported_schemes()
elseif (trim(int_adams_bashforth_moulton%class_name()) == trim(adjustl(class_name))) then
schemes = int_adams_bashforth_moulton%supported_schemes()
elseif (trim(int_adams_moulton%class_name()) == trim(adjustl(class_name))) then
schemes = int_adams_moulton%supported_schemes()
elseif (trim(int_back_df%class_name()) == trim(adjustl(class_name))) then
schemes = int_back_df%supported_schemes()
elseif (trim(int_euler_explicit%class_name()) == trim(adjustl(class_name))) then
schemes = int_euler_explicit%supported_schemes()
elseif (trim(int_leapfrog%class_name()) == trim(adjustl(class_name))) then
schemes = int_leapfrog%supported_schemes()
elseif (trim(int_lmm_ssp%class_name()) == trim(adjustl(class_name))) then
schemes = int_lmm_ssp%supported_schemes()
elseif (trim(int_lmm_ssp_vss%class_name()) == trim(adjustl(class_name))) then
schemes = int_lmm_ssp_vss%supported_schemes()
elseif (trim(int_ms_runge_kutta_ssp%class_name()) == trim(adjustl(class_name))) then
schemes = int_ms_runge_kutta_ssp%supported_schemes()
elseif (trim(int_runge_kutta_emd%class_name()) == trim(adjustl(class_name))) then
schemes = int_runge_kutta_emd%supported_schemes()
elseif (trim(int_runge_kutta_ls%class_name()) == trim(adjustl(class_name))) then
schemes = int_runge_kutta_ls%supported_schemes()
elseif (trim(int_runge_kutta_lssp%class_name()) == trim(adjustl(class_name))) then
schemes = int_runge_kutta_lssp%supported_schemes()
elseif (trim(int_runge_kutta_ssp%class_name()) == trim(adjustl(class_name))) then
schemes = int_runge_kutta_ssp%supported_schemes()
endif
else
schemes = int_adams_bashforth % supported_schemes()
schemes = [schemes, int_adams_bashforth_moulton % supported_schemes()]
schemes = [schemes, int_adams_moulton % supported_schemes()]
schemes = [schemes, int_back_df % supported_schemes()]
schemes = [schemes, int_euler_explicit % supported_schemes()]
schemes = [schemes, int_leapfrog % supported_schemes()]
schemes = [schemes, int_lmm_ssp % supported_schemes()]
schemes = [schemes, int_lmm_ssp_vss % supported_schemes()]
schemes = [schemes, int_ms_runge_kutta_ssp % supported_schemes()]
schemes = [schemes, int_runge_kutta_emd % supported_schemes()]
schemes = [schemes, int_runge_kutta_ls % supported_schemes()]
schemes = [schemes, int_runge_kutta_lssp % supported_schemes()]
schemes = [schemes, int_runge_kutta_ssp % supported_schemes()]
endif
endfunction foodie_integrator_schemes