1#ifndef PRDC_CUDA_WAVE_LIST_H
2#define PRDC_CUDA_WAVE_LIST_H
11#include <prdc/cuda/RField.h>
12#include <pscf/cuda/DeviceArray.h>
13#include <pscf/cuda/HostDArray.h>
14#include <pscf/math/IntVec.h>
15#include <util/containers/DArray.h>
16#include <util/containers/GArray.h>
17#include <util/containers/Pair.h>
21 template <
int D>
class Mesh;
267 {
return kMeshDimensions_; }
296 {
return isAllocated_; }
302 {
return hasMinImages_; }
320 {
return isSorted_; }
326 {
return isRealField_; }
465 bool hasMinImages_h_;
489 {
return *unitCellPtr_; }
493 {
return *meshPtr_; }
498 template <
int D>
inline
506 template <
int D>
inline
514 template <
int D>
inline
518 return dKSqSlices_[i];
522 template <
int D>
inline
527 return implicitInverse_;
540 template <
int D>
inline
544 return sortedBunches_;
548 template <
int D>
inline
Dynamic array on the GPU device with aligned data.
Template for dynamic array stored in host CPU memory.
An IntVec<D, T> is a D-component vector of elements of integer type T.
Description of a regular grid of points in a periodic domain.
Field of real values on a regular mesh, allocated on a GPU device.
Class to compute and store properties associated with wavevectors.
bool isAllocated() const
Has memory been allocated for arrays?
void sortWaves()
Sort waves in order of ascending wavevector norm.
bool hasdKSq() const
Has the dKSq array been computed?
void clearUnitCellData()
Clear all internal data that depends on lattice parameters.
void computedKSq()
Compute derivatives of |k|^2 w/ respect to unit cell parameters.
WaveList(bool isRealField=true)
Constructor.
DArray< int > const & sortedIds() const
Get the sortedIds array by reference.
DeviceArray< int > const & minImages_d() const
Get the array of minimum images on the device by reference.
void computeMinimumImages()
Compute minimum images of wavevectors, and also calculate kSq.
void allocate(Mesh< D > const &m, UnitCell< D > const &c)
Allocate memory and set association with a Mesh and UnitCell object.
void computeKSq()
Compute square norm |k|^2 for all wavevectors.
bool isRealField() const
Is this WaveList set up for use with real-valued fields?
GArray< Pair< int > > const & sortedBunches() const
Get the sortedBunches array by reference.
int kSize() const
Return the number of points in the k-space mesh.
int nBunch() const
Return the number of bunches of sorted waves.
bool isSorted() const
Have the waves been sorted by magnitude ?
RField< D > const & kSq() const
Get the kSq array on the device by reference.
IntVec< D > const & kMeshDimensions() const
Return the dimensions of the k-space mesh.
DArray< int > const & bunchIds() const
Get the bunchIds array by reference.
HostDArray< IntVec< D > > const & minImages_h() const
Get minimum images as IntVec<D> objects on the host.
RField< D > const & dKSq(int i) const
Get derivatives of |k|^2 with respect to lattice parameter i.
bool hasMinImages() const
Have minimum images been computed?
bool hasKSq() const
Has the kSq array been computed?
DeviceArray< bool > const & implicitInverse() const
Get the implicitInverse array by reference.
Base template for UnitCell<D> classes, D=1, 2 or 3.
Dynamically allocatable contiguous array template.
An automatically growable array, analogous to a std::vector.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA).
Periodic fields and crystallography.
PSCF package top-level namespace.