set_ribbon_source Function

private function set_ribbon_source(self, side, k, src) result(valid)

Set component k of the start (side 1) or end (side 2) sources.

Arguments

Type IntentOptional Attributes Name
class(RibbonArtist), intent(inout) :: self
integer, intent(in) :: side

1: start, 2: end; the component (1: x, 2: y, 3: z)

integer, intent(in) :: k

1: start, 2: end; the component (1: x, 2: y, 3: z)

type(DataSource), intent(in) :: src

its data source

Return Value logical


Calls

proc~~set_ribbon_source~~CallsGraph proc~set_ribbon_source set_ribbon_source verify_data verify_data proc~set_ribbon_source->verify_data

Called by

proc~~set_ribbon_source~~CalledByGraph proc~set_ribbon_source set_ribbon_source proc~ribbon_set_end_x_data RibbonArtist%ribbon_set_end_x_data proc~ribbon_set_end_x_data->proc~set_ribbon_source proc~ribbon_set_end_y_data RibbonArtist%ribbon_set_end_y_data proc~ribbon_set_end_y_data->proc~set_ribbon_source proc~ribbon_set_end_z_data RibbonArtist%ribbon_set_end_z_data proc~ribbon_set_end_z_data->proc~set_ribbon_source proc~ribbon_set_start_x_data RibbonArtist%ribbon_set_start_x_data proc~ribbon_set_start_x_data->proc~set_ribbon_source proc~ribbon_set_start_y_data RibbonArtist%ribbon_set_start_y_data proc~ribbon_set_start_y_data->proc~set_ribbon_source proc~ribbon_set_start_z_data RibbonArtist%ribbon_set_start_z_data proc~ribbon_set_start_z_data->proc~set_ribbon_source

Source Code

    logical function set_ribbon_source(self, side, k, src) result(valid)
        class(RibbonArtist), intent(inout) :: self
        integer, intent(in) :: side, k                      !! 1: start, 2: end; the component (1: x, 2: y, 3: z)
        type(DataSource), intent(in) :: src                 !! its data source
        if (side == 1) then
            self%start_(k) = src
        else
            self%end_(k) = src
        end if
        self%default_data = .false.
        self%seen_generation = -1
        valid = .true.
        if (associated(self%traj)) valid = self%traj%verify_data(self%start_) .and. self%traj%verify_data(self%end_)
    end function set_ribbon_source