ObservablesHAWP¶
About the ObservablesHAWP
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 ObservablesHAWP](../_images/inheritance-ac7a0ce84a5fda3a42130bed1310466e4bfd6492.png)
Class documentation¶
-
class
WaveBlocksND.
ObservablesHAWP
[source]¶ This class implements observable computation for Hagedorn wavepackets
.
-
kinetic_energy
(wavepacket, *, component=None, summed=False)[source]¶ Compute the kinetic energy
of the different components
of the wavepacket
.
Parameters: - wavepacket (A
HagedornWavepacketBase
subclass instance.) – The wavepacketof which we compute the kinetic energy.
- component (Integer or
None
.) – The indexof the component
whose kinetic energy we want to compute. If set to
None
the computation is performed for allcomponents.
- summed (Boolean, default is
False
.) – Whether to sum up the kinetic energiesof the individual components
.
Returns: A list with the kinetic energies of the individual components or the overall kinetic energy of the wavepacket. (Depending on the optional arguments.)
- wavepacket (A
-
norm
(wavepacket, *, component=None, summed=False)[source]¶ Calculate the
norm
of the wavepacket
.
Note
This method is just a shortcut and calls the
HagedornWavepacketBase.norm()
method of the given wavepacket.Parameters: - wavepacket (A
HagedornWavepacketBase
subclass instance.) – The wavepacketof which we compute the norm.
- component (int or
None
.) – The indexof the component
whose norm is calculated. The default value is
None
which means to compute the norms of allcomponents.
- summed (Boolean, default is
False
.) – Whether to sum up the normsof the individual components
.
Returns: The norm of
or the norm of
or a list with the
norms of all components. Depending on the values of
component
andsummed
.- wavepacket (A
-
potential_energy
(wavepacket, potential, *, component=None, summed=False)[source]¶ Compute the potential energy
of the different components
of the wavepacket
.
Parameters: - wavepacket (A
HagedornWavepacketBase
subclass instance.) – The wavepacketof which we compute the potential energy.
- potential – The potential
. (Actually, not the potential object itself but one of its
V.evaluate_*
methods.) - component (Integer or
None
.) – The indexof the component
whose potential energy we want to compute. If set to
None
the computation is performed for allcomponents.
- summed (Boolean, default is
False
.) – Whether to sum up the potential energiesof the individual components
.
Returns: A list with the potential energies of the individual components or the overall potential energy of the wavepacket. (Depending on the optional arguments.)
- wavepacket (A
-
set_gradient
(gradient)[source]¶ Set the gradient.
Parameters: gradient (A Gradient
subclass instance.) – A gradient operator. The gradient is only used for the computation of the kinetic energy.
-
set_innerproduct
(innerproduct)[source]¶ Set the innerproduct.
Parameters: innerproduct (A InnerProduct
subclass instance.) – An innerproduct for computing the integrals. The inner product is only used for the computation of the potential energybut not for the kinetic energy.
-