Insect_ Derived Type

type, public :: Insect_


Contents


Components

TypeVisibility AttributesNameInitial
type(Leaf_), public, pointer:: Leaf
real(kind=real64), public :: x(3)
real(kind=real64), public :: volume
real(kind=real64), public :: eatSpeed

Type-Bound Procedures

procedure, public :: create => createInsect

  • public subroutine createInsect(obj, x, y, z, volume, eatSpeed)

    Arguments

    Type IntentOptional AttributesName
    class(Insect_), intent(inout) :: obj
    real(kind=real64), intent(in), optional :: x
    real(kind=real64), intent(in), optional :: y
    real(kind=real64), intent(in), optional :: z
    real(kind=real64), intent(in), optional :: volume
    real(kind=real64), intent(in), optional :: eatSpeed

procedure, public :: set => setInsect

  • public subroutine setInsect(obj, leaf)

    Arguments

    Type IntentOptional AttributesName
    class(Insect_), intent(inout) :: obj
    type(Leaf_), intent(in), target:: leaf

procedure, public :: eat => eatInsect

  • public subroutine eatInsect(obj, dt, debug)

    Arguments

    Type IntentOptional AttributesName
    class(Insect_), intent(inout) :: obj
    real(kind=real64), intent(in) :: dt
    logical, intent(in), optional :: debug