Sets the time integrator method, using a character input
Valid options for integrator are
"euler" "rk2" "rk3" "rk4"
Note that the character provided is not case-sensitive
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Model), | intent(inout) | :: | this | |||
character, | intent(in) | :: | integrator |
subroutine SetTimeIntegrator_withChar(this,integrator)
!! Sets the time integrator method, using a character input
!!
!! Valid options for integrator are
!!
!! "euler"
!! "rk2"
!! "rk3"
!! "rk4"
!!
!! Note that the character provided is not case-sensitive
!!
implicit none
class(Model),intent(inout) :: this
character(*),intent(in) :: integrator
! Local
character(SELF_INTEGRATOR_LENGTH) :: upperCaseInt
upperCaseInt = UpperCase(trim(integrator))
select case(trim(upperCaseInt))
case("EULER")
this%timeIntegrator => Euler_timeIntegrator
case("RK2")
this%timeIntegrator => LowStorageRK2_timeIntegrator
case("RK3")
this%timeIntegrator => LowStorageRK3_timeIntegrator
case("RK4")
this%timeIntegrator => LowStorageRK4_timeIntegrator
case DEFAULT
this%timeIntegrator => LowStorageRK3_timeIntegrator
endselect
endsubroutine SetTimeIntegrator_withChar