Module ppm_module_topo_cost

This module provides the subdomain cost calculation routine.

Defined Types

name description

no types

Defined Module Interfaces

name description

ppm_topo_cost

Defined Module Subroutines

name description

no subroutines

Interface ppm_topo_cost

Subroutines contained in this interface:

name description

ppm_topo_cost_s

This routine calculates the computational cost of

ppm_topo_cost_d

This routine calculates the computational cost of

Subroutine ppm_topo_cost_d

This routine calculates the computational cost of each subdomain based on either the particles (if there are any) or the mesh points. The per-particle costs are summed up if present. If not, a unity cost is assumed for each particle.

[Note]Note

If Np < 0, cost is computed based on particles. If SIZE(nnodes,2) >= nsubs, cost based on mesh points is computed and added to the particle cost. If neither particles nor mesh are given, cost of a subdomain is equal to its volume.

Arguments

name type dimension intent optional description

xp

real array

(:,:)

(IN)

Particle positions

np

integer

(IN)

Number of particles. Set to .LE. 0 if mesh-based costs are desired.

min_sub

real array

(:,:)

(IN)

Min. extent of the subdomains

max_sub

real array

(:,:)

(IN)

Max. extent of the subdomains

nsubs

integer

(IN)

Total number of subdomains

nnodes

integer array

(:,:)

(IN)

Number of mesh nodes in each direction (first index) on each

cost

real array

(:)

Aggregate cost for each subdomain

info

integer

(OUT)

Returns status, 0 upon success

pcost

real array

(:)

(IN)

X

Per-particle costs. OPTIONAL. If not present, a cost of 1 per

xp

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

Particle positions

np

integer, , (IN)

Number of particles. Set to .LE. 0 if mesh-based costs are desired.

min_sub

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

Min. extent of the subdomains

max_sub

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

Max. extent of the subdomains

nsubs

integer, , (IN)

Total number of subdomains

nnodes

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

Number of mesh nodes in each direction (first index) on each sub (second index). If Np is .LE. 0, this is taken to compute the cost. If SIZE(nnodes,2).LT.nsubs, and there are no particles, cost is computed as geometric volume.

cost

real array, (:), no intent declared

Aggregate cost for each subdomain

info

integer, , (OUT)

Returns status, 0 upon success

(Optional) pcost

real array, (:), (IN)

Per-particle costs. OPTIONAL. If not present, a cost of 1 per particle is assumed.

Used Modules

ppm_module_data, ppm_module_error, ppm_module_alloc, ppm_module_substop, ppm_module_write, ppm_module_substart

Subroutine ppm_topo_cost_s

This routine calculates the computational cost of each subdomain based on either the particles (if there are any) or the mesh points. The per-particle costs are summed up if present. If not, a unity cost is assumed for each particle.

[Note]Note

If Np < 0, cost is computed based on particles. If SIZE(nnodes,2) >= nsubs, cost based on mesh points is computed and added to the particle cost. If neither particles nor mesh are given, cost of a subdomain is equal to its volume.

Arguments

name type dimension intent optional description

xp

real array

(:,:)

(IN)

Particle positions

np

integer

(IN)

Number of particles. Set to .LE. 0 if mesh-based costs are desired.

min_sub

real array

(:,:)

(IN)

Min. extent of the subdomains

max_sub

real array

(:,:)

(IN)

Max. extent of the subdomains

nsubs

integer

(IN)

Total number of subdomains

nnodes

integer array

(:,:)

(IN)

Number of mesh nodes in each direction (first index) on each

cost

real array

(:)

Aggregate cost for each subdomain

info

integer

(OUT)

Returns status, 0 upon success

pcost

real array

(:)

(IN)

X

Per-particle costs. OPTIONAL. If not present, a cost of 1 per

xp

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

Particle positions

np

integer, , (IN)

Number of particles. Set to .LE. 0 if mesh-based costs are desired.

min_sub

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

Min. extent of the subdomains

max_sub

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

Max. extent of the subdomains

nsubs

integer, , (IN)

Total number of subdomains

nnodes

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

Number of mesh nodes in each direction (first index) on each sub (second index). If Np is .LE. 0, this is taken to compute the cost. If SIZE(nnodes,2).LT.nsubs, and there are no particles, cost is computed as geometric volume.

cost

real array, (:), no intent declared

Aggregate cost for each subdomain

info

integer, , (OUT)

Returns status, 0 upon success

(Optional) pcost

real array, (:), (IN)

Per-particle costs. OPTIONAL. If not present, a cost of 1 per particle is assumed.

Used Modules

ppm_module_data, ppm_module_error, ppm_module_alloc, ppm_module_substop, ppm_module_write, ppm_module_substart

Defined Module Variables

name type dimension description

no variables

Used Modules

has no uses