mpacts.commands.onparticles. parentmean

In order to be able to use this module import it like this:

import mpacts.commands.onparticles.parentmean
#or assign it to a shorter name
import mpacts.commands.onparticles.parentmean as par
mpacts.commands.onparticles.parentmean.parent_mean(sim, child, array_name='x', array_type='Point', weights_name=None)

Calculate the mean of an array of a ‘child’ particle container and store it in its parent. Will add and return a commandlist containing at least three commands to calculate this mean.

Parameters:

-sim simulation object or commandlist
-child particle container who is a child of some other pc.
-array_name name of array to average (default: ‘x’)
-array_type type of array to average; be sure to adjust this, if array_name is changed! (default: ‘Point’)
-weights_name name of weights array, must be of scalar type (default: None)