1#ifndef PSCF_WAVE_LIST_CP_H
2#define PSCF_WAVE_LIST_CP_H
11#include <pscf/backend/cpp/CPT.h>
12#include <pscf/field/cpp/RField.h>
13#include <pscf/math/IntVec.h>
14#include <util/containers/DArray.h>
15#include <util/containers/GArray.h>
16#include <util/containers/Pair.h>
22 template <
int D>
class Mesh;
273 {
return kMeshDimensions_; }
301 {
return isAllocated_; }
307 {
return hasMinImages_; }
325 {
return isSorted_; }
331 {
return isRealField_; }
445 {
return *unitCellPtr_; }
448 Mesh<D>
const & mesh()
const
449 {
return *meshPtr_; }
454 template <
int D>
inline
462 template <
int D>
inline
470 template <
int D>
inline
478 template <
int D>
inline
486 template <
int D>
inline
491 return implicitInverse_;
495 template <
int D>
inline
503 template <
int D>
inline
507 return sortedBunches_;
511 template <
int D>
inline
Backend identifier class for the C++ serial CPU backend.
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.
Base template for UnitCell<D> classes, D=1, 2 or 3.
bool isSorted() const
Have the waves been sorted by magnitude ?
bool hasKSq() const
Are values of kSq up-to-date ?
void clearUnitCellData()
Clear all internal data that depends on lattice parameters.
IntVec< D > const & kMeshDimensions() const
Return the dimensions of the k-grid mesh.
DArray< bool > const & implicitInverse() const
Get the implicitInverse array by reference.
int nBunch() const
Return the number of bunches of sorted waves.
DArray< int > const & sortedIds() const
Get the sortedIds array by reference.
void allocate(Mesh< D > const &m, UnitCell< D > const &c)
Allocate memory and set association with a Mesh and UnitCell object.
bool hasMinImages() const
Are minimum images up to date ?
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.
void sortWaves()
Sort waves in order of ascending wavevector norm.
DArray< int > const & bunchIds() const
Get the bunchIds array by reference.
void computeMinimumImages()
Compute minimum images of wavevectors, and also calculates kSq.
RField< D, CPT > const & dKSq(int i) const
Get derivatives of kSq with respect to unit cell parameter i.
WaveList(bool isRealField=true)
Constructor.
void computedKSq()
Compute derivatives of |k|^2 w/ respect to unit cell parameters.
RField< D, CPT > const & kSq() const
Get the kSq array on the device by const reference.
bool isAllocated() const
Has memory been allocated for arrays?
DArray< IntVec< D > > const & minImages() const
Get the array of minimum image vectors by const reference.
void computeKSq()
Compute square norm |k|^2 for all wavevectors.
bool hasdKSq() const
Are values of dKSq up-to-date?
int kSize() const
Return the number of points in the k-grid mesh.
Dynamically allocatable contiguous array template.
An automatically growable array, analogous to a std::vector.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.