3 #include "../types.hpp" 4 #include "../wavepackets/hawp_commons.hpp" 5 #include "../wavepackets/hawp_gradient_operator.hpp" 6 #include "../wavepackets/hawp_gradient_evaluator.hpp" 7 #include "../innerproducts/homogeneous_inner_product.hpp" 11 namespace observables {
31 template<
class Potential,
int D,
class MultiIndex,
class TQR>
34 HomogeneousInnerProduct<D, MultiIndex, TQR> ip;
35 return ip.quadrature(packet,
40 const dim_t n_nodes = nodes.cols();
42 for(
int i = 0; i < n_nodes; ++i) {
59 template<
int D,
class MultiIndex>
61 HaWpGradientOperator<D,MultiIndex> nabla;
62 HaWpGradient<D,MultiIndex> gradwp = nabla(packet);
64 for (
size_t i = 0 ; i < gradwp.n_components(); ++i) {
65 result += gradwp.component(i).coefficients().dot(gradwp.component(i).coefficients());
67 return 0.5 * result.real();
70 template<
int D,
class MultiIndex>
74 result += packet.coefficients().dot(packet.coefficients());
75 return std::sqrt(result.real());
Definition: coefficients_file_parser.cpp:10
real_t norm(const ScalarHaWp< D, MultiIndex > &packet)
Definition: energy.hpp:71
Eigen::Matrix< real_t, R, C > RMatrix
Definition: types.hpp:22
real_t kinetic_energy(const ScalarHaWp< D, MultiIndex > &packet)
Computes kinetic energy of a Hagedorn Wavepacket.
Definition: energy.hpp:60
std::complex< real_t > complex_t
Definition: types.hpp:15
double real_t
Definition: types.hpp:14
Class providing homogeneous inner product calculation of scalar wavepackets.
Definition: homogeneous_inner_product.hpp:30
This class represents the gradient of a (scalar) Hagedorn wavepacket .
Definition: hawp_gradient_operator.hpp:29
Concrete implementation of a scalar Hagedorn wavepacket.
Definition: hawp_commons.hpp:209
Eigen::Matrix< complex_t, R, C > CMatrix
Definition: types.hpp:19
real_t potential_energy(const ScalarHaWp< D, MultiIndex > &packet, const Potential &V)
Computes potential energy of a Hagedorn Wavepacket.
Definition: energy.hpp:32
Definition: squeeze.hpp:7
int dim_t
Definition: types.hpp:16
This class applies the gradient operator to an arbitrary scalar wavepacket .
Definition: hawp_gradient_operator.hpp:286