InsectClass Module


Uses


Derived Types

type, public ::  Insect_

Components

Type Visibility Attributes Name Initial
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
procedure, public :: set => setInsect
procedure, public :: eat => eatInsect

Subroutines

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

Arguments

Type IntentOptional Attributes Name
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

public subroutine setInsect(obj, leaf)

Arguments

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

public subroutine eatInsect(obj, dt, debug)

Arguments

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