KDtree Derived Type

type, public :: KDtree


Components

Type Visibility Attributes Name Initial
class(KDtree), public, pointer :: child_L
class(KDtree), public, pointer :: child_R
class(KDtree), public, pointer :: parent
type(Object_type), public, dimension(:), allocatable :: ObjectsList
real(kind=rp), public, dimension(3,8) :: vertices
integer, public :: NumOfObjs
integer, public :: level
integer, public :: axis
integer, public :: index
integer, public :: Min_n_of_Objs
integer, public :: which_KDtree
integer, public :: MaxAxis
integer, public :: SIDE
integer, public :: N_L
integer, public :: N_R
integer, public :: N_B
integer, public :: HalfEvents
integer, public :: NumThreads
integer, public :: STLNum
logical, public :: isLast
logical, public :: Split
logical, public :: built_R = .false.
logical, public :: built_L = .false.
integer, public, dimension(NDIM) :: NumOfEvents
real(kind=rp), public :: S
real(kind=rp), public :: SplitCost
real(kind=rp), public :: SplittingPlane
type(Event), public, dimension(:,:), allocatable :: Events
integer, public, dimension(:), allocatable :: ObjsIndeces

Type-Bound Procedures

procedure, public :: construct => KDtree_construct

  • public subroutine KDtree_construct(this, stl, Vertices, isPlot, Min_n_of_Objs, PointList, lvl)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    type(STLfile), intent(in) :: stl
    real(kind=RP), intent(in) :: Vertices(:,:)
    logical, intent(in) :: isPlot
    integer, intent(in) :: Min_n_of_Objs
    type(point_type), intent(in), optional :: PointList(:)
    integer, intent(in), optional :: lvl

procedure, public :: SetUpRoot => KDtree_SetUpRoot

  • public subroutine KDtree_SetUpRoot(this, stl, Vertices, PointList)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    type(STLfile), intent(in) :: stl
    real(kind=RP), intent(in) :: Vertices(:,:)
    type(point_type), intent(in), optional :: PointList(:)

procedure, public :: FindLeaf => KDtree_FindLeaf

  • public subroutine KDtree_FindLeaf(this, Point, tree, RIGHTCHILD)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout), target :: this
    real(kind=rp), intent(in) :: Point(:)
    type(KDtree), intent(inout), pointer :: tree
    logical, intent(in) :: RIGHTCHILD

procedure, public :: plot => KDtree_plot

  • public subroutine KDtree_plot(this, lvl)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout), target :: this
    integer, intent(in), optional :: lvl

procedure, public :: plotBlock => KDtree_plotBlock

  • public subroutine KDtree_plotBlock(this, ObjectsList, STLNum, PlotObjs)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    type(Object_type), intent(in) :: ObjectsList(:)
    integer, intent(in) :: STLNum
    logical, intent(in) :: PlotObjs

procedure, public :: Destruct => KD_treeDestruct

  • public recursive subroutine KD_treeDestruct(this, isChild)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    logical, intent(in) :: isChild

procedure, public :: GetArea => KD_treeGetArea

  • public subroutine KD_treeGetArea(tree)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: tree

procedure, public :: BuildChild => KDtree_BuildChild

  • public subroutine KDtree_BuildChild(this, child, side)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    type(KDtree), intent(inout) :: child
    integer, intent(in) :: side

procedure, public :: EvaluateCostSAH => KDtree_EvaluateCostSAH

  • public subroutine KDtree_EvaluateCostSAH(this, Events)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    type(Event), intent(in) :: Events(:,:)

procedure, public :: EvaluateCostMEDIAN => KDtree_EvaluateCostMEDIAN

  • public subroutine KDtree_EvaluateCostMEDIAN(this, Events)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    type(Event), intent(in) :: Events(:,:)

procedure, public :: SaveObjsIndeces => KDtree_SaveObjsIndeces

  • public subroutine KDtree_SaveObjsIndeces(this, Events)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    type(Event), intent(in) :: Events(:,:)

procedure, public :: SavePointsIndeces => KDtree_SavePointsIndeces

  • public subroutine KDtree_SavePointsIndeces(this, Events)

    Arguments

    Type IntentOptional Attributes Name
    class(KDtree), intent(inout) :: this
    type(Event), intent(in) :: Events(:,:)