GradientHAWPpsi

About the GradientHAWPpsi class

The WaveBlocks Project

@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 R. Bourquin @license: Modified BSD License

Inheritance diagram

Inheritance diagram of GradientHAWPpsi

Class documentation

class WaveBlocksND.GradientHAWPpsi[source]

This class implements the computation of the action of the gradient operator -i \varepsilon^2 \nabla_x applied to a new-kind Hagedorn wavepacket \Psi.

apply_gradient(wavepacket, *, component=None, as_packet=True)

Compute the effect of the gradient operator -i \varepsilon^2 \nabla_x on the basis functions \phi(x) of a component \Phi_i of the Hagedorn wavepacket \Psi.

Parameters:
  • wavepacket (A HagedornWavepacketBase subclass instance.) – The wavepacket \Psi containing \Phi_i.
  • component (Integer or None.) – The index i of the component \Phi_i.
  • as_packet (Boolean, default is True.) – Whether to return a full packet.
Returns:

A list of length N or a single pair of extended basis shapes \mathfrak{\dot{K}}_i and new coefficients c^\prime_i. If requested, copies of the original wavepacket are returned with these new values set. There are D packets, one for each space variable component \partial_{x_d} of the gradient.

apply_gradient_component(wavepacket, component)[source]

Compute the effect of the gradient operator -i \varepsilon^2 \nabla_x on the basis functions \psi(x) of a component \Phi_i of the new-kind Hagedorn wavepacket \Psi.

Parameters:
  • wavepacket (A HagedornWavepacketBase subclass instance.) – The wavepacket \Psi containing \Phi_i.
  • component (Integer.) – The index i of the component \Phi_i.
Returns:

Extended basis shape \mathfrak{\dot{K}} and new coefficients c^\prime for component \Phi_i. The coefficients are stored column-wise with one column per dimension d. The c^\prime array is of shape |\mathfrak{\dot{K}}| \times D.