dnami_mpi

This section gives an overview over the different MPI (Message Passing Interface) funtions of the dnami library.

The dnami MPI functions

The dnami mpi module provides functions for MPI communication.

class src.src_py.dnami_mpi.type_mpi(tree)

The type_mpi object contains functions for swapping halo data among different MPI processes.

Parameters

tree – The dnami tree data structure

swap(f, nh, tree)

Convenience function to swap all directions including the corners in a single call. A call to this function is equal to calling swapXc, swapYc and swapZc (in this order) separately.

Parameters
  • f – The input and output vector for the halo data swap

  • nh – The width of the halo data regions

  • tree – The dnami tree data structure

swapX(f, nh, tree)

Swaps array “f(X,0:nv)” (a function of position vector X e.g. X=(x,y,z)) in the x-direction over all its “nv” variables with halo size “nh”. This function does not swap the corners.

Parameters
  • f – The input and output vector for the halo data swap

  • nh – The width of the halo data regions

  • tree – The dnami tree data structure

swapXc(f, nh, tree)

Swaps array “f(X,0:nv)” (a function of position vector X e.g. X=(x,y,z)) in the x-direction over all its “nv” variables with halo size “nh”. This function will also swap corners.

Parameters
  • f – The input and output vector for the halo data swap

  • nh – The width of the halo data regions

  • tree – The dnami tree data structure

swapY(f, nh, tree)

Swaps array “f(X,0:nv)” (a function of position vector X e.g. X=(x,y,z)) in the y-direction over all its “nv” variables with halo size “nh”. This function does not swap the corners.

Parameters
  • f – The input and output vector for the halo data swap

  • nh – The width of the halo data regions

  • tree – The dnami tree data structure

swapYc(f, nh, tree)

Swaps array “f(X,0:nv)” (a function of position vector X e.g. X=(x,y,z)) in the y-direction over all its “nv” variables with halo size “nh”. This function will also swap corners.

Parameters
  • f – The input and output vector for the halo data swap

  • nh – The width of the halo data regions

  • tree – The dnami tree data structure

swapZ(f, nh, tree)

Swaps array “f(X,0:nv)” (a function of position vector X e.g. X=(x,y,z)) in the z-direction over all its “nv” variables with halo size “nh”. This function does not swap the corners.

Parameters
  • f – The input and output vector for the halo data swap

  • nh – The width of the halo data regions

  • tree – The dnami tree data structure

swapZc(f, nh, tree)

Swaps array “f(X,0:nv)” (a function of position vector X e.g. X=(x,y,z)) in the z-direction over all its “nv” variables with halo size “nh”. This function will also swap corners.

Parameters
  • f – The input and output vector for the halo data swap

  • nh – The width of the halo data regions

  • tree – The dnami tree data structure