fs_multiply Function

public elemental function fs_multiply(p1, real_scalar) result(p3)

Defines how to multiply EMFields types by a scalar

Arguments

TypeIntentOptionalAttributesName
type(EMFields), intent(in) :: p1
real(kind=Float64), intent(in) :: real_scalar

Return Value type(EMFields)


Called by

proc~~fs_multiply~~CalledByGraph proc~fs_multiply fs_multiply interface~operator(ASTERISK) operator(*) interface~operator(ASTERISK)->proc~fs_multiply

Contents

Source Code


Source Code

elemental function fs_multiply(p1, real_scalar) result (p3)
    !+ Defines how to multiply [[EMFields]] types by a scalar
    type(EMFields), intent(in) :: p1
    real(Float64), intent(in)  :: real_scalar
    type(EMFields)             :: p3

    p3%br   = p1%br   * real_scalar
    p3%bt   = p1%bt   * real_scalar
    p3%bz   = p1%bz   * real_scalar
    p3%er   = p1%er   * real_scalar
    p3%et   = p1%et   * real_scalar
    p3%ez   = p1%ez   * real_scalar

    p3%dbr_dr   = p1%dbr_dr * real_scalar
    p3%dbr_dz   = p1%dbr_dz * real_scalar
    p3%dbt_dr   = p1%dbt_dr * real_scalar
    p3%dbt_dz   = p1%dbt_dz * real_scalar
    p3%dbz_dr   = p1%dbz_dr * real_scalar
    p3%dbz_dz   = p1%dbz_dz * real_scalar

end function fs_multiply