Allocate members of interpolator being of integrand_object class.
It is assumed that the integrator has been properly initialized before calling this method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_runge_kutta_emd), | intent(inout) | :: | self | Integrator. |
||
class(integrand_object), | intent(in) | :: | U | Integrand. |
subroutine allocate_integrand_members(self, U)
!< Allocate members of interpolator being of [[integrand_object]] class.
!<
!< @note It is assumed that the integrator has been properly initialized before calling this method.
class(integrator_runge_kutta_emd), intent(inout) :: self !< Integrator.
class(integrand_object), intent(in) :: U !< Integrand.
integer(I_P) :: s !< Counter.
if (self%is_multistage() .and. self%registers > 0) then
if (allocated(self%stage)) deallocate(self%stage)
allocate(self%stage(1:self%registers), mold=U)
do s=1, self%registers
self%stage(s) = U
enddo
endif
if (self%has_fast_mode()) then
if (allocated(self%buffer)) deallocate(self%buffer)
allocate(self%buffer, mold=U)
self%buffer = U
endif
if (allocated(self%U1)) deallocate(self%U1)
allocate(self%U1, mold=U)
self%U1 = U
if (allocated(self%U2)) deallocate(self%U2)
allocate(self%U2, mold=U)
self%U2 = U
endsubroutine allocate_integrand_members