new_data_source Function

private pure function new_data_source(src, element, opt, scale) result(s)

A data source (see DataSource); element defaults to 1, opt to 0, scale to 1.

Arguments

Type IntentOptional 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)

Return Value type(DataSource)


Called by

proc~~new_data_source~~CalledByGraph proc~new_data_source new_data_source interface~datasource DataSource interface~datasource->proc~new_data_source

Source Code

    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