This module provides the tree routine.

name | description |
---|---|

Subroutines contained in this interface:

name | description |
---|---|

This routine performs a generic tree decomposition | |

This routine performs a generic tree decomposition | |

This routine performs a generic tree decomposition | |

This routine performs a generic tree decomposition |

This routine performs a generic tree decomposition using recursive orthogonal multisection (ROM) in either 2, 4, or 8 subunits (binary tree, quadtree, octtree). The tree can be based on scattered data points (if Np > 0), on regular mesh points (if Nm > 0) or purely on the geometry of the domain (if both Np and Nm are 0).

Remarks | |
---|---|

If Np > 0, the particle-caused cost per sub is given by number(particles) [or sum(pcost)] in that sub. If Nm(1:ppm_dim) > 1, the mesh-caused cost is given by the number of mesh points in each sub. The geometry-based cost is always given by the volume of each sub. These costs can be freely composed using the weights argument. ppm_decomp_cartesian is not made obsolete by this routine since the latter can gracefully produce ANY (even prime) number of equisized subdomains, whereas this routine is restricted to powers of 2, 4, or 8 (for equisized subs!). directly compute box costs in tree_cutpos (since we do the allreduce there anyway) and return them. only recompute (with tree_boxcost) if the cut planes were shifted. |

name | type | dimension | intent | optional | description |
---|---|---|---|---|---|

real array | (:,:) | (IN) | The data points | ||

integer | (IN) | Number of data points. | |||

integer array | (:) | (IN) | Number of grid points in the global mesh. (0,0,0) if there is | ||

real array | (:) | (IN) | Minimum coordinate of the domain | ||

real array | (:) | (IN) | Maximum coordinate of the domain | ||

integer | (IN) | Type of multisection tree. One of: | |||

integer | (IN) | Minimum number of childless boxes (leaves) of non-zero cost to be | |||

logical | (IN) |
| |||

real array | (:) | (IN) | Miminum box size in all directions | ||

real | (IN) | Maximum variance of cost allowed between boxes. The tree stops as | |||

real | (IN) | Maximum cost per box. Subdivision will stop | |||

logical array | (:) | (IN) | Flag which tells for each spatial dimension (1..ppm_dim) if it is | ||

real array | (3,2) | (IN) | Weights for the three cost contributions (particles, mesh | ||

real array | (:,:) | Min. extents of the boxes | |||

real array | (:,:) | Max. extents of the boxes | |||

integer | (OUT) | The total number of boxes | |||

integer array | (:) | Number of children of each box. | |||

integer | (OUT) | Return status, 0 upon success | |||

real array | (:) | (IN) |
| Argument of length Np, specifying the |

real array, `(:,:)`

, (IN)

The data points

integer, , (IN)

Number of data points. If ⇐ 0, decomposition is based on geometry and mesh only.

integer array, `(:)`

, (IN)

Number of grid points in the global mesh. (0,0,0) if there is no mesh. If a mesh is present, the box boundaries will be aligned with mesh planes.

real array, `(:)`

, (IN)

Minimum coordinate of the domain

real array, `(:)`

, (IN)

Maximum coordinate of the domain

integer, , (IN)

Type of multisection tree. One of:

- ppm_param_tree_bin
- ppm_param_tree_quad
- ppm_param_tree_oct (3D only)

For binary, quad- or oct-tree.

integer, , (IN)

Minimum number of childless boxes (leaves) of non-zero cost to be created. Set this to -1 if there is no minimum requirement.

logical, , (IN)

`TRUE`

to prune the tree to only contain boxes of non-zero cost.
`FALSE`

to get a tree with all boxes (also the empty ones).

real array, `(:)`

, (IN)

Miminum box size in all directions

real, , (IN)

Maximum variance of cost allowed between boxes. The tree stops as soon as the variance of costs of all boxes is below this max. Set this to -1 to disable this criterion.

real, , (IN)

Maximum cost per box. Subdivision will stop as soon as all boxes have costs below this value. Set this to -1 to not impose any limit.

logical array, `(:)`

, (IN)

Flag which tells for each spatial dimension (1..ppm_dim) if it is fixed (i.e. no cuts perpendicular to it are allowed). fixed=(F,F,T) will e.g. enforce z-pencil decompositions.

real array, `(3,2)`

, (IN)

Weights for the three cost contributions (particles, mesh points, volume) (1st index) for box cost (weights(:,1)) and the determination of the cut planes (weights(:,2)).

real array, `(:,:)`

, no intent declared

Min. extents of the boxes

real array, `(:,:)`

, no intent declared

Max. extents of the boxes

integer, , (OUT)

The total number of boxes

integer array, `(:)`

, no intent declared

Number of children of each box.

integer, , (OUT)

Return status, 0 upon success

real array, `(:)`

, (IN)

Argument of length Np, specifying the cost of each data point.

ppm_module_data, ppm_module_util_rank, ppm_module_decomp, ppm_module_error, ppm_module_tree_alloc, ppm_module_alloc, ppm_module_substop, ppm_module_tree_boxcut, ppm_module_tree_cutdir, ppm_module_tree_done, ppm_module_tree_boxcost, ppm_module_tree_divcheck, ppm_module_data_tree, ppm_module_write, ppm_module_tree_cutpos, ppm_module_substart

This routine performs a generic tree decomposition using recursive orthogonal multisection (ROM) in either 2, 4, or 8 subunits (binary tree, quadtree, octtree). The tree can be based on scattered data points (if Np > 0), on regular mesh points (if Nm > 0) or purely on the geometry of the domain (if both Np and Nm are 0).

Remarks | |
---|---|

If Np > 0, the particle-caused cost per sub is given by number(particles) [or sum(pcost)] in that sub. If Nm(1:ppm_dim) > 1, the mesh-caused cost is given by the number of mesh points in each sub. The geometry-based cost is always given by the volume of each sub. These costs can be freely composed using the weights argument. ppm_decomp_cartesian is not made obsolete by this routine since the latter can gracefully produce ANY (even prime) number of equisized subdomains, whereas this routine is restricted to powers of 2, 4, or 8 (for equisized subs!). directly compute box costs in tree_cutpos (since we do the allreduce there anyway) and return them. only recompute (with tree_boxcost) if the cut planes were shifted. |

name | type | dimension | intent | optional | description |
---|---|---|---|---|---|

real array | (:,:) | (IN) | The data points | ||

integer | (IN) | Number of data points. | |||

integer array | (:) | (IN) | Number of grid points in the global mesh. (0,0,0) if there is | ||

real array | (:) | (IN) | Minimum coordinate of the domain | ||

real array | (:) | (IN) | Maximum coordinate of the domain | ||

integer | (IN) | Type of multisection tree. One of: | |||

integer | (IN) | Minimum number of childless boxes (leaves) of non-zero cost to be | |||

logical | (IN) |
| |||

real array | (:) | (IN) | Miminum box size in all directions | ||

real | (IN) | Maximum variance of cost allowed between boxes. The tree stops as | |||

real | (IN) | Maximum cost per box. Subdivision will stop | |||

logical array | (:) | (IN) | Flag which tells for each spatial dimension (1..ppm_dim) if it is | ||

real array | (3,2) | (IN) | Weights for the three cost contributions (particles, mesh | ||

real array | (:,:) | Min. extents of the boxes | |||

real array | (:,:) | Max. extents of the boxes | |||

integer | (OUT) | The total number of boxes | |||

integer array | (:) | Number of children of each box. | |||

integer | (OUT) | Return status, 0 upon success | |||

real array | (:) | (IN) |
| Argument of length Np, specifying the |

real array, `(:,:)`

, (IN)

The data points

integer, , (IN)

Number of data points. If ⇐ 0, decomposition is based on geometry and mesh only.

integer array, `(:)`

, (IN)

Number of grid points in the global mesh. (0,0,0) if there is no mesh. If a mesh is present, the box boundaries will be aligned with mesh planes.

real array, `(:)`

, (IN)

Minimum coordinate of the domain

real array, `(:)`

, (IN)

Maximum coordinate of the domain

integer, , (IN)

Type of multisection tree. One of:

- ppm_param_tree_bin
- ppm_param_tree_quad
- ppm_param_tree_oct (3D only)

For binary, quad- or oct-tree.

integer, , (IN)

Minimum number of childless boxes (leaves) of non-zero cost to be created. Set this to -1 if there is no minimum requirement.

logical, , (IN)

`TRUE`

to prune the tree to only contain boxes of non-zero cost.
`FALSE`

to get a tree with all boxes (also the empty ones).

real array, `(:)`

, (IN)

Miminum box size in all directions

real, , (IN)

Maximum variance of cost allowed between boxes. The tree stops as soon as the variance of costs of all boxes is below this max. Set this to -1 to disable this criterion.

real, , (IN)

Maximum cost per box. Subdivision will stop as soon as all boxes have costs below this value. Set this to -1 to not impose any limit.

logical array, `(:)`

, (IN)

Flag which tells for each spatial dimension (1..ppm_dim) if it is fixed (i.e. no cuts perpendicular to it are allowed). fixed=(F,F,T) will e.g. enforce z-pencil decompositions.

real array, `(3,2)`

, (IN)

Weights for the three cost contributions (particles, mesh points, volume) (1st index) for box cost (weights(:,1)) and the determination of the cut planes (weights(:,2)).

real array, `(:,:)`

, no intent declared

Min. extents of the boxes

real array, `(:,:)`

, no intent declared

Max. extents of the boxes

integer, , (OUT)

The total number of boxes

integer array, `(:)`

, no intent declared

Number of children of each box.

integer, , (OUT)

Return status, 0 upon success

real array, `(:)`

, (IN)

Argument of length Np, specifying the cost of each data point.

ppm_module_data, ppm_module_util_rank, ppm_module_decomp, ppm_module_error, ppm_module_tree_alloc, ppm_module_alloc, ppm_module_substop, ppm_module_tree_boxcut, ppm_module_tree_cutdir, ppm_module_tree_done, ppm_module_tree_boxcost, ppm_module_tree_divcheck, ppm_module_data_tree, ppm_module_write, ppm_module_tree_cutpos, ppm_module_substart

This routine performs a generic tree decomposition using recursive orthogonal multisection (ROM) in either 2, 4, or 8 subunits (binary tree, quadtree, octtree). The tree can be based on scattered data points (if Np > 0), on regular mesh points (if Nm > 0) or purely on the geometry of the domain (if both Np and Nm are 0).

In this version the full tree information (connectivity, levels, etc.) is computed and returned. If 3 == 4, only the space decomposition is done, but no tree information returned.

Remarks | |
---|---|

If Np > 0, the particle-caused cost per sub is given by number(particles) [or sum(pcost)] in that sub. If Nm(1:ppm_dim) > 1, the mesh-caused cost is given by the number of mesh points in each sub. The geometry-based cost is always given by the volume of each sub. These costs can be freely composed using the weights argument. ppm_decomp_cartesian is not made obsolete by this routine since the latter can gracefully produce ANY (even prime) number of equisized subdomains, whereas this routine is restricted to powers of 2, 4, or 8 (for equisized subs!). directly compute box costs in tree_cutpos (since we do the allreduce there anyway) and return them. only recompute (with tree_boxcost) if the cut planes were shifted. |

name | type | dimension | intent | optional | description |
---|---|---|---|---|---|

real array | (:,:) | (IN) | The data points | ||

integer | (IN) | Number of data points. | |||

integer array | (:) | (IN) | Number of grid points in the global mesh. (0,0,0) if there is | ||

real array | (:) | (IN) | Minimum coordinate of the domain | ||

real array | (:) | (IN) | Maximum coordinate of the domain | ||

integer | (IN) | Type of multisection tree. One of: | |||

integer | (IN) | Minimum number of childless boxes (leaves) of non-zero cost to be | |||

logical | (IN) |
| |||

real array | (:) | (IN) | Miminum box size in all directions | ||

real | (IN) | Maximum variance of cost allowed between boxes. The tree stops as | |||

real | (IN) | Maximum cost per box. Subdivision will stop | |||

integer | (IN) | Maximum number of levels to create. Tree stops as soon as | |||

logical array | (:) | (IN) | Flag which tells for each spatial dimension (1..ppm_dim) if it is | ||

real array | (3,2) | (IN) | Weights for the three cost contributions (particles, mesh | ||

real array | (:,:) | Min. extents of the boxes | |||

real array | (:,:) | Max. extents of the boxes | |||

integer array | (:,:) | pointer to first (1,:) and last (2,:) data point (in | |||

integer array | (:) | Pointers to the data points (in xp) in each tree box. Box ib | |||

real array | (:) | Costs of all boxes 1..nbox. | |||

integer array | (:) | Index of the parent box of each box. ppm_param_undefined if no | |||

integer array | (:) | Number of children of each box. | |||

integer array | (:,:) | Indices of all children of a box. | |||

integer array | (:) | tree level of each box. 1..nbox. Level 1 is the root box. | |||

integer | (OUT) | The total number of boxes | |||

integer array | (:) | the number of boxes per level. Level 1 is the root box. | |||

integer | (OUT) | The number of levels. Level 1 is the root box. | |||

integer | (OUT) | Return status, 0 upon success | |||

real array | (:) | (IN) |
| Argument of length Np, specifying the |

real array, `(:,:)`

, (IN)

The data points

integer, , (IN)

Number of data points. If ⇐ 0, decomposition is based on geometry and mesh only.

integer array, `(:)`

, (IN)

Number of grid points in the global mesh. (0,0,0) if there is no mesh. If a mesh is present, the box boundaries will be aligned with mesh planes.

real array, `(:)`

, (IN)

Minimum coordinate of the domain

real array, `(:)`

, (IN)

Maximum coordinate of the domain

integer, , (IN)

Type of multisection tree. One of:

- ppm_param_tree_bin
- ppm_param_tree_quad
- ppm_param_tree_oct (3D only)

For binary, quad- or oct-tree.

integer, , (IN)

Minimum number of childless boxes (leaves) of non-zero cost to be created. Set this to -1 if there is no minimum requirement.

logical, , (IN)

`TRUE`

to prune the tree to only contain boxes of non-zero cost.
`FALSE`

to get a tree with all boxes (also the empty ones).

real array, `(:)`

, (IN)

Miminum box size in all directions

real, , (IN)

Maximum variance of cost allowed between boxes. The tree stops as soon as the variance of costs of all boxes is below this max. Set this to -1 to disable this criterion.

real, , (IN)

Maximum cost per box. Subdivision will stop as soon as all boxes have costs below this value. Set this to -1 to not impose any limit.

integer, , (IN)

Maximum number of levels to create. Tree stops as soon as this is reached. The root box is counted as level 1. Set to ⇐ 0 for unlimited levels. This input is only present in the 3 version, not in the 4 version.

logical array, `(:)`

, (IN)

Flag which tells for each spatial dimension (1..ppm_dim) if it is fixed (i.e. no cuts perpendicular to it are allowed). fixed=(F,F,T) will e.g. enforce z-pencil decompositions.

real array, `(3,2)`

, (IN)

Weights for the three cost contributions (particles, mesh points, volume) (1st index) for box cost (weights(:,1)) and the determination of the cut planes (weights(:,2)).

real array, `(:,:)`

, no intent declared

Min. extents of the boxes

real array, `(:,:)`

, no intent declared

Max. extents of the boxes

integer array, `(:,:)`

, no intent declared

pointer to first (1,:) and last (2,:) data point (in
lpdx) in each tree box. This is only present if
Np > 0. Only points on the local processor are considered.
Entries for non-leaf boxes are only true if `pruneboxes=FALSE`

integer array, `(:)`

, no intent declared

Pointers to the data points (in xp) in each tree box. Box ib
conatins points lpdx(lhbx(1,ib):(lhbx(2,ib)))
This is only present if Np > 0. Only points on the local
processor are considered. Entries for non-leaf boxes are
only true if `pruneboxes=FALSE`

real array, `(:)`

, no intent declared

Costs of all boxes 1..nbox.

integer array, `(:)`

, no intent declared

Index of the parent box of each box. ppm_param_undefined if no parent (i.e. root box)

integer array, `(:)`

, no intent declared

Number of children of each box.

integer array, `(:,:)`

, no intent declared

Indices of all children of a box.

1st index: child ID 2nd: box ID.

integer array, `(:)`

, no intent declared

tree level of each box. 1..nbox. Level 1 is the root box.

integer, , (OUT)

The total number of boxes

integer array, `(:)`

, no intent declared

the number of boxes per level. Level 1 is the root box.

integer, , (OUT)

The number of levels. Level 1 is the root box.

integer, , (OUT)

Return status, 0 upon success

real array, `(:)`

, (IN)

Argument of length Np, specifying the cost of each data point.

ppm_module_data, ppm_module_util_rank, ppm_module_decomp, ppm_module_error, ppm_module_tree_alloc, ppm_module_alloc, ppm_module_substop, ppm_module_tree_boxcut, ppm_module_tree_cutdir, ppm_module_tree_done, ppm_module_tree_boxcost, ppm_module_tree_divcheck, ppm_module_data_tree, ppm_module_write, ppm_module_tree_cutpos, ppm_module_substart

In this version the full tree information (connectivity, levels, etc.) is computed and returned. If 3 == 4, only the space decomposition is done, but no tree information returned.

Remarks | |
---|---|

These costs can be freely composed using the weights argument. |

name | type | dimension | intent | optional | description |
---|---|---|---|---|---|

real array | (:,:) | (IN) | The data points | ||

integer | (IN) | Number of data points. | |||

integer array | (:) | (IN) | Number of grid points in the global mesh. (0,0,0) if there is | ||

real array | (:) | (IN) | Minimum coordinate of the domain | ||

real array | (:) | (IN) | Maximum coordinate of the domain | ||

integer | (IN) | Type of multisection tree. One of: | |||

integer | (IN) | Minimum number of childless boxes (leaves) of non-zero cost to be | |||

logical | (IN) |
| |||

real array | (:) | (IN) | Miminum box size in all directions | ||

real | (IN) | Maximum variance of cost allowed between boxes. The tree stops as | |||

real | (IN) | Maximum cost per box. Subdivision will stop | |||

integer | (IN) | Maximum number of levels to create. Tree stops as soon as | |||

logical array | (:) | (IN) | Flag which tells for each spatial dimension (1..ppm_dim) if it is | ||

real array | (3,2) | (IN) | Weights for the three cost contributions (particles, mesh | ||

real array | (:,:) | Min. extents of the boxes | |||

real array | (:,:) | Max. extents of the boxes | |||

integer array | (:,:) | pointer to first (1,:) and last (2,:) data point (in | |||

integer array | (:) | Pointers to the data points (in xp) in each tree box. Box ib | |||

real array | (:) | Costs of all boxes 1..nbox. | |||

integer array | (:) | Index of the parent box of each box. ppm_param_undefined if no | |||

integer array | (:) | Number of children of each box. | |||

integer array | (:,:) | Indices of all children of a box. | |||

integer array | (:) | tree level of each box. 1..nbox. Level 1 is the root box. | |||

integer | (OUT) | The total number of boxes | |||

integer array | (:) | the number of boxes per level. Level 1 is the root box. | |||

integer | (OUT) | The number of levels. Level 1 is the root box. | |||

integer | (OUT) | Return status, 0 upon success | |||

real array | (:) | (IN) |
| Argument of length Np, specifying the |

real array, `(:,:)`

, (IN)

The data points

integer, , (IN)

Number of data points. If ⇐ 0, decomposition is based on geometry and mesh only.

integer array, `(:)`

, (IN)

real array, `(:)`

, (IN)

Minimum coordinate of the domain

real array, `(:)`

, (IN)

Maximum coordinate of the domain

integer, , (IN)

Type of multisection tree. One of:

- ppm_param_tree_bin
- ppm_param_tree_quad
- ppm_param_tree_oct (3D only)

For binary, quad- or oct-tree.

integer, , (IN)

logical, , (IN)

`TRUE`

to prune the tree to only contain boxes of non-zero cost.
`FALSE`

to get a tree with all boxes (also the empty ones).

real array, `(:)`

, (IN)

Miminum box size in all directions

real, , (IN)

real, , (IN)

integer, , (IN)

Maximum number of levels to create. Tree stops as soon as this is reached. The root box is counted as level 1. Set to ⇐ 0 for unlimited levels. This input is only present in the 3 version, not in the 4 version.

logical array, `(:)`

, (IN)

real array, `(3,2)`

, (IN)

real array, `(:,:)`

, no intent declared

Min. extents of the boxes

real array, `(:,:)`

, no intent declared

Max. extents of the boxes

integer array, `(:,:)`

, no intent declared

pointer to first (1,:) and last (2,:) data point (in
lpdx) in each tree box. This is only present if
Np > 0. Only points on the local processor are considered.
Entries for non-leaf boxes are only true if `pruneboxes=FALSE`

integer array, `(:)`

, no intent declared

Pointers to the data points (in xp) in each tree box. Box ib
conatins points lpdx(lhbx(1,ib):(lhbx(2,ib)))
This is only present if Np > 0. Only points on the local
processor are considered. Entries for non-leaf boxes are
only true if `pruneboxes=FALSE`

real array, `(:)`

, no intent declared

Costs of all boxes 1..nbox.

integer array, `(:)`

, no intent declared

Index of the parent box of each box. ppm_param_undefined if no parent (i.e. root box)

integer array, `(:)`

, no intent declared

Number of children of each box.

integer array, `(:,:)`

, no intent declared

Indices of all children of a box.

1st index: child ID 2nd: box ID.

integer array, `(:)`

, no intent declared

tree level of each box. 1..nbox. Level 1 is the root box.

integer, , (OUT)

The total number of boxes

integer array, `(:)`

, no intent declared

the number of boxes per level. Level 1 is the root box.

integer, , (OUT)

The number of levels. Level 1 is the root box.

integer, , (OUT)

Return status, 0 upon success

real array, `(:)`

, (IN)

Argument of length Np, specifying the cost of each data point.