Clipper
|
FFTmap_sparse_p1_xh: low level sparse P1 map used for calculating FFTs. More...
#include <fftmap_sparse.h>
Public Member Functions | |
FFTmap_sparse_p1_xh () | |
Null constuctor. | |
FFTmap_sparse_p1_xh (const Grid_sampling &grid_sam, const FFTtype type=Default) | |
Constructor: takes grid. | |
void | init (const Grid_sampling &grid_sam, const FFTtype type=Default) |
initialiser: takes grid | |
const Grid_sampling & | grid_real () const |
get real grid sampling | |
const Grid & | grid_reci () const |
get reciprocal grid | |
ffttype & | real_data (const Coord_grid &uvw) |
set real space data ( uvw must be in grid_real() ) | |
void | require_hkl (const HKL &hkl) |
express need for reciprocal space data by hkl | |
const std::complex< ffttype > | get_hkl (const HKL &hkl) const |
get reciprocal space data by hkl | |
void | require_cplx_data (const Coord_grid &hkl) |
express need for reciprocal space data (internal use) | |
const std::complex< ffttype > & | cplx_data (const Coord_grid &hkl) const |
get reciprocal space data (internal use) | |
void | fft_x_to_h (const ftype &scale) |
Transform to real space. |
FFTmap_sparse_p1_xh: low level sparse P1 map used for calculating FFTs.
This version computes sparse real...Hermititan FFTs.
By specifying what parts of the map are needed in advance, it is possible to perform highly optimised FFTs, including some of the benefits of symmetry.
clipper::FFTmap_sparse_p1_xh::FFTmap_sparse_p1_xh | ( | ) |
Null constuctor.
For later initialisation: see init()
clipper::FFTmap_sparse_p1_xh::FFTmap_sparse_p1_xh | ( | const Grid_sampling & | grid_sam, |
const FFTtype | type = Default |
||
) |
Constructor: takes grid.
Construct an FFTmap_sparse_p1_xh for a given grid.
grid_sam | The grid sampling of the unit cell. |
type | Can be FFTmap_sparse_base::Measure, ::Estimate. Measure performs slow precalculation (first time only) to get faster FFT. |
References init().
void clipper::FFTmap_sparse_p1_xh::init | ( | const Grid_sampling & | grid_sam, |
const FFTtype | type = Default |
||
) |
initialiser: takes grid
Initialise an FFTmap_sparse_p1_base for a grid.
grid_sam | The grid sampling of the unit cell. |
type | Can be FFTmap_sparse_base::Measure, ::Estimate. Measure performs slow precalculation (first time only) to get faster FFT. |
Reimplemented from clipper::FFTmap_sparse_p1_base.
Referenced by FFTmap_sparse_p1_xh().
ffttype & clipper::FFTmap_sparse_p1_xh::real_data | ( | const Coord_grid & | uvw | ) | [inline] |
set real space data ( uvw must be in grid_real() )
( uvw must be in grid_real() )
References clipper::FFTmap_sparse_p1_base::map_uv(), clipper::Coord_grid::u(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().
Referenced by clipper::Xmap< T >::fft_to().
void clipper::FFTmap_sparse_p1_xh::require_hkl | ( | const HKL & | hkl | ) |
express need for reciprocal space data by hkl
Friedel opposites are handled correctly
hkl | The HKL required. |
References clipper::FFTmap_sparse_p1_base::grid_real_, clipper::FFTmap_sparse_p1_base::grid_reci_, clipper::FFTmap_sparse_p1_base::map_kl(), clipper::Grid_sampling::nv(), clipper::Grid_sampling::nw(), clipper::Grid::nw(), clipper::Coord_grid::unit(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().
Referenced by clipper::Xmap< T >::fft_to().
const std::complex< ffttype > clipper::FFTmap_sparse_p1_xh::get_hkl | ( | const HKL & | hkl | ) | const |
get reciprocal space data by hkl
Friedel opposites are handled correctly
hkl | The required. |
References clipper::FFTmap_sparse_p1_base::grid_real_, clipper::FFTmap_sparse_p1_base::grid_reci_, clipper::Grid_sampling::nu(), clipper::Grid_sampling::nv(), clipper::Grid_sampling::nw(), clipper::Grid::nw(), clipper::FFTmap_sparse_p1_base::row_kl, clipper::Coord_grid::u(), clipper::Coord_grid::unit(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().
Referenced by clipper::Xmap< T >::fft_to().
void clipper::FFTmap_sparse_p1_xh::require_cplx_data | ( | const Coord_grid & | hkl | ) | [inline] |
express need for reciprocal space data (internal use)
The given Coord_grid will be required in the final reflections. ( uvw must be in grid_reci() )
uvw | The coordinate to require. |
References clipper::FFTmap_sparse_p1_base::map_kl(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().
const std::complex< ffttype > & clipper::FFTmap_sparse_p1_xh::cplx_data | ( | const Coord_grid & | hkl | ) | const [inline] |
get reciprocal space data (internal use)
( hkl must be in grid_reci(), and have been requested )
uvw | The coordinate to get. |
References clipper::FFTmap_sparse_p1_base::row_kl, clipper::Coord_grid::u(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().
void clipper::FFTmap_sparse_p1_xh::fft_x_to_h | ( | const ftype & | scale | ) |
Transform to real space.
The 'require' functions must have been called first to mark the required data in the target space. (Source space requirements are inferred automatically).
References clipper::FFTmap_sparse_p1_base::grid_real_, clipper::FFTmap_sparse_p1_base::grid_reci_, clipper::Mutex::lock(), clipper::Util::max(), clipper::FFTmap_base::mutex, clipper::Grid_sampling::nu(), clipper::Grid::nv(), clipper::Grid_sampling::nv(), clipper::Grid::nw(), clipper::Grid_sampling::nw(), clipper::FFTmap_sparse_p1_base::row_kl, clipper::FFTmap_sparse_p1_base::row_uv, clipper::Grid_sampling::size(), clipper::FFTmap_sparse_p1_base::type_, and clipper::Mutex::unlock().
Referenced by clipper::Xmap< T >::fft_to().