written Subroutine

private subroutine written(self, i1, i2, x)

Points i1 .. i2 were written: measure a strip's distances along it (from the distance at point i1-1), update its level of detail, and upload the chunks holding them. x: the points in double precision, x(:, i) for chain point i (at least i1-1 .. i2), to measure from; without it, from the floats written. (i2 is the last point written in the chain.)

Type Bound

LineChain

Arguments

Type IntentOptional Attributes Name
class(LineChain), intent(inout) :: self
integer, intent(in) :: i1

points written (chain indices)

integer, intent(in) :: i2

points written (chain indices)

real(kind=wp), intent(in), optional :: x(:,:)

(3, at least i1-1 .. i2): the points


Calls

proc~~written~~CallsGraph proc~written LineChain%written interface~vkf_line_points_changed vkf_line_points_changed proc~written->interface~vkf_line_points_changed proc~check_status check_status proc~written->proc~check_status proc~measure measure proc~written->proc~measure proc~update_lod update_lod proc~written->proc~update_lod proc~line_buffer line_buffer proc~measure->proc~line_buffer proc~split_distances split_distances proc~measure->proc~split_distances proc~update_lod->proc~line_buffer proc~segment_distance segment_distance proc~update_lod->proc~segment_distance proc~send_lod send_lod proc~update_lod->proc~send_lod interface~vkf_line_points vkf_line_points proc~line_buffer->interface~vkf_line_points proc~send_lod->proc~check_status interface~vkf_line_set_lod vkf_line_set_lod proc~send_lod->interface~vkf_line_set_lod proc~lod_error~2 LineChain%lod_error proc~send_lod->proc~lod_error~2

Called by

proc~~written~~CalledByGraph proc~written LineChain%written proc~write_intermediates write_intermediates proc~write_intermediates->proc~written proc~write_marker write_marker proc~write_marker->proc~written proc~write_segments write_segments proc~write_segments->proc~written proc~write_segments~2 write_segments proc~write_segments~2->proc~written proc~add_intermediates add_intermediates proc~add_intermediates->proc~write_intermediates proc~marker_update MarkerArtist%marker_update proc~marker_update->proc~write_marker proc~marker_update->proc~add_intermediates proc~segment_update SegmentArtist%segment_update proc~segment_update->proc~write_segments proc~segments_late_update CustomLineSegments%segments_late_update proc~segments_late_update->proc~write_segments~2

Source Code

    subroutine written(self, i1, i2, x)
        class(LineChain), intent(inout) :: self
        integer, intent(in) :: i1, i2                   !! points written (chain indices)
        real(wp), intent(in), optional :: x(:,:)        !! (3, at least i1-1 .. i2): the points
        integer :: j, lo, hi
        do j = 1, self%n_chunks
            associate (c => self%chunks(j))
                lo = max(i1, c%first)
                hi = min(i2, c%first + c%capacity - 1)
                if (lo > hi) cycle
                if (self%kind == CHAIN_STRIP) then
                    call measure(self, j, lo, hi, x)
                    call update_lod(self, j, lo, hi, x)
                end if
                call check_status(vkf_line_points_changed(c%line, int(hi - c%first + 1, c_int)), 'trajectory artists')
            end associate
        end do
    end subroutine written