Module ppm_module_tree_boxcost

This module provides the routine that computes the costs of tree boxes.

Defined Types

name description

no types

Defined Module Interfaces

name description

ppm_tree_boxcost

Defined Module Subroutines

name description

no subroutines

Interface ppm_tree_boxcost

Subroutines contained in this interface:

name description

ppm_tree_boxcost_s

This routine computes the cost of a set of boxes.

ppm_tree_boxcost_d

This routine computes the cost of a set of boxes.

Subroutine ppm_tree_boxcost_d

This routine computes the cost of a set of boxes.

[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.

Arguments

name type dimension intent optional description

nm

integer array

(:,:)

(IN)

Number of grid points in each box.

weights

real array

(3)

(IN)

Weights for the three cost contributions: particles, mesh,

min_box

real array

(:,:)

(IN)

The minimum coordinate of the boxes.

max_box

real array

(:,:)

(IN)

The maximum coordinate of the boxes.

nbox

integer

(IN)

Number of boxes to compute cost for.

lhbx

integer array

(:)

(IN)

Pointer to first particle in each box to determine cost for.

lpdx

integer array

(:)

(IN)

Index list of points in each box to determine cost for.

boxcost

real array

(:)

Costs of the boxes 1..nbox. boxcost(i) is the cost of box boxes(i).

info

integer

(OUT)

Return status, 0 on success

pcost

real array

(:)

(IN)

X

Argument of length Npart, specifying the

nm

integer array, (:,:), (IN)

Number of grid points in each box.

weights

real array, (3), (IN)

Weights for the three cost contributions: particles, mesh, geometry for defining the total cost of a box.

min_box

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

The minimum coordinate of the boxes.

1st index: x,y[,z] 2nd: box ID

max_box

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

The maximum coordinate of the boxes.

1st index: x,y[,z] 2nd: box ID

nbox

integer, , (IN)

Number of boxes to compute cost for.

lhbx

integer array, (:), (IN)

Pointer to first particle in each box to determine cost for. This only needs to be present if there are any particles.

lpdx

integer array, (:), (IN)

Index list of points in each box to determine cost for. This only needs to be present if there are any particles.

boxcost

real array, (:), no intent declared

Costs of the boxes 1..nbox. boxcost(i) is the cost of box boxes(i).

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_boxcost_s

This routine computes the cost of a set of boxes.

[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.

Arguments

name type dimension intent optional description

nm

integer array

(:,:)

(IN)

Number of grid points in each box.

weights

real array

(3)

(IN)

Weights for the three cost contributions: particles, mesh,

min_box

real array

(:,:)

(IN)

The minimum coordinate of the boxes.

max_box

real array

(:,:)

(IN)

The maximum coordinate of the boxes.

nbox

integer

(IN)

Number of boxes to compute cost for.

lhbx

integer array

(:)

(IN)

Pointer to first particle in each box to determine cost for.

lpdx

integer array

(:)

(IN)

Index list of points in each box to determine cost for.

boxcost

real array

(:)

Costs of the boxes 1..nbox. boxcost(i) is the cost of box boxes(i).

info

integer

(OUT)

Return status, 0 on success

pcost

real array

(:)

(IN)

X

Argument of length Npart, specifying the

nm

integer array, (:,:), (IN)

Number of grid points in each box.

weights

real array, (3), (IN)

Weights for the three cost contributions: particles, mesh, geometry for defining the total cost of a box.

min_box

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

The minimum coordinate of the boxes.

1st index: x,y[,z] 2nd: box ID

max_box

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

The maximum coordinate of the boxes.

1st index: x,y[,z] 2nd: box ID

nbox

integer, , (IN)

Number of boxes to compute cost for.

lhbx

integer array, (:), (IN)

Pointer to first particle in each box to determine cost for. This only needs to be present if there are any particles.

lpdx

integer array, (:), (IN)

Index list of points in each box to determine cost for. This only needs to be present if there are any particles.

boxcost

real array, (:), no intent declared

Costs of the boxes 1..nbox. boxcost(i) is the cost of box boxes(i).

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