Module ppm_module_util_sort

This module provides the utility sorting routines.

Defined Types

name description

no types

Defined Module Interfaces

Defined Module Subroutines

name description

no subroutines

Interface ppm_util_sort2d

Subroutines contained in this interface:

name description

ppm_util_sort2d_s

Re-orders the particle locations such that

ppm_util_sort2d_d

Re-orders the particle locations such that

Interface ppm_util_sort3d

Subroutines contained in this interface:

name description

ppm_util_sort3d_s

Re-orders the particle locations such that

ppm_util_sort3d_d

Re-orders the particle locations such that

Subroutine ppm_util_sort2d_d

Re-orders the particle locations such that subsequent particles are in the same box (cell)

[Note]Note

Two do loops do not vectorize. If particles are outside the mesh the code will fail.

[Note]Note

The routine uses no (0) automatic arrays! since they silently fail when resources are exhausted.

[Warning]Warning

This routine may loose real particles if used together with ghost layers

Arguments

name type dimension intent optional description

xp

real array

(:,:)

(INOUT)

Particle coordinates, sorted upon output

np

integer

(IN)

Number of particles

xmin

real array

(:)

(IN)

Minimum extent of cell mesh

xmax

real array

(:)

(IN)

Minimum extent of cell mesh

nm

integer array

(:)

(IN)

Number of cells in each direction

npbx

integer array

(:)

Number of particles in each box

info

integer

(INOUT)

If info = 1 on input the extent of the particles will be checked.

xp

real array, (:,:), (INOUT)

Particle coordinates, sorted upon output

np

integer, , (IN)

Number of particles

xmin

real array, (:), (IN)

Minimum extent of cell mesh

xmax

real array, (:), (IN)

Minimum extent of cell mesh

nm

integer array, (:), (IN)

Number of cells in each direction

npbx

integer array, (:), no intent declared

Number of particles in each box

info

integer, , (INOUT)

If info = 1 on input the extent of the particles will be checked.

return status, 0 on success

Used Modules

ppm_module_data, ppm_module_util_rank, ppm_module_error, ppm_module_alloc, ppm_module_substop, ppm_module_substart

Subroutine ppm_util_sort2d_s

Re-orders the particle locations such that subsequent particles are in the same box (cell)

[Note]Note

Two do loops do not vectorize. If particles are outside the mesh the code will fail.

[Note]Note

The routine uses no (0) automatic arrays! since they silently fail when resources are exhausted.

[Warning]Warning

This routine may loose real particles if used together with ghost layers

Arguments

name type dimension intent optional description

xp

real array

(:,:)

(INOUT)

Particle coordinates, sorted upon output

np

integer

(IN)

Number of particles

xmin

real array

(:)

(IN)

Minimum extent of cell mesh

xmax

real array

(:)

(IN)

Minimum extent of cell mesh

nm

integer array

(:)

(IN)

Number of cells in each direction

npbx

integer array

(:)

Number of particles in each box

info

integer

(INOUT)

If info = 1 on input the extent of the particles will be checked.

xp

real array, (:,:), (INOUT)

Particle coordinates, sorted upon output

np

integer, , (IN)

Number of particles

xmin

real array, (:), (IN)

Minimum extent of cell mesh

xmax

real array, (:), (IN)

Minimum extent of cell mesh

nm

integer array, (:), (IN)

Number of cells in each direction

npbx

integer array, (:), no intent declared

Number of particles in each box

info

integer, , (INOUT)

If info = 1 on input the extent of the particles will be checked.

return status, 0 on success

Used Modules

ppm_module_data, ppm_module_util_rank, ppm_module_error, ppm_module_alloc, ppm_module_substop, ppm_module_substart

Subroutine ppm_util_sort3d_d

Re-orders the particle locations such that subsequent particles are in the same box (cell).

[Note]Note

Two do loops do not vectorize. If particles are outside the mesh the code will fail.

[Note]Note

The routine uses no (0) automatic arrays! since they silently fail when resources are exhausted.

[Warning]Warning

This routine may loose real particles if used together with ghost layers

Arguments

name type dimension intent optional description

xp

real array

(:,:)

(INOUT)

Particle coordinates, sorted upon output

np

integer

(IN)

Number of particles

xmin

real array

(:)

(IN)

Minimum extent of mesh

xmax

real array

(:)

(IN)

Maximum extent of mesh

nm

integer array

(:)

(IN)

Number of cells in each direction

npbx

integer array

(:)

Number of particles in each box

info

integer

(INOUT)

Return status. If info = 1 on input

xp

real array, (:,:), (INOUT)

Particle coordinates, sorted upon output

np

integer, , (IN)

Number of particles

xmin

real array, (:), (IN)

Minimum extent of mesh

xmax

real array, (:), (IN)

Maximum extent of mesh

nm

integer array, (:), (IN)

Number of cells in each direction

npbx

integer array, (:), no intent declared

Number of particles in each box

info

integer, , (INOUT)

Return status. If info = 1 on input the extent of the particles will be checked.

Used Modules

ppm_module_data, ppm_module_util_rank, ppm_module_error, ppm_module_alloc, ppm_module_substop, ppm_module_substart

Subroutine ppm_util_sort3d_s

Re-orders the particle locations such that subsequent particles are in the same box (cell).

[Note]Note

Two do loops do not vectorize. If particles are outside the mesh the code will fail.

[Note]Note

The routine uses no (0) automatic arrays! since they silently fail when resources are exhausted.

[Warning]Warning

This routine may loose real particles if used together with ghost layers

Arguments

name type dimension intent optional description

xp

real array

(:,:)

(INOUT)

Particle coordinates, sorted upon output

np

integer

(IN)

Number of particles

xmin

real array

(:)

(IN)

Minimum extent of mesh

xmax

real array

(:)

(IN)

Maximum extent of mesh

nm

integer array

(:)

(IN)

Number of cells in each direction

npbx

integer array

(:)

Number of particles in each box

info

integer

(INOUT)

Return status. If info = 1 on input

xp

real array, (:,:), (INOUT)

Particle coordinates, sorted upon output

np

integer, , (IN)

Number of particles

xmin

real array, (:), (IN)

Minimum extent of mesh

xmax

real array, (:), (IN)

Maximum extent of mesh

nm

integer array, (:), (IN)

Number of cells in each direction

npbx

integer array, (:), no intent declared

Number of particles in each box

info

integer, , (INOUT)

Return status. If info = 1 on input the extent of the particles will be checked.

Used Modules

ppm_module_data, ppm_module_util_rank, ppm_module_error, ppm_module_alloc, ppm_module_substop, ppm_module_substart

Defined Module Variables

name type dimension description

no variables

Used Modules

has no uses