ppmd.data.global_array module

class ppmd.data.global_array.GlobalArray(size=1, dtype=<class 'ctypes.c_double'>, comm=<mpi4py.MPI.Intracomm object>, op=<mpi4py.MPI.Op object>, shared_memory=False, ncomp=None)

Bases: object

Class for global data. This class may be: globally set, incremented and read. This class is constructed with a MPI reduction operator, currently only MPI.SUM is avaialbe, which defines the addition operator. Global setting sets all values in the array to the same value across all ranks. All calls must be made on all ranks in parent communicator.

property ncomp
class ppmd.data.global_array.GlobalArrayClassic(size=1, dtype=<class 'ctypes.c_double'>, comm=<mpi4py.MPI.Intracomm object>, op=<mpi4py.MPI.Op object>)

Bases: ppmd.host._Array

Class for global data. This class may be: globally set, incremented and read. This class is constructed with a MPI reduction operator, currently only MPI.SUM is avaialbe, which defines the addition operator. Global setting sets all values in the array to the same value across all ranks. All calls must be made on all ranks in parent communicator.

property ctype
ctypes_data_access(mode=Read only., pair=False, threaded=False)
ctypes_data_post(mode=None, threaded=False)
property ctypes_data_read
property ctypes_data_write
identity_element

Identity element for operation

property ncomp
op

MPI Reduction operation

set(val)
size

Number of elements in the array.

class ppmd.data.global_array.GlobalArrayShared(size=1, dtype=<class 'ctypes.c_double'>, comm=<mpi4py.MPI.Intracomm object>, op=<mpi4py.MPI.Op object>)

Bases: ppmd.data.global_array.GlobalArrayClassic