Write points i1 .. i2 into the chain (and upload the chunks written to).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CurveArtist), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | i1 |
the trajectory points |
||
| integer, | intent(in) | :: | i2 |
the trajectory points |
subroutine write_curve(self, i1, i2) class(CurveArtist), intent(inout) :: self integer, intent(in) :: i1, i2 !! the trajectory points real(c_float), dimension(:,:,:), pointer :: p real(wp), dimension(:,:), pointer :: pos real(wp), allocatable :: v(:,:) integer :: j, lo, hi do j = 1, self%chain%num_chunks() call self%chain%slice(j, i1, i2, lo, hi, p) if (.not. associated(p)) cycle if (is_position_xyz(self%sources_) .and. .not. transformed(self)) then ! the usual case: the positions call self%traj%positions(pos) call split_points(pos(:, lo:hi), p) else ! other sources, or transformed: a range at a time allocate(v(3, hi - lo + 1)) call art_points(self, lo, hi, self%sources_, v) call split_points(v, p) deallocate(v) end if end do if (self%chain%is_colored()) call write_colors(self, i1, i2) if (is_position_xyz(self%sources_) .and. .not. transformed(self)) then ! distances from the positions in double call self%traj%positions(pos) call self%chain%written(i1, i2, pos) else call self%chain%written(i1, i2) end if end subroutine write_curve