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


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:

When given, multipole moments are computed with respect to this center instead of a plain integral.
The maximum angular momentum to consider when computing multipole moments
The type of multipole moments: 1=``cartesian``, 2=``pure``, 3=``radial``, 4=``surface``.
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)

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