new_trajectory Function

private function new_trajectory(dof, nopt) result(traj)

A trajectory with dof (2 or 3, default 3) degrees of freedom and nopt (default 0) optional vectors per position.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), optional :: dof

degrees of freedom (2 or 3, default 3)

integer, intent(in), optional :: nopt

optional vectors per position (default 0)

Return Value type(Trajectory)


Called by

proc~~new_trajectory~~CalledByGraph proc~new_trajectory new_trajectory interface~trajectory Trajectory interface~trajectory->proc~new_trajectory

Source Code

    function new_trajectory(dof, nopt) result(traj)
        integer, intent(in), optional :: dof    !! degrees of freedom (2 or 3, default 3)
        integer, intent(in), optional :: nopt   !! optional vectors per position (default 0)
        type(Trajectory) :: traj
        if (present(dof)) traj%dof_ = max(2, min(3, dof))
        if (present(nopt)) traj%nopt_ = max(0, nopt)
    end function new_trajectory