Module ppm_module_mktopo

This module provides the interface to the routines that create topologies.

Defined Types

name description

no types

Defined Module Interfaces

name description

ppm_mktopo

Defined Module Subroutines

name description

no subroutines

Interface ppm_mktopo

Subroutines contained in this interface:

name description

ppm_topo_mkpart_s

This routine is the topology creation routine for particles.

ppm_topo_mkpart_d

This routine is the topology creation routine for particles.

ppm_topo_mkfield_s

This routine is the topology creation routine for meshes.

ppm_topo_mkfield_d

This routine is the topology creation routine for meshes.

ppm_topo_mkgeom_s

This routine is the topology creation routine for purely

ppm_topo_mkgeom_d

This routine is the topology creation routine for purely

ppm_topo_mktree_s

This routine creates a topology based on ppm_tree.

ppm_topo_mktree_d

This routine creates a topology based on ppm_tree.

Subroutine ppm_topo_mkfield_d

This routine is the topology creation routine for meshes. In the user_defined case, the user must pass existing subdomains and all of user_minsub, user_maxsub, cost, user_nsubs must be provided. The sub boundaries must align with mesh planes. For all other decompositions, particles can be used to guide them. For this, Npart must be > 0. For Npart ⇐ 0, the decomposition is purely mesh-based. Subs are then mapped onto processors and both the topology and the mesh definition is stored.

[Note]Note

In the case of user-defined subs, a lot is currently trusted. We may want to include further checks in that case, e.g. if proper costs are provided, idata and ndata actually make sense, the extents of all subs are integer multiples of the mesh spacing, etc…

Arguments

name type dimension intent optional description

topoid

integer

(INOUT)

ID number identifying the topology.

meshid

integer

(INOUT)

Mesh identifier (user numbering) for default mesh (as defined by

xp

real array

(:,:)

Particle positions. If present, domain decomposition will be

npart

integer

(IN)

Number of particles. ⇐0 if no xp is given to guide the decomposition

decomp

integer

(IN)

The valid decomposition types are:

assig

integer

(IN)

The type of subdomain-to-processor assignment. One of:

min_phys

real array

(:)

(IN)

Minimum of physical extend of the computational domain (double)

max_phys

real array

(:)

(IN)

Maximum of physical extend of the computational domain (double)

bcdef

integer array

(:)

(IN)

Boundary conditions for the topology

ighostsize

integer array

(:)

(IN)

Size (width) of the ghost layer.

cost

real array

(:)

Estimated cost associated with subdomains. Either user-defined on

nm

integer array

(:)

(IN)

Number of mesh points (not cells) in each direction of the global

info

integer

(OUT)

Returns status, 0 upon success.

ndom

integer

(IN)

X

Number of subdomains requested. If not given, the number

pcost

real array

(:)

(IN)

X

Array of length Npart which specifies the computational

user_minsub

real array

(:,:)

X

Mimimum of extension of subs.

user_maxsub

real array

(:,:)

X

Maximum of extension of subs.

user_nsubs

integer

X

Total number of subs on all processors.

user_sub2proc

integer array

(:)

X

Subdomain to processor assignment. index: subID (global)

topoid

integer, , (INOUT)

ID number identifying the topology. If topoid == 0 on input a new topology is created and the new topoid is returned here, else the indicated toplogy is replaced.

[Caution]Caution

SEMANTICS CHANGED: topoid = 0 is not anymore reserved for the ring topology (null decomposition). "Ring topologies" are non geometric and need no setup. The user can perform ppm ring shift operations without having to first define a topology.

meshid

integer, , (INOUT)

Mesh identifier (user numbering) for default mesh (as defined by Nm) on the topology. If <0, ppm will create a number internally and return it here on exit.

xp

real array, (:,:), no intent declared

Particle positions. If present, domain decomposition will be guided by particle locations

npart

integer, , (IN)

Number of particles. ⇐0 if no xp is given to guide the decomposition

decomp

integer, , (IN)

The valid decomposition types are:

  • ppm_param_decomp_bisection
  • ppm_param_decomp_xpencil
  • ppm_param_decomp_ypencil
  • ppm_param_decomp_zpencil
  • ppm_param_decomp_xy_slab
  • ppm_param_decomp_xz_slab
  • ppm_param_decomp_yz_slab
  • ppm_param_decomp_cartesian
  • ppm_param_decomp_cuboid
  • ppm_param_decomp_user_defined
assig

integer, , (IN)

The type of subdomain-to-processor assignment. One of:

  • ppm_param_assign_internal
  • ppm_param_assign_nodal_cut
  • ppm_param_assign_nodal_comm
  • ppm_param_assign_dual_cut
  • ppm_param_assign_dual_comm
  • ppm_param_assign_user_defined
[Note]Note

The latter uses the external library METIS and is only available if ppm was compiled with METIS support.

min_phys

real array, (:), (IN)

Minimum of physical extend of the computational domain (double)

First index is ppm_dim

max_phys

real array, (:), (IN)

Maximum of physical extend of the computational domain (double)

First index is ppm_dim

bcdef

integer array, (:), (IN)

Boundary conditions for the topology

First index is 1-6 (each of the faces)

ighostsize

integer array, (:), (IN)

Size (width) of the ghost layer.

cost

real array, (:), no intent declared

Estimated cost associated with subdomains. Either user-defined on input or decomposition result on output. The cost of a subdomain is given by its volume.

nm

integer array, (:), (IN)

Number of mesh points (not cells) in each direction of the global computational domain (including points ON its boundaries)

info

integer, , (OUT)

Returns status, 0 upon success.

(Optional) ndom

integer, , (IN)

Number of subdomains requested. If not given, the number of subs will be equal to the number of processors. This is only relevent for decomp_cartesian and pencils without particles.

(Optional) pcost

real array, (:), (IN)

Array of length Npart which specifies the computational cost attributed to each particle. If this is absent, a unity cost is assumed for each particle.

(Optional) user_minsub

real array, (:,:), no intent declared

Mimimum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_maxsub

real array, (:,:), no intent declared

Maximum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_nsubs

integer, , no intent declared

Total number of subs on all processors. parameter used when decomp is user defined

(Optional) user_sub2proc

integer array, (:), no intent declared

Subdomain to processor assignment. index: subID (global) parameter used if assignment is user defined.

Used Modules

ppm_module_data, ppm_module_tree, ppm_module_decomp, ppm_module_error, ppm_module_topo_metis_s2p, ppm_module_typedef, ppm_module_define_subs_bc, ppm_module_topo_box2subs, ppm_module_alloc, ppm_module_mesh_store, ppm_module_substop, ppm_module_topo_cost, ppm_module_data_mesh, ppm_module_mesh_alloc, ppm_module_topo_subs2proc, ppm_module_mesh_on_subs, ppm_module_find_neigh, ppm_module_topo_store, ppm_module_substart

Subroutine ppm_topo_mkfield_s

This routine is the topology creation routine for meshes. In the user_defined case, the user must pass existing subdomains and all of user_minsub, user_maxsub, cost, user_nsubs must be provided. The sub boundaries must align with mesh planes. For all other decompositions, particles can be used to guide them. For this, Npart must be > 0. For Npart ⇐ 0, the decomposition is purely mesh-based. Subs are then mapped onto processors and both the topology and the mesh definition is stored.

[Note]Note

In the case of user-defined subs, a lot is currently trusted. We may want to include further checks in that case, e.g. if proper costs are provided, idata and ndata actually make sense, the extents of all subs are integer multiples of the mesh spacing, etc…

Arguments

name type dimension intent optional description

topoid

integer

(INOUT)

ID number identifying the topology.

meshid

integer

(INOUT)

Mesh identifier (user numbering) for default mesh (as defined by

xp

real array

(:,:)

Particle positions. If present, domain decomposition will be

npart

integer

(IN)

Number of particles. ⇐0 if no xp is given to guide the decomposition

decomp

integer

(IN)

The valid decomposition types are:

assig

integer

(IN)

The type of subdomain-to-processor assignment. One of:

min_phys

real array

(:)

(IN)

Minimum of physical extend of the computational domain (double)

max_phys

real array

(:)

(IN)

Maximum of physical extend of the computational domain (double)

bcdef

integer array

(:)

(IN)

Boundary conditions for the topology

ighostsize

integer array

(:)

(IN)

Size (width) of the ghost layer.

cost

real array

(:)

Estimated cost associated with subdomains. Either user-defined on

nm

integer array

(:)

(IN)

Number of mesh points (not cells) in each direction of the global

info

integer

(OUT)

Returns status, 0 upon success.

ndom

integer

(IN)

X

Number of subdomains requested. If not given, the number

pcost

real array

(:)

(IN)

X

Array of length Npart which specifies the computational

user_minsub

real array

(:,:)

X

Mimimum of extension of subs.

user_maxsub

real array

(:,:)

X

Maximum of extension of subs.

user_nsubs

integer

X

Total number of subs on all processors.

user_sub2proc

integer array

(:)

X

Subdomain to processor assignment. index: subID (global)

topoid

integer, , (INOUT)

ID number identifying the topology. If topoid == 0 on input a new topology is created and the new topoid is returned here, else the indicated toplogy is replaced.

[Caution]Caution

SEMANTICS CHANGED: topoid = 0 is not anymore reserved for the ring topology (null decomposition). "Ring topologies" are non geometric and need no setup. The user can perform ppm ring shift operations without having to first define a topology.

meshid

integer, , (INOUT)

Mesh identifier (user numbering) for default mesh (as defined by Nm) on the topology. If <0, ppm will create a number internally and return it here on exit.

xp

real array, (:,:), no intent declared

Particle positions. If present, domain decomposition will be guided by particle locations

npart

integer, , (IN)

Number of particles. ⇐0 if no xp is given to guide the decomposition

decomp

integer, , (IN)

The valid decomposition types are:

  • ppm_param_decomp_bisection
  • ppm_param_decomp_xpencil
  • ppm_param_decomp_ypencil
  • ppm_param_decomp_zpencil
  • ppm_param_decomp_xy_slab
  • ppm_param_decomp_xz_slab
  • ppm_param_decomp_yz_slab
  • ppm_param_decomp_cartesian
  • ppm_param_decomp_cuboid
  • ppm_param_decomp_user_defined
assig

integer, , (IN)

The type of subdomain-to-processor assignment. One of:

  • ppm_param_assign_internal
  • ppm_param_assign_nodal_cut
  • ppm_param_assign_nodal_comm
  • ppm_param_assign_dual_cut
  • ppm_param_assign_dual_comm
  • ppm_param_assign_user_defined
[Note]Note

The latter uses the external library METIS and is only available if ppm was compiled with METIS support.

min_phys

real array, (:), (IN)

Minimum of physical extend of the computational domain (double)

First index is ppm_dim

max_phys

real array, (:), (IN)

Maximum of physical extend of the computational domain (double)

First index is ppm_dim

bcdef

integer array, (:), (IN)

Boundary conditions for the topology

First index is 1-6 (each of the faces)

ighostsize

integer array, (:), (IN)

Size (width) of the ghost layer.

cost

real array, (:), no intent declared

Estimated cost associated with subdomains. Either user-defined on input or decomposition result on output. The cost of a subdomain is given by its volume.

nm

integer array, (:), (IN)

Number of mesh points (not cells) in each direction of the global computational domain (including points ON its boundaries)

info

integer, , (OUT)

Returns status, 0 upon success.

(Optional) ndom

integer, , (IN)

Number of subdomains requested. If not given, the number of subs will be equal to the number of processors. This is only relevent for decomp_cartesian and pencils without particles.

(Optional) pcost

real array, (:), (IN)

Array of length Npart which specifies the computational cost attributed to each particle. If this is absent, a unity cost is assumed for each particle.

(Optional) user_minsub

real array, (:,:), no intent declared

Mimimum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_maxsub

real array, (:,:), no intent declared

Maximum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_nsubs

integer, , no intent declared

Total number of subs on all processors. parameter used when decomp is user defined

(Optional) user_sub2proc

integer array, (:), no intent declared

Subdomain to processor assignment. index: subID (global) parameter used if assignment is user defined.

Used Modules

ppm_module_data, ppm_module_tree, ppm_module_decomp, ppm_module_error, ppm_module_topo_metis_s2p, ppm_module_typedef, ppm_module_define_subs_bc, ppm_module_topo_box2subs, ppm_module_alloc, ppm_module_mesh_store, ppm_module_substop, ppm_module_topo_cost, ppm_module_data_mesh, ppm_module_mesh_alloc, ppm_module_topo_subs2proc, ppm_module_mesh_on_subs, ppm_module_find_neigh, ppm_module_topo_store, ppm_module_substart

Subroutine ppm_topo_mkgeom_d

This routine is the topology creation routine for purely geometry-based decompositions, i.e. without particles and without meshes.

[Note]Note

In the user_defined case, the user must submit existing subdomains and all of min_sub, max_sub, cost and user_nsubs must be provided. Subs are then mapped onto processors and the topology is stored.

Arguments

name type dimension intent optional description

topoid

integer

(INOUT)

ID number identifying the topology.

decomp

integer

(IN)

The valid decomposition types are:

assig

integer

(IN)

The type of subdomain-to-processor assignment. One of:

min_phys

real array

(:)

(IN)

Minimum of physical extend of the computational domain (double)

max_phys

real array

(:)

(IN)

Maximum of physical extend of the computational domain (double)

bcdef

integer array

(:)

(IN)

Boundary conditions for the topology

ghostsize

real

(IN)

The size (width) of the ghost layer.

cost

real array

(:)

Estimated cost associated with subdomains. Either user-defined on

info

integer

(OUT)

Returns status, 0 upon success.

user_minsub

real array

(:,:)

X

Mimimum of extension of subs.

user_maxsub

real array

(:,:)

X

Maximum of extension of subs.

user_nsubs

integer

X

Total number of subs on all processors.

user_sub2proc

integer array

(:)

X

Subdomain to processor assignment.

topoid

integer, , (INOUT)

ID number identifying the topology. If topoid == 0 on input a new topology is created and the new topoid is returned here, else the indicated toplogy is replaced.

[Caution]Caution

SEMANTICS CHANGED: topoid = 0 is not anymore reserved for the ring topology (null decomposition). "Ring topologies" are non geometric and need no setup. The user can perform ppm ring shift operations without having to first define a topology.

decomp

integer, , (IN)

The valid decomposition types are:

  • ppm_param_decomp_bisection
  • ppm_param_decomp_xpencil
  • ppm_param_decomp_ypencil
  • ppm_param_decomp_zpencil
  • ppm_param_decomp_xy_slab
  • ppm_param_decomp_xz_slab
  • ppm_param_decomp_yz_slab
  • ppm_param_decomp_cuboid
  • ppm_param_decomp_user_defined
assig

integer, , (IN)

The type of subdomain-to-processor assignment. One of:

  • ppm_param_assign_internal
  • ppm_param_assign_nodal_cut
  • ppm_param_assign_nodal_comm
  • ppm_param_assign_dual_cut
  • ppm_param_assign_dual_comm
  • ppm_param_assign_user_defined
[Note]Note

The latter uses the external library METIS and is only available if ppm was compiled with METIS support.

min_phys

real array, (:), (IN)

Minimum of physical extend of the computational domain (double)

first index is ppm_dim

max_phys

real array, (:), (IN)

Maximum of physical extend of the computational domain (double)

first index is ppm_dim

bcdef

integer array, (:), (IN)

Boundary conditions for the topology

first index is 1-6 (each of the faces)

ghostsize

real, , (IN)

The size (width) of the ghost layer.

cost

real array, (:), no intent declared

Estimated cost associated with subdomains. Either user-defined on input or decomposition result on output. The cost of a subdomain is given by its volume.

info

integer, , (OUT)

Returns status, 0 upon success.

(Optional) user_minsub

real array, (:,:), no intent declared

Mimimum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_maxsub

real array, (:,:), no intent declared

Maximum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_nsubs

integer, , no intent declared

Total number of subs on all processors. Used when decomp is user defined.

(Optional) user_sub2proc

integer array, (:), no intent declared

Subdomain to processor assignment. Used if assignment is user defined.

index: subID (global)

Used Modules

ppm_module_data, ppm_module_tree, ppm_module_error, ppm_module_topo_metis_s2p, ppm_module_define_subs_bc, ppm_module_topo_box2subs, ppm_module_alloc, ppm_module_find_neigh, ppm_module_substop, ppm_module_topo_cost, ppm_module_topo_subs2proc, ppm_module_topo_store, ppm_module_substart

Subroutine ppm_topo_mkgeom_s

This routine is the topology creation routine for purely geometry-based decompositions, i.e. without particles and without meshes.

[Note]Note

In the user_defined case, the user must submit existing subdomains and all of min_sub, max_sub, cost and user_nsubs must be provided. Subs are then mapped onto processors and the topology is stored.

Arguments

name type dimension intent optional description

topoid

integer

(INOUT)

ID number identifying the topology.

decomp

integer

(IN)

The valid decomposition types are:

assig

integer

(IN)

The type of subdomain-to-processor assignment. One of:

min_phys

real array

(:)

(IN)

Minimum of physical extend of the computational domain (double)

max_phys

real array

(:)

(IN)

Maximum of physical extend of the computational domain (double)

bcdef

integer array

(:)

(IN)

Boundary conditions for the topology

ghostsize

real

(IN)

The size (width) of the ghost layer.

cost

real array

(:)

Estimated cost associated with subdomains. Either user-defined on

info

integer

(OUT)

Returns status, 0 upon success.

user_minsub

real array

(:,:)

X

Mimimum of extension of subs.

user_maxsub

real array

(:,:)

X

Maximum of extension of subs.

user_nsubs

integer

X

Total number of subs on all processors.

user_sub2proc

integer array

(:)

X

Subdomain to processor assignment.

topoid

integer, , (INOUT)

ID number identifying the topology. If topoid == 0 on input a new topology is created and the new topoid is returned here, else the indicated toplogy is replaced.

[Caution]Caution

SEMANTICS CHANGED: topoid = 0 is not anymore reserved for the ring topology (null decomposition). "Ring topologies" are non geometric and need no setup. The user can perform ppm ring shift operations without having to first define a topology.

decomp

integer, , (IN)

The valid decomposition types are:

  • ppm_param_decomp_bisection
  • ppm_param_decomp_xpencil
  • ppm_param_decomp_ypencil
  • ppm_param_decomp_zpencil
  • ppm_param_decomp_xy_slab
  • ppm_param_decomp_xz_slab
  • ppm_param_decomp_yz_slab
  • ppm_param_decomp_cuboid
  • ppm_param_decomp_user_defined
assig

integer, , (IN)

The type of subdomain-to-processor assignment. One of:

  • ppm_param_assign_internal
  • ppm_param_assign_nodal_cut
  • ppm_param_assign_nodal_comm
  • ppm_param_assign_dual_cut
  • ppm_param_assign_dual_comm
  • ppm_param_assign_user_defined
[Note]Note

The latter uses the external library METIS and is only available if ppm was compiled with METIS support.

min_phys

real array, (:), (IN)

Minimum of physical extend of the computational domain (double)

first index is ppm_dim

max_phys

real array, (:), (IN)

Maximum of physical extend of the computational domain (double)

first index is ppm_dim

bcdef

integer array, (:), (IN)

Boundary conditions for the topology

first index is 1-6 (each of the faces)

ghostsize

real, , (IN)

The size (width) of the ghost layer.

cost

real array, (:), no intent declared

Estimated cost associated with subdomains. Either user-defined on input or decomposition result on output. The cost of a subdomain is given by its volume.

info

integer, , (OUT)

Returns status, 0 upon success.

(Optional) user_minsub

real array, (:,:), no intent declared

Mimimum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_maxsub

real array, (:,:), no intent declared

Maximum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_nsubs

integer, , no intent declared

Total number of subs on all processors. Used when decomp is user defined.

(Optional) user_sub2proc

integer array, (:), no intent declared

Subdomain to processor assignment. Used if assignment is user defined.

index: subID (global)

Used Modules

ppm_module_data, ppm_module_tree, ppm_module_error, ppm_module_topo_metis_s2p, ppm_module_define_subs_bc, ppm_module_topo_box2subs, ppm_module_alloc, ppm_module_find_neigh, ppm_module_substop, ppm_module_topo_cost, ppm_module_topo_subs2proc, ppm_module_topo_store, ppm_module_substart

Subroutine ppm_topo_mkpart_d

This routine is the topology creation routine for particles. It performs the decomposition of the physical space based on the position of the particles. The subdomains are mapped onto the processors and a neighbour list is created.

The decomposition is based on the particle positions If user_nsubs is greater than zero, the subdomains described by (min_sub,max_sub) given by the user is used. If user_nsubs is less than one, the subdomains are found using the decomposition defined by the option decomp.

If user_nsubs on input is greater than zero, the assigment of subdomain to the processors is used (as described in sub2proc) or else the assigment of subdomain to the processors will be performed to assign as best as possible an equal number of particles/grid points and at the same time minimizing communication (see Farhat 1988, JCP 28(5), pages: 579 — 602).

If topoid is 0 a new topology is created. Else the topoid is used to locate an existing topology and overwrite it

[Note]Note

In the case of user-defined subs, a lot is currently trusted. We may want to include further checks in that case, e.g. if proper costs are provided.

Arguments

name type dimension intent optional description

topoid

integer

(INOUT)

ID number identifying the topology.

xp

real array

(:,:)

Position of particles

npart

integer

(IN)

Number of particles

decomp

integer

(IN)

The type of decomposition. One of:

assig

integer

(IN)

The type of subdomain-to-processor assignment. One of:

min_phys

real array

(:)

(IN)

Minimum of physical extend of the computational domain

max_phys

real array

(:)

(IN)

Maximum of physical extend of the computational domain

bcdef

integer array

(:)

(IN)

Boundary conditions for the topology

ghostsize

real

(IN)

Size (width) of the ghost layer.

cost

real array

(:)

Estimated cost associated with subdomains. Either user-defined on

info

integer

(OUT)

Returns status, 0 upon success

pcost

real array

(:)

(IN)

X

Array of length Npart which specifies the computational

user_minsub

real array

(:,:)

X

Mimimum of extension of subs.

user_maxsub

real array

(:,:)

X

maximum of extension of subs

user_nsubs

integer

X

Total number of subs on all processors.

user_sub2proc

integer array

(:)

X

subdomain to processor assignment. index: subID (global)

topoid

integer, , (INOUT)

ID number identifying the topology. If topoid == 0 on input a new topology is created and the new topoid is returned here, else the indicated toplogy is replaced.

[Caution]Caution

SEMANTICS CHANGED: topoid = 0 is not anymore reserved for the ring topology (null decomposition). "Ring topologies" are non geometric and need no setup. The user can perform ppm ring shift operations without having to first define a topology.

xp

real array, (:,:), no intent declared

Position of particles

npart

integer, , (IN)

Number of particles

decomp

integer, , (IN)

The type of decomposition. One of:

  • ppm_param_decomp_pruned_cell
  • ppm_param_decomp_tree
  • ppm_param_decomp_bisection
  • ppm_param_decomp_xpencil
  • ppm_param_decomp_ypencil
  • ppm_param_decomp_zpencil
  • ppm_param_decomp_xy_slab
  • ppm_param_decomp_xz_slab
  • ppm_param_decomp_yz_slab
  • ppm_param_decomp_cuboid
  • ppm_param_decomp_user_defined
[Note]Note

There is no more ppm_param_decomp_null. If the user does not want to define a geometric decomposition there is no need for a topology.

assig

integer, , (IN)

The type of subdomain-to-processor assignment. One of:

  • ppm_param_assign_internal
  • ppm_param_assign_nodal_cut
  • ppm_param_assign_nodal_comm
  • ppm_param_assign_dual_cut
  • ppm_param_assign_dual_comm
  • ppm_param_assign_user_defined

nodal and dual assignments use the external library METIS and are only available if ppm was compiled with METIS support.

min_phys

real array, (:), (IN)

Minimum of physical extend of the computational domain

first index is ppm_dim

max_phys

real array, (:), (IN)

Maximum of physical extend of the computational domain

first index is ppm_dim

bcdef

integer array, (:), (IN)

Boundary conditions for the topology

[Note]Note

first index is 1-6 (each of the faces)

ghostsize

real, , (IN)

Size (width) of the ghost layer.

[Tip]Tip

If the particles are moving and you intend to use the ppm neighbor lists, this argument must be equal the particle interaction radius plus the skin parameter

cost

real array, (:), no intent declared

Estimated cost associated with subdomains. Either user-defined on input or decomposition result on output.

info

integer, , (OUT)

Returns status, 0 upon success

(Optional) pcost

real array, (:), (IN)

Array of length Npart which specifies the computational cost attributed to each particle. If this is absent, a unity cost is assumed for each particle.

(Optional) user_minsub

real array, (:,:), no intent declared

Mimimum of extension of subs. Used when decomp is user defined

1st index: x,y,(z) 2nd: subID

(Optional) user_maxsub

real array, (:,:), no intent declared

maximum of extension of subs Used when decomp is user defined

1st index: x,y,(z) 2nd: subID

(Optional) user_nsubs

integer, , no intent declared

Total number of subs on all processors. Used when decomp is user defined

(Optional) user_sub2proc

integer array, (:), no intent declared

subdomain to processor assignment. index: subID (global) Used when assign is user defined

Used Modules

ppm_module_data, ppm_module_tree, ppm_module_decomp, ppm_module_error, ppm_module_topo_metis_s2p, ppm_module_define_subs_bc, ppm_module_topo_box2subs, ppm_module_alloc, ppm_module_find_neigh, ppm_module_substop, ppm_module_topo_cost, ppm_module_topo_subs2proc, ppm_module_topo_store, ppm_module_substart

Subroutine ppm_topo_mkpart_s

This routine is the topology creation routine for particles. It performs the decomposition of the physical space based on the position of the particles. The subdomains are mapped onto the processors and a neighbour list is created.

The decomposition is based on the particle positions If user_nsubs is greater than zero, the subdomains described by (min_sub,max_sub) given by the user is used. If user_nsubs is less than one, the subdomains are found using the decomposition defined by the option decomp.

If user_nsubs on input is greater than zero, the assigment of subdomain to the processors is used (as described in sub2proc) or else the assigment of subdomain to the processors will be performed to assign as best as possible an equal number of particles/grid points and at the same time minimizing communication (see Farhat 1988, JCP 28(5), pages: 579 — 602).

If topoid is 0 a new topology is created. Else the topoid is used to locate an existing topology and overwrite it

[Note]Note

In the case of user-defined subs, a lot is currently trusted. We may want to include further checks in that case, e.g. if proper costs are provided.

Arguments

name type dimension intent optional description

topoid

integer

(INOUT)

ID number identifying the topology.

xp

real array

(:,:)

Position of particles

npart

integer

(IN)

Number of particles

decomp

integer

(IN)

The type of decomposition. One of:

assig

integer

(IN)

The type of subdomain-to-processor assignment. One of:

min_phys

real array

(:)

(IN)

Minimum of physical extend of the computational domain

max_phys

real array

(:)

(IN)

Maximum of physical extend of the computational domain

bcdef

integer array

(:)

(IN)

Boundary conditions for the topology

ghostsize

real

(IN)

Size (width) of the ghost layer.

cost

real array

(:)

Estimated cost associated with subdomains. Either user-defined on

info

integer

(OUT)

Returns status, 0 upon success

pcost

real array

(:)

(IN)

X

Array of length Npart which specifies the computational

user_minsub

real array

(:,:)

X

Mimimum of extension of subs.

user_maxsub

real array

(:,:)

X

maximum of extension of subs

user_nsubs

integer

X

Total number of subs on all processors.

user_sub2proc

integer array

(:)

X

subdomain to processor assignment. index: subID (global)

topoid

integer, , (INOUT)

ID number identifying the topology. If topoid == 0 on input a new topology is created and the new topoid is returned here, else the indicated toplogy is replaced.

[Caution]Caution

SEMANTICS CHANGED: topoid = 0 is not anymore reserved for the ring topology (null decomposition). "Ring topologies" are non geometric and need no setup. The user can perform ppm ring shift operations without having to first define a topology.

xp

real array, (:,:), no intent declared

Position of particles

npart

integer, , (IN)

Number of particles

decomp

integer, , (IN)

The type of decomposition. One of:

  • ppm_param_decomp_pruned_cell
  • ppm_param_decomp_tree
  • ppm_param_decomp_bisection
  • ppm_param_decomp_xpencil
  • ppm_param_decomp_ypencil
  • ppm_param_decomp_zpencil
  • ppm_param_decomp_xy_slab
  • ppm_param_decomp_xz_slab
  • ppm_param_decomp_yz_slab
  • ppm_param_decomp_cuboid
  • ppm_param_decomp_user_defined
[Note]Note

There is no more ppm_param_decomp_null. If the user does not want to define a geometric decomposition there is no need for a topology.

assig

integer, , (IN)

The type of subdomain-to-processor assignment. One of:

  • ppm_param_assign_internal
  • ppm_param_assign_nodal_cut
  • ppm_param_assign_nodal_comm
  • ppm_param_assign_dual_cut
  • ppm_param_assign_dual_comm
  • ppm_param_assign_user_defined

nodal and dual assignments use the external library METIS and are only available if ppm was compiled with METIS support.

min_phys

real array, (:), (IN)

Minimum of physical extend of the computational domain

first index is ppm_dim

max_phys

real array, (:), (IN)

Maximum of physical extend of the computational domain

first index is ppm_dim

bcdef

integer array, (:), (IN)

Boundary conditions for the topology

[Note]Note

first index is 1-6 (each of the faces)

ghostsize

real, , (IN)

Size (width) of the ghost layer.

[Tip]Tip

If the particles are moving and you intend to use the ppm neighbor lists, this argument must be equal the particle interaction radius plus the skin parameter

cost

real array, (:), no intent declared

Estimated cost associated with subdomains. Either user-defined on input or decomposition result on output.

info

integer, , (OUT)

Returns status, 0 upon success

(Optional) pcost

real array, (:), (IN)

Array of length Npart which specifies the computational cost attributed to each particle. If this is absent, a unity cost is assumed for each particle.

(Optional) user_minsub

real array, (:,:), no intent declared

Mimimum of extension of subs. Used when decomp is user defined

1st index: x,y,(z) 2nd: subID

(Optional) user_maxsub

real array, (:,:), no intent declared

maximum of extension of subs Used when decomp is user defined

1st index: x,y,(z) 2nd: subID

(Optional) user_nsubs

integer, , no intent declared

Total number of subs on all processors. Used when decomp is user defined

(Optional) user_sub2proc

integer array, (:), no intent declared

subdomain to processor assignment. index: subID (global) Used when assign is user defined

Used Modules

ppm_module_data, ppm_module_tree, ppm_module_decomp, ppm_module_error, ppm_module_topo_metis_s2p, ppm_module_define_subs_bc, ppm_module_topo_box2subs, ppm_module_alloc, ppm_module_find_neigh, ppm_module_substop, ppm_module_topo_cost, ppm_module_topo_subs2proc, ppm_module_topo_store, ppm_module_substart

Subroutine ppm_topo_mktree_d

This routine creates a topology based on ppm_tree. The user can directly specify the arguments for ppm_tree, rather than choosing from a set of predefined ppm_param_decomp_*. Please see documentation of ppm_tree for description of the arguments.

[Warning]Warning

This is for advanced users only.

Arguments

name type dimension intent optional description

topoid

integer

(INOUT)

ID number identifying the topology.

meshid

integer

(INOUT)

Mesh identifier (user numbering) for default mesh (as defined by

xp

real array

(:,:)

Particle positions. If present, domain decomposition will be

npart

integer

(IN)

Number of particles. Set to something .LE.0 if there are no

assig

integer

(IN)

The type of subdomain-to-processor assignment. One of:

min_phys

real array

(:)

(IN)

Minimum of physical extend of the computational domain (double)

max_phys

real array

(:)

(IN)

Maximum of physical extend of the computational domain (double)

bcdef

integer array

(:)

(IN)

Boundary conditions for the topology

cost

real array

(:)

Estimated cost associated with subdomains. Either user-defined on

minboxsize

real

(IN)

The min size of the boxes

pruneboxes

logical

(IN)

Whether to keep empty boxes or not?

weights

real array

(3,2)

(IN)

Weights for particles, mesh points and geometry. weights(:,1)

fixed

logical array

(:)

(IN)

Flags to prevent cuts in certain directions. (see ppm_tree)

maxvariance

real

(IN)

Maximum allowed variance of costs between subs

maxboxcost

real

(IN)

Maximum cost of a box. Subdivision will continue (if possible)

istart

integer array

(:,:)

Start indices (i,j[,k]) (first index) of sub mesh isub (second

ndata

integer array

(:,:)

Number of grid points in x,y[,z] (first index) of sub mesh isub

nm

integer array

(:)

(IN)

Number of mesh points (not cells) in each direction of the global

storemesh

logical

(IN)

If TRUE store the mesh definition internally. If FALSE,

treetype

integer

(IN)

One of:

info

integer

(OUT)

Returns status, 0 upon success.

pcost

real array

(:)

(IN)

X

Array of length Npart which specifies the computational

user_minsub

real array

(:,:)

X

Mimimum of extension of subs. OPTIONAL parameter used if

user_maxsub

real array

(:,:)

X

maximum of extension of subs.

user_nsubs

integer

X

Total number of subs on all processors.

user_sub2proc

integer array

(:)

X

Subdomain to processor assignment.

topoid

integer, , (INOUT)

ID number identifying the topology. If topoid == 0 on input a new topology is created and the new topoid is returned here, else the indicated toplogy is replaced.

[Caution]Caution

SEMANTICS CHANGED: topoid = 0 is not anymore reserved for the ring topology (null decomposition). "Ring topologies" are non geometric and need no setup. The user can perform ppm ring shift operations without having to first define a topology.

meshid

integer, , (INOUT)

Mesh identifier (user numbering) for default mesh (as defined by Nm) on the topology. If <0, ppm will create a number internally and return it here on exit.

xp

real array, (:,:), no intent declared

Particle positions. If present, domain decomposition will be guided by particle locations

npart

integer, , (IN)

Number of particles. Set to something .LE.0 if there are no particles.

assig

integer, , (IN)

The type of subdomain-to-processor assignment. One of:

  • ppm_param_assign_internal
  • ppm_param_assign_nodal_cut
  • ppm_param_assign_nodal_comm
  • ppm_param_assign_dual_cut
  • ppm_param_assign_dual_comm
  • ppm_param_assign_user_defined
[Note]Note

The latter uses the external library METIS and is only available if ppm was compiled with METIS support.

min_phys

real array, (:), (IN)

Minimum of physical extend of the computational domain (double)

first index is ppm_dim

max_phys

real array, (:), (IN)

Maximum of physical extend of the computational domain (double)

first index is ppm_dim

bcdef

integer array, (:), (IN)

Boundary conditions for the topology

first index is 1-6 (each of the faces)

cost

real array, (:), no intent declared

Estimated cost associated with subdomains. Either user-defined on input or decomposition result on output. The cost of a subdomain is given by its volume.

minboxsize

real, , (IN)

The min size of the boxes

pruneboxes

logical, , (IN)

Whether to keep empty boxes or not?

weights

real array, (3,2), (IN)

Weights for particles, mesh points and geometry. weights(:,1) defines the box costs (where to refine), weights(:,2) defines where to cut a box.

fixed

logical array, (:), (IN)

Flags to prevent cuts in certain directions. (see ppm_tree)

maxvariance

real, , (IN)

Maximum allowed variance of costs between subs

maxboxcost

real, , (IN)

Maximum cost of a box. Subdivision will continue (if possible) if cost of any box is larger than this. Set to ⇐ 0 to disable this criterion.

istart

integer array, (:,:), no intent declared

Start indices (i,j[,k]) (first index) of sub mesh isub (second index) in global mesh.

ndata

integer array, (:,:), no intent declared

Number of grid points in x,y[,z] (first index) of sub mesh isub (second index). Includes the points ON the sub boundaries.

nm

integer array, (:), (IN)

Number of mesh points (not cells) in each direction of the global computational domain (including points ON its boundaries)

storemesh

logical, , (IN)

If TRUE store the mesh definition internally. If FALSE, the mesh serves only as a guide for the decomposition and is not stored as a ppm compute mesh.

treetype

integer, , (IN)

One of:

*ppm_param_tree_bin *ppm_param_tree_quad *ppm_param_tree_oct (3D only)

info

integer, , (OUT)

Returns status, 0 upon success.

(Optional) pcost

real array, (:), (IN)

Array of length Npart which specifies the computational cost attributed to each particle. If this is absent, a unity cost is assumed for each particle.

(Optional) user_minsub

real array, (:,:), no intent declared

Mimimum of extension of subs. OPTIONAL parameter used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_maxsub

real array, (:,:), no intent declared

maximum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_nsubs

integer, , no intent declared

Total number of subs on all processors. Used when decomp is user defined

(Optional) user_sub2proc

integer array, (:), no intent declared

Subdomain to processor assignment. Used if assignment is user defined.

index: subID (global)

Used Modules

ppm_module_data, ppm_module_tree, ppm_module_error, ppm_module_topo_metis_s2p, ppm_module_define_subs_bc, ppm_module_topo_box2subs, ppm_module_alloc, ppm_module_mesh_store, ppm_module_substop, ppm_module_topo_cost, ppm_module_data_mesh, ppm_module_mesh_alloc, ppm_module_topo_subs2proc, ppm_module_mesh_on_subs, ppm_module_find_neigh, ppm_module_topo_store, ppm_module_substart

Subroutine ppm_topo_mktree_s

This routine creates a topology based on ppm_tree. The user can directly specify the arguments for ppm_tree, rather than choosing from a set of predefined ppm_param_decomp_*. Please see documentation of ppm_tree for description of the arguments.

[Warning]Warning

This is for advanced users only.

Arguments

name type dimension intent optional description

topoid

integer

(INOUT)

ID number identifying the topology.

meshid

integer

(INOUT)

Mesh identifier (user numbering) for default mesh (as defined by

xp

real array

(:,:)

Particle positions. If present, domain decomposition will be

npart

integer

(IN)

Number of particles. Set to something .LE.0 if there are no

assig

integer

(IN)

The type of subdomain-to-processor assignment. One of:

min_phys

real array

(:)

(IN)

Minimum of physical extend of the computational domain (double)

max_phys

real array

(:)

(IN)

Maximum of physical extend of the computational domain (double)

bcdef

integer array

(:)

(IN)

Boundary conditions for the topology

cost

real array

(:)

Estimated cost associated with subdomains. Either user-defined on

minboxsize

real

(IN)

The min size of the boxes

pruneboxes

logical

(IN)

Whether to keep empty boxes or not?

weights

real array

(3,2)

(IN)

Weights for particles, mesh points and geometry. weights(:,1)

fixed

logical array

(:)

(IN)

Flags to prevent cuts in certain directions. (see ppm_tree)

maxvariance

real

(IN)

Maximum allowed variance of costs between subs

maxboxcost

real

(IN)

Maximum cost of a box. Subdivision will continue (if possible)

istart

integer array

(:,:)

Start indices (i,j[,k]) (first index) of sub mesh isub (second

ndata

integer array

(:,:)

Number of grid points in x,y[,z] (first index) of sub mesh isub

nm

integer array

(:)

(IN)

Number of mesh points (not cells) in each direction of the global

storemesh

logical

(IN)

If TRUE store the mesh definition internally. If FALSE,

treetype

integer

(IN)

One of:

info

integer

(OUT)

Returns status, 0 upon success.

pcost

real array

(:)

(IN)

X

Array of length Npart which specifies the computational

user_minsub

real array

(:,:)

X

Mimimum of extension of subs. OPTIONAL parameter used if

user_maxsub

real array

(:,:)

X

maximum of extension of subs.

user_nsubs

integer

X

Total number of subs on all processors.

user_sub2proc

integer array

(:)

X

Subdomain to processor assignment.

topoid

integer, , (INOUT)

ID number identifying the topology. If topoid == 0 on input a new topology is created and the new topoid is returned here, else the indicated toplogy is replaced.

[Caution]Caution

SEMANTICS CHANGED: topoid = 0 is not anymore reserved for the ring topology (null decomposition). "Ring topologies" are non geometric and need no setup. The user can perform ppm ring shift operations without having to first define a topology.

meshid

integer, , (INOUT)

Mesh identifier (user numbering) for default mesh (as defined by Nm) on the topology. If <0, ppm will create a number internally and return it here on exit.

xp

real array, (:,:), no intent declared

Particle positions. If present, domain decomposition will be guided by particle locations

npart

integer, , (IN)

Number of particles. Set to something .LE.0 if there are no particles.

assig

integer, , (IN)

The type of subdomain-to-processor assignment. One of:

  • ppm_param_assign_internal
  • ppm_param_assign_nodal_cut
  • ppm_param_assign_nodal_comm
  • ppm_param_assign_dual_cut
  • ppm_param_assign_dual_comm
  • ppm_param_assign_user_defined
[Note]Note

The latter uses the external library METIS and is only available if ppm was compiled with METIS support.

min_phys

real array, (:), (IN)

Minimum of physical extend of the computational domain (double)

first index is ppm_dim

max_phys

real array, (:), (IN)

Maximum of physical extend of the computational domain (double)

first index is ppm_dim

bcdef

integer array, (:), (IN)

Boundary conditions for the topology

first index is 1-6 (each of the faces)

cost

real array, (:), no intent declared

Estimated cost associated with subdomains. Either user-defined on input or decomposition result on output. The cost of a subdomain is given by its volume.

minboxsize

real, , (IN)

The min size of the boxes

pruneboxes

logical, , (IN)

Whether to keep empty boxes or not?

weights

real array, (3,2), (IN)

Weights for particles, mesh points and geometry. weights(:,1) defines the box costs (where to refine), weights(:,2) defines where to cut a box.

fixed

logical array, (:), (IN)

Flags to prevent cuts in certain directions. (see ppm_tree)

maxvariance

real, , (IN)

Maximum allowed variance of costs between subs

maxboxcost

real, , (IN)

Maximum cost of a box. Subdivision will continue (if possible) if cost of any box is larger than this. Set to ⇐ 0 to disable this criterion.

istart

integer array, (:,:), no intent declared

Start indices (i,j[,k]) (first index) of sub mesh isub (second index) in global mesh.

ndata

integer array, (:,:), no intent declared

Number of grid points in x,y[,z] (first index) of sub mesh isub (second index). Includes the points ON the sub boundaries.

nm

integer array, (:), (IN)

Number of mesh points (not cells) in each direction of the global computational domain (including points ON its boundaries)

storemesh

logical, , (IN)

If TRUE store the mesh definition internally. If FALSE, the mesh serves only as a guide for the decomposition and is not stored as a ppm compute mesh.

treetype

integer, , (IN)

One of:

*ppm_param_tree_bin *ppm_param_tree_quad *ppm_param_tree_oct (3D only)

info

integer, , (OUT)

Returns status, 0 upon success.

(Optional) pcost

real array, (:), (IN)

Array of length Npart which specifies the computational cost attributed to each particle. If this is absent, a unity cost is assumed for each particle.

(Optional) user_minsub

real array, (:,:), no intent declared

Mimimum of extension of subs. OPTIONAL parameter used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_maxsub

real array, (:,:), no intent declared

maximum of extension of subs. Used if decomp is user defined.

1st index: x,y,(z) 2nd: subID

(Optional) user_nsubs

integer, , no intent declared

Total number of subs on all processors. Used when decomp is user defined

(Optional) user_sub2proc

integer array, (:), no intent declared

Subdomain to processor assignment. Used if assignment is user defined.

index: subID (global)

Used Modules

ppm_module_data, ppm_module_tree, ppm_module_error, ppm_module_topo_metis_s2p, ppm_module_define_subs_bc, ppm_module_topo_box2subs, ppm_module_alloc, ppm_module_mesh_store, ppm_module_substop, ppm_module_topo_cost, ppm_module_data_mesh, ppm_module_mesh_alloc, ppm_module_topo_subs2proc, ppm_module_mesh_on_subs, ppm_module_find_neigh, ppm_module_topo_store, ppm_module_substart

Defined Module Variables

name type dimension description

no variables

Used Modules

has no uses