Append an intermediate marker at v, time t (the arrays grown as needed).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(MarkerArtist), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | v(3) |
the marker's point; its time |
||
| real(kind=wp), | intent(in) | :: | t |
the marker's point; its time |
subroutine push_intermediate(self, v, t) type(MarkerArtist), intent(inout) :: self real(wp), intent(in) :: v(3), t !! the marker's point; its time real(wp), allocatable :: xyz(:,:), times(:), rgba(:,:) integer :: m if (.not. allocated(self%inter_xyz)) allocate(self%inter_xyz(3, 64), self%inter_t(64), self%inter_rgba(4, 64)) m = size(self%inter_t) if (self%n_inter == m) then allocate(xyz(3, 2 * m), times(2 * m), rgba(4, 2 * m)) xyz(:, 1:m) = self%inter_xyz times(1:m) = self%inter_t rgba(:, 1:m) = self%inter_rgba call move_alloc(xyz, self%inter_xyz) call move_alloc(times, self%inter_t) call move_alloc(rgba, self%inter_rgba) end if self%n_inter = self%n_inter + 1 self%inter_xyz(:, self%n_inter) = v self%inter_t(self%n_inter) = t if (self%inter%is_colored()) self%inter_rgba(:, self%n_inter) = color_at(self, t, self%intermediate_color) end subroutine push_intermediate