Initialize integrand.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrand_ladvection), | intent(inout) | :: | self | Integrand. |
||
real(kind=R_P), | intent(in) | :: | Dt | Time step. |
subroutine initialize(self, Dt)
!< Initialize integrand.
class(integrand_ladvection), intent(inout) :: self !< Integrand.
real(R_P), intent(in) :: Dt !< Time step.
self%Dx = self%compute_dx(Dt=Dt)
self%Ni = nint(self%length / self%Dx)
select case(trim(adjustl(self%initial_state)))
case('sin_wave')
call self%set_sin_wave_initial_state
case('square_wave')
call self%set_square_wave_initial_state
endselect
endsubroutine initialize