Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(type_variable), | intent(inout) | :: | self | |||
real(kind=real64), | intent(in) | :: | value(:) |
subroutine type_variable_set(self, value) implicit none class(type_variable), intent(inout) :: self real(real64), intent(in) :: value(:) integer(int32) :: i ! new, pre に値を設定 self%new(:) = value(:) self%pre(:) = value(:) ! old の全履歴に値を設定 ! rankの値に関わらず、ループで全ての履歴を一度に設定する if (self%rank > 0) then do i = 1, self%rank self%old(:, i) = value(:) end do end if ! 時間微分項はゼロに初期化 self%dif(:) = 0.0d0 end subroutine type_variable_set