pystella/fourier/projectors.py
def decompose_vector(self, queue, vector, plus, minus, lng,
                         *, times_abs_k=False):
        """
        Decomposes a vector field into its two transverse polarizations and
        longitudinal component.

        :arg queue: A :class:`pyopencl.CommandQueue`.

        :arg vector: The array whose polarization
            components will be computed.
            Must have shape ``(3,)+k_shape``, where ``k_shape`` is the shape of a
            single momentum-space field array.

        :arg plus: The array into which will be stored the
            momentum-space field of the plus polarization.

        :arg minus: The array into which will be stored the
            momentum-space field of the minus polarization.

        :arg lng: The array into which will be stored the
            momentum-space field of the longitudinal mode.

        :returns: The :class:`pyopencl.Event` associated with the kernel invocation.

        .. versionadded:: 2020.2
        """

        if not times_abs_k:
            evt, _ = self.vec_decomp_knl(
                queue, **self.eff_mom, lng=lng, vector=vector,
                plus=plus, minus=minus
            )
        else:
            evt, _ = self.vec_decomp_knl_times_abs_k(
                queue, **self.eff_mom, lng=lng, vector=vector,
                plus=plus, minus=minus
            )

        return evt

        Decomposes a vector field into its two transverse polarizations and
        longitudinal component.

        :arg queue: A :class:`pyopencl.CommandQueue`.

        :arg vector: The array whose polarization
            components will be computed.
            Must have shape ``(3,)+k_shape``, where ``k_shape`` is the shape of a
            single momentum-space field array.

        :arg plus: The array into which will be stored the
            momentum-space field of the plus polarization.

        :arg minus: The array into which will be stored the
            momentum-space field of the minus polarization.

        :arg lng: The array into which will be stored the
            momentum-space field of the longitudinal mode.

        :returns: The :class:`pyopencl.Event` associated with the kernel invocation.

        .. versionadded:: 2020.2
        
Decomposes a vector field into its two transverse polarizations and
longitudinal component.
Decomposes a vector field into its two transverse polarizations and longitudinal component .
def decompose_vector(self, queue, vector, plus, minus, lng,
                         *, times_abs_k=False):
        if not times_abs_k:
            evt, _ = self.vec_decomp_knl(
                queue, **self.eff_mom, lng=lng, vector=vector,
                plus=plus, minus=minus
            )
        else:
            evt, _ = self.vec_decomp_knl_times_abs_k(
                queue, **self.eff_mom, lng=lng, vector=vector,
                plus=plus, minus=minus
            )
        return evt
def decompose_vector ( self , queue , vector , plus , minus , lng , * , times_abs_k = False ) : if not times_abs_k : evt , _ = self . vec_decomp_knl ( queue , ** self . eff_mom , lng = lng , vector = vector , plus = plus , minus = minus ) else : evt , _ = self . vec_decomp_knl_times_abs_k ( queue , ** self . eff_mom , lng = lng , vector = vector , plus = plus , minus = minus ) return evt
Decomposes a vector field into its two transverse polarizations and
longitudinal component.
Decomposes a vector field into its two transverse polarizations and longitudinal component .
"""
        Decomposes a vector field into its two transverse polarizations and
        longitudinal component.

        :arg queue: A :class:`pyopencl.CommandQueue`.

        :arg vector: The array whose polarization
            components will be computed.
            Must have shape ``(3,)+k_shape``, where ``k_shape`` is the shape of a
            single momentum-space field array.

        :arg plus: The array into which will be stored the
            momentum-space field of the plus polarization.

        :arg minus: The array into which will be stored the
            momentum-space field of the minus polarization.

        :arg lng: The array into which will be stored the
            momentum-space field of the longitudinal mode.

        :returns: The :class:`pyopencl.Event` associated with the kernel invocation.

        .. versionadded:: 2020.2
        """
The :class:`pyopencl.Event` associated with the kernel invocation.
The : class : ` pyopencl . Event ` associated with the kernel invocation .
self
queue
None
vector
The array whose polarization
components will be computed.
Must have shape ``(3,)+k_shape``, where ``k_shape`` is the shape of a
single momentum-space field array.
The array whose polarization components will be computed . Must have shape ` ` ( 3 ) + k_shape ` ` where ` ` k_shape ` ` is the shape of a single momentum - space field array .
plus
The array into which will be stored the
momentum-space field of the plus polarization.
The array into which will be stored the momentum - space field of the plus polarization .
minus
The array into which will be stored the
momentum-space field of the minus polarization.
The array into which will be stored the momentum - space field of the minus polarization .
lng
The array into which will be stored the
momentum-space field of the longitudinal mode.
The array into which will be stored the momentum - space field of the longitudinal mode .
times_abs_k