A data source (see DataSource); element defaults to 1, opt to 0,
scale to 1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | src |
a SOURCE_* constant |
||
| integer, | intent(in), | optional | :: | element |
element (1 to dof, or 1 to 4 for an attitude; default 1) |
|
| integer, | intent(in), | optional | :: | opt |
(0: the position (default), k: optional k) |
|
| real(kind=wp), | intent(in), | optional | :: | scale |
factor the value is multiplied by (default 1) |
pure function new_data_source(src, element, opt, scale) result(s) integer, intent(in) :: src !! a SOURCE_* constant integer, intent(in), optional :: element !! element (1 to dof, or 1 to 4 for an attitude; default 1) integer, intent(in), optional :: opt !! (0: the position (default), k: optional k) real(wp), intent(in), optional :: scale !! factor the value is multiplied by (default 1) type(DataSource) :: s s%src = src if (present(element)) s%element = element if (present(opt)) s%opt = opt if (present(scale)) s%scale = scale end function new_data_source