3 #include "../types.hpp" 11 namespace wavepackets {
28 template<dim_t D,
class MultiIndex>
218 std::vector< complex_t const* > coeffs_list(
n_components());
224 return scalarwp.template create_evaluator<N>(grid).vector_reduce(coeffs_list.data(),
n_components());
285 template<dim_t D,
class MultiIndex>
317 std::array<Coefficients, std::size_t(D) > coeffs_result = evaluator.
apply(wp.
coefficients());
320 gradwp[
c].coefficients() = std::move(coeffs_result[
c]);
Coefficients & coefficients()
Grants writeable access to the coefficients of the wavepacket.
Definition: hawp_gradient_operator.hpp:66
std::size_t n_components() const
Returns the number of components.
Definition: hawp_gradient_operator.hpp:187
Definition: coefficients_file_parser.cpp:10
HaWpParamSet< D > const & parameters() const override
Grants read-only access to the Hagedorn parameter set of the wavepacket.
Definition: hawp_gradient_operator.hpp:52
Component(HaWpGradient const *const owner)
Definition: hawp_gradient_operator.hpp:43
real_t eps_
Definition: hawp_gradient_operator.hpp:252
virtual HaWpParamSet< D > const & parameters() const =0
Grants read-only access to the Hagedorn parameter set of the wavepacket.
Component const & operator[](std::size_t n) const
Grants read-only access to the -th component .
Definition: hawp_gradient_operator.hpp:179
Component & component(std::size_t n)
Grants writeable access to the -th component .
Definition: hawp_gradient_operator.hpp:143
Eigen::Matrix< real_t, R, C > RMatrix
Definition: types.hpp:22
Eigen::Matrix< complex_t, Eigen::Dynamic, 1 > Coefficients
Definition: types.hpp:33
std::shared_ptr< ShapeEnum< D, MultiIndex > > ShapeEnumSharedPtr
Definition: shape_extension_cache.hpp:14
var c
Definition: jquery.js:23
double real_t
Definition: types.hpp:14
Coefficients coefficients_
Definition: hawp_gradient_operator.hpp:83
HaWpParamSet< D > const & parameters() const override
Grants read-only access to the Hagedorn parameter set of the wavepacket.
Definition: hawp_gradient_operator.hpp:113
shapes::ShapeEnumSharedPtr< D, MultiIndex > shape() const override
Retrieves the basis shape of the wavepacket.
Definition: hawp_gradient_operator.hpp:57
virtual real_t eps() const =0
Retrieves the semi-classical scaling parameter of the wavepacket.
shapes::ShapeEnumSharedPtr< D, MultiIndex > extended_shape() const
Computes the extension of the stored basis shape .
Definition: hawp_commons.hpp:104
std::array< Coefficients, std::size_t(D) > apply(const Coefficients &base_coeffs) const
Computes the coefficients of the gradient wavepacket.
Definition: hawp_gradient_evaluator.hpp:52
HaWpParamSet< D > & parameters()
Grants writeable access to the Hagedorn parameter set of the wavepacket.
Definition: hawp_gradient_operator.hpp:108
This class represents the gradient of a (scalar) Hagedorn wavepacket .
Definition: hawp_gradient_operator.hpp:29
real_t & eps()
Grants writeable access to the semi-classical scaling parameter of the wavepacket.
Definition: hawp_gradient_operator.hpp:94
This class represents the Hagedorn parameter set .
Definition: hawp_paramset.hpp:24
Abstract superclass that represents a set of basis function to a scalar Hagedorn wavepacket.
Definition: hawp_commons.hpp:25
HaWpParamSet< D > & parameters()
Grants writeable access to the Hagedorn parameter set of the wavepacket.
Definition: hawp_commons.hpp:230
real_t & eps()
Grants writeable access to the semi-classical scaling parameter of the wavepacket.
Definition: hawp_commons.hpp:216
CArray< 1, N > evaluate(CMatrix< D, N > const &grid) const
Evaluates this wavepacket at complex grid nodes .
Definition: hawp_commons.hpp:155
Component & operator[](std::size_t n)
Grants writeable access to the -th component .
Definition: hawp_gradient_operator.hpp:167
This class is component of a Hagedorn wavepacket gradient.
Definition: hawp_gradient_operator.hpp:40
shapes::ShapeEnumSharedPtr< D, MultiIndex > shape() const override
Retrieves the basis shape of the wavepacket.
Definition: hawp_gradient_operator.hpp:131
HaWpParamSet< D > parameters_
Definition: hawp_gradient_operator.hpp:253
real_t eps() const override
Retrieves the semi-classical scaling parameter of the wavepacket.
Definition: hawp_gradient_operator.hpp:47
shapes::ShapeEnumSharedPtr< D, MultiIndex > & shape()
Grants access to the basis shape of the wavepacket.
Definition: hawp_commons.hpp:248
virtual shapes::ShapeEnumSharedPtr< D, MultiIndex > shape() const =0
Retrieves the basis shape of the wavepacket.
Abstract superclass that represents a scalar (1-component) hagedorn wavepacket.
Definition: hawp_commons.hpp:129
HaWpGradient()
Definition: hawp_gradient_operator.hpp:86
Concrete implementation of a scalar Hagedorn wavepacket.
Definition: hawp_commons.hpp:209
Eigen::Matrix< complex_t, R, C > CMatrix
Definition: types.hpp:19
Coefficients const & coefficients() const
Grants read-only access to the coefficients of the wavepacket.
Definition: hawp_gradient_operator.hpp:75
shapes::ShapeEnumSharedPtr< D, MultiIndex > & shape()
Grants access to the basis shape of the wavepacket.
Definition: hawp_gradient_operator.hpp:126
HaWpGradient const *const owner_
Definition: hawp_gradient_operator.hpp:81
Component const & component(std::size_t n) const
Grants read-only access to the -th component .
Definition: hawp_gradient_operator.hpp:155
HaWpGradient< D, MultiIndex > operator()(AbstractScalarHaWp< D, MultiIndex > const &wp) const
Applies the gradient operator to an arbitrary scalar wavepacket .
Definition: hawp_gradient_operator.hpp:309
int dim_t
Definition: types.hpp:16
virtual Coefficients const & coefficients() const =0
Grants read-only access to the coefficients for all of this wavepacket.
This class applies the gradient operator to an arbitrary scalar wavepacket .
Definition: hawp_gradient_operator.hpp:286
std::vector< Component > components_
Definition: hawp_gradient_operator.hpp:255
real_t eps() const override
Retrieves the semi-classical scaling parameter of the wavepacket.
Definition: hawp_gradient_operator.hpp:99
shapes::ShapeEnumSharedPtr< D, MultiIndex > shape_
Definition: hawp_gradient_operator.hpp:254
Eigen::Array< complex_t, R, C > CArray
Definition: types.hpp:25
CArray< Eigen::Dynamic, N > evaluate(RMatrix< D, N > const &rgrid) const
Evaluates the value of all components at once.
Definition: hawp_gradient_operator.hpp:245
CArray< Eigen::Dynamic, N > evaluate(CMatrix< D, N > const &grid) const
Evaluate the value of all components at once.
Definition: hawp_gradient_operator.hpp:210
This class constructs the coefficients of the Hagedorn gradient wavepacket applied to an arbitrary s...
Definition: hawp_gradient_evaluator.hpp:22