3.5.9. horton.grid.utils – Auxiliaries for numerical integrals

horton.grid.utils.parse_args_integrate(*args, **kwargs)

Parse the arguments given to the integrate method

Arguments:

data1, data2, ...
All arguments must be arrays with the same size as the number of grid points. The arrays contain the functions, evaluated at the grid points, that must be multiplied and integrated.

Optional arguments:

center=None
When given, multipole moments are computed with respect to this center instead of a plain integral.
lmax=0
The maximum angular momentum to consider when computing multipole moments
mtype=1
The type of multipole moments: 1=``cartesian``, 2=``pure``, 3=``radial``, 4=``surface``.
segments=None
This argument can be used to divide the grid in segments. When given, it must be an array with the number of grid points in each consecutive segment. The integration is then carried out over each segment separately and an array of results is returned. The sum over all elements gives back the total integral.

Returns: (args, multipole_args)

args
The list of non-keyword arguments, all converted to a flat array.
multipole_args
If the center argument is not given, this second return value not None. Otherwise, it is a tuple of three elements: center, lmax, mtype.
segments
The segments argument