Module ppm_module_tree_done

This module provides the routine that determines when a tree is done.

Defined Types

name description

no types

Defined Module Interfaces

name description

ppm_tree_done

Defined Module Subroutines

name description

no subroutines

Interface ppm_tree_done

Subroutines contained in this interface:

name description

ppm_tree_done_s

This routine decides if a decomposition is done or

ppm_tree_done_d

This routine decides if a decomposition is done or

Subroutine ppm_tree_done_d

This routine decides if a decomposition is done or one or more boxes need further refinement.

[Note]Note

Decomposition is considered done if more boxes than minboxes are present and the variance of the costs of all divisible (i.e. childless and non-empty) boxes is below maxvariance. Alternatively, a decomposition is always done when no more divisible boxes exist or the specified maximum number of levels has been reached.

Arguments

name type dimension intent optional description

minboxes

integer

(IN)

Minimum number of childless boxes of non-zero cost to create.

nsubs

integer

(IN)

Number of childless boxes with non-zero cost. This is not the

boxcost

real array

(:)

(IN)

Computational cost associated with each box

iboxlist

integer array

(:)

(IN)

List of divisible boxes.

nboxlist

integer

(IN)

Number of boxes which could be divided further (i.e. length of

nlevel

integer

(IN)

Number if tree levels (tree depth) so far.

maxvariance

real

(IN)

Maximum variance of cost allowed between boxes. Set to .LE. 0 to

maxboxcost

real

(IN)

Maximum allowed cost of a box. Tree will stop if all boxes are

maxlevels

integer

(IN)

Maximum number of levels to be created. Tree stops as soon as

lcontinue

logical

(OUT)

FALSE if no further subdivision is needed, TRUE otherwise.

info

integer

(OUT)

Return status, 0 on success

minboxes

integer, , (IN)

Minimum number of childless boxes of non-zero cost to create.

nsubs

integer, , (IN)

Number of childless boxes with non-zero cost. This is not the same as number of divisible boxes as they need not be larger than 2*minboxsize in this case.

boxcost

real array, (:), (IN)

Computational cost associated with each box

iboxlist

integer array, (:), (IN)

List of divisible boxes.

nboxlist

integer, , (IN)

Number of boxes which could be divided further (i.e. length of iboxlist).

nlevel

integer, , (IN)

Number if tree levels (tree depth) so far.

maxvariance

real, , (IN)

Maximum variance of cost allowed between boxes. Set to .LE. 0 to disable this.

maxboxcost

real, , (IN)

Maximum allowed cost of a box. Tree will stop if all boxes are below this cost. If .LE. 0, cost is unlimited.

maxlevels

integer, , (IN)

Maximum number of levels to be created. Tree stops as soon as this is reached. If .LE. 0, levels are unlimited.

lcontinue

logical, , (OUT)

FALSE if no further subdivision is needed, TRUE otherwise.

info

integer, , (OUT)

Return status, 0 on success

Used Modules

ppm_module_data, ppm_module_error, ppm_module_write, ppm_module_substop, ppm_module_substart

Subroutine ppm_tree_done_s

This routine decides if a decomposition is done or one or more boxes need further refinement.

[Note]Note

Decomposition is considered done if more boxes than minboxes are present and the variance of the costs of all divisible (i.e. childless and non-empty) boxes is below maxvariance. Alternatively, a decomposition is always done when no more divisible boxes exist or the specified maximum number of levels has been reached.

Arguments

name type dimension intent optional description

minboxes

integer

(IN)

Minimum number of childless boxes of non-zero cost to create.

nsubs

integer

(IN)

Number of childless boxes with non-zero cost. This is not the

boxcost

real array

(:)

(IN)

Computational cost associated with each box

iboxlist

integer array

(:)

(IN)

List of divisible boxes.

nboxlist

integer

(IN)

Number of boxes which could be divided further (i.e. length of

nlevel

integer

(IN)

Number if tree levels (tree depth) so far.

maxvariance

real

(IN)

Maximum variance of cost allowed between boxes. Set to .LE. 0 to

maxboxcost

real

(IN)

Maximum allowed cost of a box. Tree will stop if all boxes are

maxlevels

integer

(IN)

Maximum number of levels to be created. Tree stops as soon as

lcontinue

logical

(OUT)

FALSE if no further subdivision is needed, TRUE otherwise.

info

integer

(OUT)

Return status, 0 on success

minboxes

integer, , (IN)

Minimum number of childless boxes of non-zero cost to create.

nsubs

integer, , (IN)

Number of childless boxes with non-zero cost. This is not the same as number of divisible boxes as they need not be larger than 2*minboxsize in this case.

boxcost

real array, (:), (IN)

Computational cost associated with each box

iboxlist

integer array, (:), (IN)

List of divisible boxes.

nboxlist

integer, , (IN)

Number of boxes which could be divided further (i.e. length of iboxlist).

nlevel

integer, , (IN)

Number if tree levels (tree depth) so far.

maxvariance

real, , (IN)

Maximum variance of cost allowed between boxes. Set to .LE. 0 to disable this.

maxboxcost

real, , (IN)

Maximum allowed cost of a box. Tree will stop if all boxes are below this cost. If .LE. 0, cost is unlimited.

maxlevels

integer, , (IN)

Maximum number of levels to be created. Tree stops as soon as this is reached. If .LE. 0, levels are unlimited.

lcontinue

logical, , (OUT)

FALSE if no further subdivision is needed, TRUE otherwise.

info

integer, , (OUT)

Return status, 0 on success

Used Modules

ppm_module_data, ppm_module_error, ppm_module_write, ppm_module_substop, ppm_module_substart

Defined Module Variables

name type dimension description

no variables

Used Modules

has no uses