1#ifndef PRDC_CUDA_WAVE_LIST_H
2#define PRDC_CUDA_WAVE_LIST_H
11#include <prdc/cuda/RField.h>
12#include <prdc/crystal/UnitCell.h>
14#include <pscf/mesh/Mesh.h>
15#include <pscf/math/IntVec.h>
16#include <pscf/cuda/DeviceArray.h>
17#include <pscf/cuda/HostDArray.h>
19#include <util/containers/DArray.h>
176 {
return isAllocated_; }
182 {
return hasMinImages_; }
200 {
return isRealField_; }
266 bool hasMinImages_h_;
285 {
return *unitCellPtr_; }
289 {
return *meshPtr_; }
314 return dKSqSlices_[i];
323 return implicitInverse_;
326 #ifndef PRDC_CUDA_WAVE_LIST_TPP
328 extern template class WaveList<1>;
329 extern template class WaveList<2>;
330 extern template class WaveList<3>;
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 double precision values on an FFT mesh.
DArray< RField< D > > const & dKSq() const
Get all derivatives of kSq with respect to unit cell parameters.
bool isAllocated() const
Has memory been allocated for arrays?
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.
DeviceArray< int > const & minImages_d() const
Get the array of minimum images on the device by reference.
void computeMinimumImages()
Compute minimum images of wavevectors.
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
Does this WaveList correspond to real-valued fields?
RField< D > const & kSq() const
Get the kSq array on the device 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.
#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.