Module ppm_module_tree_cutdir

This module provides the routine that determines the optimal direction of subdividing a box.

Defined Types

name description

no types

Defined Module Interfaces

name description

ppm_tree_cutdir

Defined Module Subroutines

name description

no subroutines

Interface ppm_tree_cutdir

Subroutines contained in this interface:

name description

ppm_tree_cutdir_s

This routine finds the best cutting directions and

ppm_tree_cutdir_d

This routine finds the best cutting directions and

Subroutine ppm_tree_cutdir_d

This routine finds the best cutting directions and positions for the given cut directions.

[Note]Note

The cost of a particle is counted as pcost (if given) or 1. For meshes, the cost is 1 per mesh point. For the geometry part, the cost of a box is given by its volume. Use weights(3) to adjust this if needed.

[Note]Note

The best direction cut is given by min cost of geometry&mesh and max cost of moment of inertia (particles cost)

Arguments

name type dimension intent optional description

xp

real array

(:,:)

(IN)

Particle positions

npart

integer

(IN)

Number of particles

weights

real array

(3)

(IN)

Weights for the three cost contributions: particles, mesh,

min_box

real array

(:,:)

(IN)

Minimum coordinate of the boxes

max_box

real array

(:,:)

(IN)

Maximum coordinate of the boxes

cutbox

integer

(IN)

ID of box to be cut

ncut

integer

(IN)

Number of cut directions

fixed

logical array

(:)

(IN)

Set to TRUE for dimensions which must not be cut

minboxsize

real array

(3)

(IN)

Minimum size of a box in all directions.

icut

integer array

(:)

Directions of best cut. icut=i means: cutting plane is orthogonal

info

integer

(OUT)

Return status, 0 on success

pcost

real array

(:)

(IN)

X

Argument of length Npart, specifying the

xp

real array, (:,:), (IN)

Particle positions

npart

integer, , (IN)

Number of particles

weights

real array, (3), (IN)

Weights for the three cost contributions: particles, mesh, geometry for finding the cut directions.

min_box

real array, (:,:), (IN)

Minimum coordinate of the boxes

max_box

real array, (:,:), (IN)

Maximum coordinate of the boxes

cutbox

integer, , (IN)

ID of box to be cut

ncut

integer, , (IN)

Number of cut directions

fixed

logical array, (:), (IN)

Set to TRUE for dimensions which must not be cut

minboxsize

real array, (3), (IN)

Minimum size of a box in all directions.

icut

integer array, (:), no intent declared

Directions of best cut. icut=i means: cutting plane is orthogonal to i-th coordinate axis. index: 1..ncut. The directions are sorted with the most favorable first.

info

integer, , (OUT)

Return status, 0 on success

(Optional) pcost

real array, (:), (IN)

Argument of length Npart, specifying the computational cost of each particle.

Used Modules

ppm_module_data, ppm_module_error, ppm_module_substop, ppm_module_data_tree, ppm_module_write, ppm_module_substart

Subroutine ppm_tree_cutdir_s

This routine finds the best cutting directions and positions for the given cut directions.

[Note]Note

The cost of a particle is counted as pcost (if given) or 1. For meshes, the cost is 1 per mesh point. For the geometry part, the cost of a box is given by its volume. Use weights(3) to adjust this if needed.

[Note]Note

The best direction cut is given by min cost of geometry&mesh and max cost of moment of inertia (particles cost)

Arguments

name type dimension intent optional description

xp

real array

(:,:)

(IN)

Particle positions

npart

integer

(IN)

Number of particles

weights

real array

(3)

(IN)

Weights for the three cost contributions: particles, mesh,

min_box

real array

(:,:)

(IN)

Minimum coordinate of the boxes

max_box

real array

(:,:)

(IN)

Maximum coordinate of the boxes

cutbox

integer

(IN)

ID of box to be cut

ncut

integer

(IN)

Number of cut directions

fixed

logical array

(:)

(IN)

Set to TRUE for dimensions which must not be cut

minboxsize

real array

(3)

(IN)

Minimum size of a box in all directions.

icut

integer array

(:)

Directions of best cut. icut=i means: cutting plane is orthogonal

info

integer

(OUT)

Return status, 0 on success

pcost

real array

(:)

(IN)

X

Argument of length Npart, specifying the

xp

real array, (:,:), (IN)

Particle positions

npart

integer, , (IN)

Number of particles

weights

real array, (3), (IN)

Weights for the three cost contributions: particles, mesh, geometry for finding the cut directions.

min_box

real array, (:,:), (IN)

Minimum coordinate of the boxes

max_box

real array, (:,:), (IN)

Maximum coordinate of the boxes

cutbox

integer, , (IN)

ID of box to be cut

ncut

integer, , (IN)

Number of cut directions

fixed

logical array, (:), (IN)

Set to TRUE for dimensions which must not be cut

minboxsize

real array, (3), (IN)

Minimum size of a box in all directions.

icut

integer array, (:), no intent declared

Directions of best cut. icut=i means: cutting plane is orthogonal to i-th coordinate axis. index: 1..ncut. The directions are sorted with the most favorable first.

info

integer, , (OUT)

Return status, 0 on success

(Optional) pcost

real array, (:), (IN)

Argument of length Npart, specifying the computational cost of each particle.

Used Modules

ppm_module_data, ppm_module_error, ppm_module_substop, ppm_module_data_tree, ppm_module_write, ppm_module_substart

Defined Module Variables

name type dimension description

no variables

Used Modules

has no uses