ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
spherical_bessel_transformer.h
Go to the documentation of this file.
1#ifndef SPHERICAL_BESSEL_TRANSFORMER_H_
2#define SPHERICAL_BESSEL_TRANSFORMER_H_
3
4#include <memory>
5#include <fftw3.h>
6
7namespace ModuleBase
8{
9
69{
70public:
71 SphericalBesselTransformer(const bool cache_enabled = false);
73
76
79
116 void radrfft(
117 const int l,
118 const int ngrid,
119 const double cutoff,
120 const double* const in,
121 double* const out,
122 const int p = 0
123 ) const;
124
125
154 void direct(
155 const int l,
156 const int ngrid_in,
157 const double* const grid_in,
158 const double* const in,
159 const int ngrid_out,
160 const double* const grid_out,
161 double* const out,
162 const int p = 0
163 ) const;
164
165
167 size_t heap_usage() const;
168
170 void clear();
171
173 bool operator==(const SphericalBesselTransformer& rhs) const { return impl_ == rhs.impl_; }
174
175
176private:
177
178 class Impl; // forward declaration
179 std::shared_ptr<Impl> impl_;
180};
181
182} // namespace ModuleBase
183
184#endif
A class that provides spherical Bessel transforms.
Definition spherical_bessel_transformer.h:69
SphericalBesselTransformer(SphericalBesselTransformer &&)=default
void radrfft(const int l, const int ngrid, const double cutoff, const double *const in, double *const out, const int p=0) const
Spherical Bessel transform via fast Fourier transforms.
Definition spherical_bessel_transformer.cpp:440
bool operator==(const SphericalBesselTransformer &rhs) const
check if two objects share the same underlying implementation object
Definition spherical_bessel_transformer.h:173
SphericalBesselTransformer & operator=(const SphericalBesselTransformer &)=default
SphericalBesselTransformer(SphericalBesselTransformer const &)=default
size_t heap_usage() const
total heap usage (in bytes) from the FFTW buffer and tabulated jl
Definition spherical_bessel_transformer.cpp:468
void clear()
clear the FFTW plan & buffer as well as the tabulated jl
Definition spherical_bessel_transformer.cpp:474
void direct(const int l, const int ngrid_in, const double *const grid_in, const double *const in, const int ngrid_out, const double *const grid_out, double *const out, const int p=0) const
Spherical Bessel transform via numerical integration with Simpson's rule.
Definition spherical_bessel_transformer.cpp:453
SphericalBesselTransformer & operator=(SphericalBesselTransformer &&)=default
std::shared_ptr< Impl > impl_
Definition spherical_bessel_transformer.h:179
Definition array_pool.h:6