sllist_obj Derived Type

type, public :: sllist_obj

Singly-linked list. Defines a sequence of key-value pairs E.g.: with 4 nodes key1 --> key2 --> key3 --> key4 --> nul() | | | | val1 val2 val3 val4


Inherited by

type~~sllist_obj~~InheritedByGraph type~sllist_obj sllist_obj type~sllist_obj->type~sllist_obj child type~collision_obj collision_obj type~collision_obj->type~sllist_obj RPneighbors, PPneighbors, IBneighbors type~monitor_set monitor_set type~collision_obj->type~monitor_set monitors type~timer_obj timer_obj type~collision_obj->type~timer_obj timer type~block_obj block_obj type~collision_obj->type~block_obj cblock type~marker_set marker_set type~collision_obj->type~marker_set IB type~particle_set particle_set type~collision_obj->type~particle_set PP type~respart_set ResPart_set type~collision_obj->type~respart_set RP type~hashtbl_obj hashtbl_obj type~hashtbl_obj->type~sllist_obj vec type~bc_set bc_set type~bc_set->type~hashtbl_obj tbl type~hdf5_obj hdf5_obj type~bc_set->type~hdf5_obj hdf5 type~region_obj region_obj type~bc_set->type~region_obj region type~bc_set->type~block_obj block type~cdifs_obj cdifs_obj type~cdifs_obj->type~collision_obj collisions type~cdifs_obj->type~bc_set bcs type~eulerian_set eulerian_set type~cdifs_obj->type~eulerian_set fields type~cdifs_obj->type~hdf5_obj hdf5 type~cdifs_obj->type~monitor_set monitors, pmonitor type~cdifs_obj->type~block_obj block type~cdifs_obj->type~marker_set IB type~cdifs_obj->type~respart_set RP type~solver_obj solver_obj type~cdifs_obj->type~solver_obj type~hypre_obj hypre_obj type~cdifs_obj->type~hypre_obj hypre, VFSolver type~op_obj op_obj type~cdifs_obj->type~op_obj op type~eulerian_obj_i eulerian_obj_i type~cdifs_obj->type~eulerian_obj_i maskV type~eulerian_obj_r eulerian_obj_r type~cdifs_obj->type~eulerian_obj_r V, P, dP, ibS, ibVF, ibF, ibN, Vold, resV, rhs, divu, Vm, srcV type~eulerian_set->type~hashtbl_obj tbl type~eulerian_set->type~block_obj block type~eulerian_ptr eulerian_ptr type~eulerian_set->type~eulerian_ptr field type~grans_obj grans_obj type~grans_obj->type~collision_obj collisions type~grans_obj->type~bc_set bcs type~grans_obj->type~eulerian_set fields type~grans_obj->type~hdf5_obj hdf5 type~grans_obj->type~monitor_set monitors type~grans_obj->type~block_obj block type~grans_obj->type~marker_set IB type~grans_obj->type~particle_set PP type~grans_obj->type~respart_set RP type~grans_obj->type~solver_obj type~grans_obj->type~hypre_obj VFSolver type~grans_obj->type~op_obj op type~grans_obj->type~eulerian_obj_r ibVF, PVF, ibS, Fp, ibF, ibN, rhs type~hdf5_obj->type~hashtbl_obj tbl type~monitor_set->type~hashtbl_obj tbl type~region_obj->type~hashtbl_obj tbl type~region_obj->type~block_obj region type~timer_obj->type~hashtbl_obj tbl type~block_obj->type~hdf5_obj hdf5 type~h5hut_obj h5hut_obj type~h5hut_obj->type~hdf5_obj hdf5 type~marker_set->type~bc_set bcs type~marker_set->type~monitor_set monitors type~marker_set->type~timer_obj timer type~lagrangian_set lagrangian_set type~marker_set->type~lagrangian_set type~marker_set->type~op_obj op type~particle_set->type~monitor_set monitors type~particle_set->type~timer_obj timer type~particle_set->type~lagrangian_set type~particle_set->type~op_obj op type~respart_set->type~bc_set bcs type~respart_set->type~monitor_set monitors type~respart_set->type~timer_obj timer type~respart_set->type~marker_set ib type~respart_set->type~lagrangian_set type~respart_set->type~op_obj op type~solver_obj->type~timer_obj timer type~eulerian_obj_base eulerian_obj_base type~eulerian_obj_base->type~block_obj block type~hypre_obj->type~block_obj block type~hypre_obj->type~eulerian_obj_i irow type~lagrangian_set->type~block_obj block type~op_obj->type~block_obj block type~solid_obj solid_obj type~solid_obj->type~marker_set type~solid_set solid_set type~solid_set->type~block_obj block type~solid_set->type~solid_obj p type~eulerian_obj_i->type~eulerian_obj_base type~eulerian_obj_r->type~eulerian_obj_base type~eulerian_ptr->type~eulerian_obj_base p

Components

Type Visibility Attributes Name Initial
type(sllist_obj), public, pointer :: child => null()
integer, public :: key = -1
class(*), public, allocatable :: val

Type-Bound Procedures

procedure, public :: Free => sllist_obj_Free

  • private pure recursive subroutine sllist_obj_Free(this)

    Free all data associated with this list.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(inout) :: this

    List object

  • private pure recursive subroutine sllist_obj_Get_int4(this, key, val)

    Traverse the list until key is found. Returns the associated value to the key, or -1 if key not found.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(in) :: this

    list object

    integer, intent(in) :: key

    Key in list

    integer(kind=leapI4), intent(out) :: val

    Value associated with key to return

  • private pure recursive subroutine sllist_obj_Get_int8(this, key, val)

    Traverse the list until key is found. Returns the associated value to the key, or -1 if key not found.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(in) :: this

    List object

    integer, intent(in) :: key

    Key in list

    integer(kind=leapI8), intent(out) :: val

    Value associated with key to return

  • private pure recursive subroutine sllist_obj_Get_real_sp(this, key, val)

    Traverse the list until key is found. Returns the associated value to the key, or -1 if key not found.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(in) :: this

    List object

    integer, intent(in) :: key

    Key in list

    real(kind=leapSP), intent(out) :: val

    Value associated with key to return

  • private pure recursive subroutine sllist_obj_Get_real_dp(this, key, val)

    Traverse the list until key is found. Returns the associated value to the key, or -1 if key not found.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(in) :: this

    List object

    integer, intent(in) :: key

    Key in list

    real(kind=leapDP), intent(out) :: val

    Value associated with key to return

procedure, public :: Put => sllist_obj_Put

  • private pure recursive subroutine sllist_obj_Put(this, key, val)

    Adds a pair key-value to the list.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(inout) :: this

    List object

    integer, intent(in) :: key

    Key in key-val pair to add to list

    class(*), intent(in) :: val

    Val in key-val pair to add to list

procedure, public :: Remove => sllist_obj_Remove

  • private pure subroutine sllist_obj_Remove(this, key)

    Remove key-value pair from list.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(inout), target :: this

    List object

    integer, intent(in) :: key

    Key of key-val pair to remove

procedure, private :: sllist_obj_Get_int4

  • private pure recursive subroutine sllist_obj_Get_int4(this, key, val)

    Traverse the list until key is found. Returns the associated value to the key, or -1 if key not found.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(in) :: this

    list object

    integer, intent(in) :: key

    Key in list

    integer(kind=leapI4), intent(out) :: val

    Value associated with key to return

procedure, private :: sllist_obj_Get_int8

  • private pure recursive subroutine sllist_obj_Get_int8(this, key, val)

    Traverse the list until key is found. Returns the associated value to the key, or -1 if key not found.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(in) :: this

    List object

    integer, intent(in) :: key

    Key in list

    integer(kind=leapI8), intent(out) :: val

    Value associated with key to return

procedure, private :: sllist_obj_Get_real_dp

  • private pure recursive subroutine sllist_obj_Get_real_dp(this, key, val)

    Traverse the list until key is found. Returns the associated value to the key, or -1 if key not found.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(in) :: this

    List object

    integer, intent(in) :: key

    Key in list

    real(kind=leapDP), intent(out) :: val

    Value associated with key to return

procedure, private :: sllist_obj_Get_real_sp

  • private pure recursive subroutine sllist_obj_Get_real_sp(this, key, val)

    Traverse the list until key is found. Returns the associated value to the key, or -1 if key not found.

    Arguments

    Type IntentOptional Attributes Name
    class(sllist_obj), intent(in) :: this

    List object

    integer, intent(in) :: key

    Key in list

    real(kind=leapSP), intent(out) :: val

    Value associated with key to return

Source Code

  type :: sllist_obj
    !> Singly-linked list.
    ! Defines a sequence of key-value pairs
    ! E.g.: with 4 nodes
    !  key1 --> key2 --> key3 --> key4 --> nul()
    !   |        |        |        |
    !  val1     val2     val3     val4
    type(sllist_obj), pointer :: child => null()
    integer                   :: key   =  -1
    class(*), allocatable     :: val
    contains
      procedure :: Put    => sllist_obj_Put
      generic   :: Get    => sllist_obj_Get_int4,    &
                             sllist_obj_Get_int8,    &
                             sllist_obj_Get_real_sp, &
                             sllist_obj_Get_real_dp
      procedure :: Remove => sllist_obj_Remove
      procedure :: Free   => sllist_obj_Free
      ! Internal/private procedures
      procedure, private  :: sllist_obj_Get_int4
      procedure, private  :: sllist_obj_Get_int8
      procedure, private  :: sllist_obj_Get_real_sp
      procedure, private  :: sllist_obj_Get_real_dp
    end type sllist_obj