set_num_optionals Subroutine

private subroutine set_num_optionals(self, nopt)

Set the number of optional vectors per position; clears the trajectory.

Type Bound

Trajectory

Arguments

Type IntentOptional Attributes Name
class(Trajectory), intent(inout) :: self
integer, intent(in) :: nopt

optional vectors per position (>= 0)


Calls

proc~~set_num_optionals~~CallsGraph proc~set_num_optionals Trajectory%set_num_optionals proc~clear Trajectory%clear proc~set_num_optionals->proc~clear

Source Code

    subroutine set_num_optionals(self, nopt)
        class(Trajectory), intent(inout) :: self
        integer, intent(in) :: nopt                         !! optional vectors per position (>= 0)
        if (nopt /= self%nopt_ .and. allocated(self%posopt)) deallocate(self%posopt)
        self%nopt_ = max(0, nopt)
        call self%clear()
    end subroutine set_num_optionals