A trajectory with dof (2 or 3, default 3) degrees of freedom and
nopt (default 0) optional vectors per position.
| Type | Intent | Optional | 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) |
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