pp_subtract Function

public function pp_subtract(p1, p2) result(p3)

Defines how to subtract two Profiles types

Arguments

Type IntentOptional AttributesName
type(Profiles), intent(in) :: p1
type(Profiles), intent(in) :: p2

Return Value type(Profiles)


Called by

proc~~pp_subtract~~CalledByGraph proc~pp_subtract pp_subtract interface~operator(-) operator(-) interface~operator(-)->proc~pp_subtract

Contents

Source Code


Source Code

function pp_subtract(p1, p2) result (p3)
    !+ Defines how to subtract two [[Profiles]] types
    type(Profiles), intent(in) :: p1,p2
    type(Profiles)             :: p3

    p3%dene   = p1%dene   - p2%dene
    p3%ti     = p1%ti     - p2%ti
    p3%te     = p1%te     - p2%te
    p3%denp   = p1%denp   - p2%denp
    p3%denf   = p1%denf   - p2%denf
    p3%denimp = p1%denimp - p2%denimp
    p3%zeff   = p1%zeff   - p2%zeff
    p3%vr     = p1%vr     - p2%vr
    p3%vt     = p1%vt     - p2%vt
    p3%vz     = p1%vz     - p2%vz
    p3%denn   = p1%denn   - p2%denn

end function pp_subtract