|
template<typename T > |
void | memcpy (ManagedMemory< T > &, const ManagedMemory< T > &) |
| copy entire object over
|
|
void | scale (double alpha, ManagedMemory< double > &y) |
|
void | scale (double alpha, ManagedMemory< complex > &y) |
| scale y *= alpha
|
|
void | scale (complex alpha, ManagedMemory< complex > &y) |
| scale y *= alpha
|
|
void | scale (const ManagedMemory< complex > &x, ManagedMemory< complex > &y) |
| scale y *= alpha
|
|
void | axpy (complex alpha, const ManagedMemory< complex > &x, ManagedMemory< complex > &y) |
| scale y *= x elementwise More...
|
|
double | nrm2 (const ManagedMemory< complex > &) |
| 2-norm, pretending it is a vector
|
|
complex | dotc (const ManagedMemory< complex > &a, const ManagedMemory< complex > &b) |
| return a^H b
|
|
matrix | conj (const scaled< matrix > &A) |
| return element-wise complex conjugate of A
|
|
matrixScaledTransOp | dagger (const matrixScaledTransOp &A) |
| return hermitian adjoint of A
|
|
matrixScaledTransOp | transpose (const matrixScaledTransOp &A) |
| return transpose of A
|
|
matrix | dagger_symmetrize (const matrixScaledTransOp &A) |
|
matrix | transpose_symmetrize (const matrixScaledTransOp &A) |
| return adjoint symmetric part: (A + Adag)/2
|
|
double | nrm2 (const matrixScaledTransOp &A) |
| return transpose symmetric part: (A + AT)/2 More...
|
|
matrix & | operator*= (matrix &m, double s) |
|
scaled< matrix > | operator* (double s, const matrix &m) |
|
scaled< matrix > | operator* (const matrix &m, double s) |
|
scaled< matrix > | operator- (const matrix &m) |
|
matrix & | operator*= (matrix &m, complex s) |
|
matrix | operator* (complex s, const matrix &m) |
|
matrix | operator* (const matrix &m, complex s) |
|
diagMatrix | operator* (double s, const diagMatrix &m) |
|
diagMatrix | operator* (const diagMatrix &m, double s) |
|
diagMatrix | operator- (const diagMatrix &m) |
|
matrix | operator* (const matrixScaledTransOp &, const matrixScaledTransOp &) |
|
matrix | operator* (const diagMatrix &, const matrix &) |
|
matrix | operator* (const matrix &, const diagMatrix &) |
|
matrix | operator* (const std::vector< complex > &d, const matrix &m) |
|
matrix | operator* (const matrix &m, const std::vector< complex > &d) |
|
diagMatrix | operator* (const diagMatrix &, const diagMatrix &) |
|
matrix & | operator+= (matrix &m1, const matrix &m2) |
|
matrix & | operator-= (matrix &m1, const matrix &m2) |
|
matrix | operator+ (const matrix &m1, const matrix &m2) |
|
matrix | operator- (const matrix &m1, const matrix &m2) |
|
void | axpy (double alpha, const diagMatrix &x, matrix &y) |
|
matrix & | operator+= (matrix &m, const diagMatrix &d) |
|
matrix & | operator-= (matrix &m, const diagMatrix &d) |
|
matrix | operator+ (const matrix &m, const diagMatrix &d) |
|
matrix | operator+ (const diagMatrix &d, const matrix &m) |
|
matrix | operator- (const matrix &m, const diagMatrix &d) |
|
matrix | operator- (const diagMatrix &d, const matrix &m) |
|
void | axpy (double alpha, const diagMatrix &x, diagMatrix &y) |
|
diagMatrix & | operator+= (diagMatrix &d1, const diagMatrix &d2) |
|
diagMatrix & | operator-= (diagMatrix &d1, const diagMatrix &d2) |
|
diagMatrix | operator+ (const diagMatrix &d1, const diagMatrix &d2) |
|
diagMatrix | operator- (const diagMatrix &d1, const diagMatrix &d2) |
|
diagMatrix | clone (const diagMatrix &x) |
|
matrix | clone (const matrix &x) |
|
double | dot (const diagMatrix &x, const diagMatrix &y) |
|
double | dot (const matrix &x, const matrix &y) |
|
void | randomize (diagMatrix &x) |
|
void | randomize (matrix &x) |
|
diagMatrix | diagDot (const matrix &X, const matrix &Y) |
| Compute diag(dagger(X)*Y) efficiently (avoid the off-diagonals)
|
|
matrix | inv (const matrix &A) |
| Compute / apply inverse: More...
|
|
diagMatrix | inv (const diagMatrix &A) |
| inverse of diagonal matrix
|
|
matrix | invTriangular (const matrix &T, bool upper) |
| return inv(T) for triangular matrix T (upper/lower for upper=true/false)
|
|
matrix | invApply (const matrix &A, const matrix &b) |
| return inv(A) * b (A must be hermitian, positive-definite)
|
|
matrix | LU (const matrix &A) |
| Compute the LU decomposition of the matrix.
|
|
matrix | cholesky (const matrix &A, bool upper) |
|
complex | det (const matrix &A) |
|
double | det (const diagMatrix &A) |
| Compute the determinant of an diagonal matrix A.
|
|
matrix | pow (const matrix &A, double exponent, matrix *Aevecs=0, diagMatrix *Aeigs=0, bool *isSingular=0) |
|
matrix | invsqrt (const matrix &A, matrix *Aevecs=0, diagMatrix *Aeigs=0, bool *isSingular=0) |
|
matrix | orthoMatrix (const matrix &A) |
|
matrix | cis (const matrix &A, matrix *Aevecs=0, diagMatrix *Aeigs=0) |
| Compute cis(A) = exp(iota A) and optionally the eigensystem of A (if non-null)
|
|
matrix | cisInv (const matrix &A, matrix *Bevecs=0, diagMatrix *Beigs=0) |
|
matrix | sqrt_grad (const matrix &grad_sqrtA, const matrix &Aevecs, const diagMatrix &Aeigs) |
| Return gradient w.r.t A given gradient w.r.t sqrt(A) and A's eigensystem.
|
|
matrix | cis_grad (const matrix &grad_cisA, const matrix &Aevecs, const diagMatrix &Aeigs) |
| Return gradient w.r.t A given gradient w.r.t cis(A) and A's eigensystem.
|
|
complex | trace (const matrix &m) |
| trace of matrix
|
|
double | trace (const diagMatrix &m) |
| trace of diagonal matrix
|
|
double | nrm2 (const diagMatrix &m) |
| RMS of matrix entries.
|
|
diagMatrix | diag (const matrix &m) |
| obtain the real diagonal part of a hermitian matrix
|
|
diagMatrix | eye (int N) |
| identity
|
|
matrix | zeroes (int nRows, int nCols) |
| a dense-matrix of zeroes
|
|
matrix | operator* (const matrix &m, const tiledBlockMatrix &tbm) |
| multiply dense matrix by block matrix
|
|
template<typename scalar > |
__hostanddev__ matrix3< scalar > | operator* (scalar s, const matrix3< scalar > &m) |
|
template<typename scalar > |
__hostanddev__ matrix3< scalar > | outer (const vector3< scalar > &a, const vector3< scalar > &b) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const matrix3< scalar > &m, const vector3< scalar > &v) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const matrix3< scalar > &m, const vector3< int > &v) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const matrix3< int > &m, const vector3< scalar > &v) |
|
__hostanddev__ vector3< int > | operator* (const matrix3< int > &m, const vector3< int > &v) |
|
__hostanddev__ vector3< complex > | operator* (const matrix3< complex > &m, const vector3<> &v) |
|
__hostanddev__ vector3< complex > | operator* (const matrix3<> &m, const vector3< complex > &v) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const vector3< scalar > &v, const matrix3< scalar > &m) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const vector3< int > &v, const matrix3< scalar > &m) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const vector3< scalar > &v, const matrix3< int > &m) |
|
__hostanddev__ vector3< int > | operator* (const vector3< int > &v, const matrix3< int > &m) |
|
__hostanddev__ vector3< complex > | operator* (const vector3<> &v, const matrix3< complex > &m) |
|
__hostanddev__ vector3< complex > | operator* (const vector3< complex > &v, const matrix3<> &m) |
|
template<typename scalar > |
__hostanddev__ matrix3< scalar > | operator* (const matrix3< scalar > &m, const matrix3< scalar > &n) |
|
template<typename scalar > |
__hostanddev__ matrix3< scalar > | operator* (const matrix3< scalar > &m, const matrix3< int > &n) |
|
template<typename scalar > |
__hostanddev__ matrix3< scalar > | operator* (const matrix3< int > &m, const matrix3< scalar > &n) |
|
__hostanddev__ matrix3< int > | operator* (const matrix3< int > &m, const matrix3< int > &n) |
|
template<typename scalar > |
__hostanddev__ matrix3< scalar > & | operator*= (matrix3< scalar > &m, const matrix3< scalar > &n) |
|
template<typename scalar > |
__hostanddev__ matrix3< scalar > | Diag (vector3< scalar > v) |
|
template<typename scalar > |
__hostanddev__ scalar | trace (const matrix3< scalar > &m) |
| Trace of matrix.
|
|
template<typename scalar > |
__hostanddev__ scalar | det (const matrix3< scalar > &m) |
| Determinant of matrix.
|
|
template<typename scalar > |
__hostanddev__ matrix3< scalar > | adjugate (const matrix3< scalar > &m) |
|
__hostanddev__ matrix3 | inv (const matrix3<> &m) |
|
template<typename scalar > |
__hostanddev__ scalar | nrm2sq (const matrix3< scalar > &m) |
| square of 2-norm of matrix
|
|
template<typename scalar > |
__hostanddev__ double | nrm2 (const matrix3< scalar > &m) |
| 2-norm of matrix
|
|
__hostanddev__ matrix3 | rotation (double theta, int axis) |
| Create a rotation matrix.
|
|
template<typename scalar > |
__hostanddev__ symmetricMatrix3< scalar > | operator* (scalar s, symmetricMatrix3< scalar > m) |
| Scale.
|
|
template<typename scalar > |
__hostanddev__ symmetricMatrix3< scalar > | outer (const vector3< scalar > &v) |
| Symmetric outer product of vector.
|
|
template<class T > |
T | ceildiv (T num, T den) |
| Ceiling of a positive integer division, templated over int types.
|
|
template<class T > |
T | floorMultiple (T num, T den) |
| Return largest multiple of den smaller than num, templated over int types.
|
|
__hostanddev__ double | real (const complex &c) |
| real part
|
|
__hostanddev__ double | imag (const complex &c) |
| imaginary part
|
|
__hostanddev__ double | norm (const complex &c) |
| absolute value squared
|
|
__hostanddev__ double | abs (const complex &c) |
| absolute value
|
|
__hostanddev__ double | arg (const complex &c) |
| argument (phase angle)
|
|
__hostanddev__ complex | conj (const complex &c) |
| complex conjugate
|
|
__hostanddev__ double | conj (const double &c) |
| identity operation provided to ease templating over complex and double
|
|
__hostanddev__ complex | operator+ (double r, const complex &c) |
|
__hostanddev__ complex | operator- (double r, const complex &c) |
|
__hostanddev__ complex | operator* (double r, const complex &c) |
|
__hostanddev__ complex | cis (double x) |
| Compute cis(x) = exp(iota x) = cos(x) + iota sin(x)
|
|
template<typename T > |
std::vector< typename T::DataType * > | dataPref (TptrCollection &x) |
| Extract a std::vector of data pointers from a ScalarFieldArray.
|
|
template<typename T > |
std::vector< const typename T::DataType * > | constDataPref (const TptrCollection &x) |
| Extract a std::vector of const data pointers from a const ScalarFieldArray.
|
|
template<typename T > |
TptrCollection | clone (const TptrCollection &x) |
| Create a copy of the data (note operator= references same data since Tptr's are pointers!)
|
|
template<typename T > |
TptrCollection & | operator*= (TptrCollection &x, double alpha) |
| Scale.
|
|
template<class T > |
TptrCollection | operator* (const TptrCollection &in, double scaleFac) |
|
template<class T > |
TptrCollection | operator* (double scaleFac, const TptrCollection &in) |
|
template<class T > |
TptrCollection | operator* (TptrCollection &&in, double scaleFac) |
| Add (destructible input)
|
|
template<class T > |
TptrCollection | operator* (double scaleFac, TptrCollection &&in) |
| Add (destructible input)
|
|
template<typename T > |
void | axpy (double alpha, const TptrCollection &x, TptrCollection &y) |
| y += alpha x
|
|
ScalarFieldArray | operator* (const ScalarFieldArray &x, const ScalarFieldArray &y) |
| elementise multiply
|
|
ScalarFieldArray | operator* (ScalarFieldArray &&x, const ScalarFieldArray &y) |
|
ScalarFieldArray | operator* (const ScalarFieldArray &x, ScalarFieldArray &&y) |
|
ScalarFieldArray & | operator*= (ScalarFieldArray &y, const ScalarField &x) |
|
ScalarFieldArray | operator* (const ScalarField &x, ScalarFieldArray &&y) |
|
ScalarFieldArray | operator* (ScalarFieldArray &&y, const ScalarField &x) |
|
ScalarFieldArray | operator* (const ScalarField &x, const ScalarFieldArray &y) |
|
ScalarFieldArray | operator* (const ScalarFieldArray &y, const ScalarField &x) |
|
template<class T > |
TptrCollection & | operator+= (TptrCollection &in, const TptrCollection &other) |
| Increment.
|
|
template<class T > |
TptrCollection & | operator-= (TptrCollection &in, const TptrCollection &other) |
| Decrement.
|
|
template<class T > |
TptrCollection | operator+ (const TptrCollection &in1, const TptrCollection &in2) |
|
template<class T > |
TptrCollection | operator+ (const TptrCollection &in1, TptrCollection &&in2) |
| Add (destructible input)
|
|
template<class T > |
TptrCollection | operator+ (TptrCollection &&in1, const TptrCollection &in2) |
| Add (destructible input)
|
|
template<class T > |
TptrCollection | operator+ (TptrCollection &&in1, TptrCollection &&in2) |
| Add (destructible inputs)
|
|
template<class T > |
TptrCollection | operator- (const TptrCollection &in1, const TptrCollection &in2) |
|
template<class T > |
TptrCollection | operator- (const TptrCollection &in1, TptrCollection &&in2) |
| Add (destructible inputs)
|
|
template<class T > |
TptrCollection | operator- (TptrCollection &&in1, const TptrCollection &in2) |
| Add (destructible inputs)
|
|
template<class T > |
TptrCollection | operator- (TptrCollection &&in1, TptrCollection &&in2) |
| Add (destructible inputs)
|
|
template<typename T > |
double | dot (const TptrCollection &x, const TptrCollection &y) |
| Inner product.
|
|
ScalarFieldTildeArray | lGradient (const ScalarFieldTilde &, int l) |
| spherical tensor gradient of order l (2l+1 outputs, multiplied by Ylm(Ghat) (iG)^l)
|
|
ScalarFieldTilde | lDivergence (const ScalarFieldTildeArray &, int l) |
| spherical tensor divergence of order l (2l+1 inputs, multiplied by Ylm(Ghat) (iG)^l, and summed)
|
|
matrix3 | lGradientStress (const RadialFunctionG &, const ScalarFieldTilde &, const ScalarFieldTilde &, int l, int m) |
| Stress corresponding to lGradient and a convolution.
|
|
template<typename T > |
void | initZero (TptrCollection &x) |
| Initialize (non-null) data to zero.
|
|
template<typename T > |
void | nullToZero (TptrCollection &x, const GridInfo &gInfo, int N=0) |
|
template<typename T > |
void | initRandomFlat (TptrCollection &x) |
| Initialize to random numbers (uniform on 0 to 1)
|
|
template<typename T > |
void | randomize (TptrCollection &x) |
| Initialize to normal random numbers:
|
|
template<typename T > |
void | loadFromFile (TptrCollection &x, const char *filename) |
| Load an array of scalar fields from a file.
|
|
template<typename T > |
void | saveToFile (const TptrCollection &x, const char *filename) |
| Save an array of scalar fields to a file.
|
|
ScalarFieldArray | I (ScalarFieldTildeArray &&X) |
|
ScalarFieldArray | I (const ScalarFieldTildeArray &X) |
| Reciprocal to real space.
|
|
ScalarFieldTildeArray | J (const ScalarFieldArray &X) |
|
ScalarFieldTildeArray | Idag (const ScalarFieldArray &X) |
|
ScalarFieldArray | Jdag (ScalarFieldTildeArray &&X) |
|
ScalarFieldArray | Jdag (const ScalarFieldTildeArray &X) |
| Hermitian conjugate of J.
|
|
ScalarFieldArray | Real (const complexScalarFieldArray X) |
|
ScalarFieldArray | Imag (const complexScalarFieldArray X) |
|
complexScalarFieldArray | Complex (const ScalarFieldArray re, const ScalarFieldArray im) |
|
complexScalarFieldArray | Complex (const ScalarFieldArray re) |
|
complexScalarFieldArray | conj (const complexScalarFieldArray X) |
|
template<typename T > |
T & | operator+= (T &y, const scaled< T > &x) |
|
template<typename T > |
T & | operator-= (T &y, const scaled< T > &x) |
|
template<typename T > |
T | operator+ (const scaled< T > &x, const scaled< T > &y) |
|
template<typename T > |
T | operator- (const scaled< T > &x, const scaled< T > &y) |
|
template<typename T > |
scaled< T > | operator- (const scaled< T > &x) |
|
template<typename T > |
scaled< T > | operator* (double s, const scaled< T > &x) |
|
template<typename T > |
scaled< T > | operator* (const scaled< T > &x, double s) |
|
template<typename scalar > |
__hostanddev__ tensor3< scalar > | operator* (scalar s, const tensor3< scalar > &a) |
|
template<typename scalar > |
__hostanddev__ tensor3< scalar > | operator* (const tensor3< scalar > &a, scalar s) |
|
template<typename scalar > |
__hostanddev__ tensor3< scalar > | loadTensor (const tensor3< const scalar * > &tArr, int i) |
| Load tensor from a constant tensor field.
|
|
template<typename scalar > |
__hostanddev__ tensor3< scalar > | loadTensor (const tensor3< scalar * > &tArr, int i) |
| Load tensor from a tensor field.
|
|
template<typename scalar > |
__hostanddev__ void | storeTensor (const tensor3< scalar > &t, tensor3< scalar * > &tArr, int i) |
| Store tensor to a tensor field.
|
|
template<typename scalar > |
__hostanddev__ void | accumTensor (const tensor3< scalar > &t, tensor3< scalar * > &tArr, int i) |
| Accumulate tensor onto a tensor field.
|
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator+ (scalar s, const vector3< scalar > &a) |
|
__hostanddev__ vector3< int > | operator+ (int s, const vector3< int > &a) |
|
__hostanddev__ vector3< int > | operator+ (const vector3< int > &a, int s) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator+ (const vector3< scalar > &a, int s) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator+ (int s, const vector3< scalar > &a) |
|
__hostanddev__ vector3 | operator+ (vector3<> a, vector3< int > b) |
|
__hostanddev__ vector3 | operator+ (vector3< int > a, vector3<> b) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > & | operator*= (vector3< scalar > &a, scalar s) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > & | operator*= (vector3< scalar > &a, double s) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > & | operator*= (vector3< scalar > &a, int s) |
|
__hostanddev__ vector3 & | operator*= (vector3<> &a, double s) |
|
__hostanddev__ vector3 & | operator*= (vector3<> &a, int s) |
|
__hostanddev__ vector3< int > & | operator*= (vector3< int > &a, int s) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (scalar s, const vector3< scalar > &a) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const vector3< scalar > &a, scalar s) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (double s, const vector3< scalar > &a) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const vector3< scalar > &a, double s) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (int s, const vector3< scalar > &a) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | operator* (const vector3< scalar > &a, int s) |
|
__hostanddev__ vector3 | operator* (double s, const vector3<> &a) |
|
__hostanddev__ vector3 | operator* (const vector3<> &a, double s) |
|
__hostanddev__ vector3 | operator* (double s, const vector3< int > &a) |
|
__hostanddev__ vector3 | operator* (const vector3< int > &a, double s) |
|
__hostanddev__ vector3< complex > | operator* (complex s, const vector3<> &a) |
|
__hostanddev__ vector3< complex > | operator* (const vector3<> &a, complex s) |
|
__hostanddev__ vector3< complex > | operator* (complex s, const vector3< int > &a) |
|
__hostanddev__ vector3< complex > | operator* (const vector3< int > &a, complex s) |
|
template<typename scalar > |
__hostanddev__ scalar | dot (const vector3< scalar > &a, const vector3< scalar > &b) |
|
template<typename scalar > |
__hostanddev__ scalar | dot (const vector3< double > &a, const vector3< scalar > &b) |
|
template<typename scalar > |
__hostanddev__ scalar | dot (const vector3< int > &a, const vector3< scalar > &b) |
|
template<typename scalar > |
__hostanddev__ scalar | dot (const vector3< scalar > &a, const vector3< double > &b) |
|
template<typename scalar > |
__hostanddev__ scalar | dot (const vector3< scalar > &a, const vector3< int > &b) |
|
__hostanddev__ double | dot (const vector3< double > &a, const vector3< double > &b) |
|
__hostanddev__ double | dot (const vector3< int > &a, const vector3< double > &b) |
|
__hostanddev__ double | dot (const vector3< double > &a, const vector3< int > &b) |
|
__hostanddev__ int | dot (const vector3< int > &a, const vector3< int > &b) |
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | cross (const vector3< scalar > &a, const vector3< scalar > &b) |
| cross product
|
|
template<typename scalar > |
__hostanddev__ scalar | box (const vector3< scalar > &a, const vector3< scalar > &b, const vector3< scalar > &c) |
| box product / triple product
|
|
__hostanddev__ vector3< double > | normalize (const vector3<> &v) |
| normalise vector
|
|
__hostanddev__ vector3< int > | round (const vector3<> &v, double *err=0) |
| Round vector3<> to vector3<int> (and optionally retrieve error)
|
|
__hostanddev__ double | circDistanceSquared (const vector3<> &a, const vector3<> &b) |
|
template<typename T > |
T | gcd (T x, T y) |
| GCD of integers, templated over integer types.
|
|
template<typename T > |
vector3< T > | gcdReduce (const vector3< T > &d) |
| Reduce an integer vector by its gcd.
|
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | loadVector (const vector3< const scalar * > &vArr, int i) |
| Load vector from a constant vector field.
|
|
template<typename scalar > |
__hostanddev__ vector3< scalar > | loadVector (const vector3< scalar * > &vArr, int i) |
| Load vector from a vector field.
|
|
template<typename scalar > |
__hostanddev__ void | storeVector (const vector3< scalar > &v, vector3< scalar * > &vArr, int i) |
| Store vector to a vector field.
|
|
template<typename scalar > |
__hostanddev__ void | accumVector (const vector3< scalar > &v, vector3< scalar * > &vArr, int i) |
| Accumulate vector onto a vector field.
|
|
template<class T , int N> |
TptrMul | clone (const TptrMul &X) |
| Clone (NOTE: operator= is by reference for ScalarField multiplets)
|
|
template<class T , int N> |
void | initZero (TptrMul &X) |
| Initialize data to 0 and scale factors to 1.
|
|
template<class T , int N> |
void | nullToZero (TptrMul &X, const GridInfo &gInfo) |
| Allocate and initialize each component of X to 0 if null.
|
|
template<int N> |
void | initRandom (RptrMul &X, double cap=0.0) |
| initialize element-wise with a unit-normal random number (with a cap if cap>0)
|
|
template<int N> |
void | initRandomFlat (RptrMul &X) |
| initialize element-wise with a unit-flat [0:1) random number
|
|
template<int N> |
void | randomize (RptrMul &X) |
| alternate interface required by Minimizable
|
|
template<class T , int N> |
TptrMul & | operator*= (TptrMul &in, const TptrMul &other) |
| Elementwise multiply each component.
|
|
template<class T , int N> |
TptrMul | operator* (const TptrMul &in1, const TptrMul &in2) |
| Elementwise multiply each component (preserve inputs)
|
|
template<class T , int N> |
TptrMul | operator* (TptrMul &&in1, const TptrMul &in2) |
| Elementwise multiply each component (destructible input)
|
|
template<class T , int N> |
TptrMul | operator* (const TptrMul &in1, TptrMul &&in2) |
| Elementwise multiply each component (destructible input)
|
|
template<class T , int N> |
TptrMul | operator* (TptrMul &&in1, TptrMul &&in2) |
| Elementwise multiply each component (destructible inputs)
|
|
template<class T , int N> |
TptrMul & | operator*= (TptrMul &inM, const Tptr &inS) |
| Elementwise multiply each component.
|
|
template<class T , int N> |
TptrMul | operator* (const TptrMul &inM, const Tptr &inS) |
| Elementwise multiply each component (preserve inputs)
|
|
template<class T , int N> |
TptrMul | operator* (const Tptr &inS, const TptrMul &inM) |
| Elementwise multiply each component (preserve inputs)
|
|
template<class T , int N> |
TptrMul | operator* (TptrMul &&inM, const Tptr &inS) |
| Elementwise multiply each component (destructible input)
|
|
template<class T , int N> |
TptrMul | operator* (const Tptr &inS, TptrMul &&inM) |
| Elementwise multiply each component (destructible input)
|
|
template<class T , int N> |
TptrMul & | operator*= (TptrMul &in, double scaleFac) |
| Scale.
|
|
template<class T , int N> |
TptrMul | operator* (const TptrMul &in, double scaleFac) |
| Scalar multiply (preserve input)
|
|
template<class T , int N> |
TptrMul | operator* (double scaleFac, const TptrMul &in) |
| Scalar multiply (preserve input)
|
|
template<class T , int N> |
TptrMul | operator* (TptrMul &&in, double scaleFac) |
| Scalar multiply (destructible input)
|
|
template<class T , int N> |
TptrMul | operator* (double scaleFac, TptrMul &&in) |
| Scalar multiply (destructible input)
|
|
template<class T > |
ScalarFieldMultiplet< T, 3 > | operator* (vector3<> v, const Tptr &in) |
| 3-vector multiply
|
|
template<class T > |
Tptr | dot (vector3<> v, const ScalarFieldMultiplet< T, 3 > &in) |
| 3-vector multiply
|
|
template<class T , int N> |
void | axpy (double alpha, const TptrMul &X, TptrMul &Y) |
| Linear combine Y += alpha * X.
|
|
template<class T , int N> |
TptrMul & | operator+= (TptrMul &in, const TptrMul &other) |
| Increment.
|
|
template<class T , int N> |
TptrMul & | operator-= (TptrMul &in, const TptrMul &other) |
| Decrement.
|
|
template<class T , int N> |
TptrMul | operator+ (const TptrMul &in1, const TptrMul &in2) |
| Add (preserve inputs)
|
|
template<class T , int N> |
TptrMul | operator+ (const TptrMul &in1, TptrMul &&in2) |
| Add (destructible input)
|
|
template<class T , int N> |
TptrMul | operator+ (TptrMul &&in1, const TptrMul &in2) |
| Add (destructible input)
|
|
template<class T , int N> |
TptrMul | operator+ (TptrMul &&in1, TptrMul &&in2) |
| Add (destructible inputs)
|
|
template<class T , int N> |
TptrMul | operator- (const TptrMul &in1, const TptrMul &in2) |
| Subtract (preserve input)
|
|
template<class T , int N> |
TptrMul | operator- (const TptrMul &in1, TptrMul &&in2) |
| Subtract (destructible input)
|
|
template<class T , int N> |
TptrMul | operator- (TptrMul &&in1, const TptrMul &in2) |
| Subtract (destructible input)
|
|
template<class T , int N> |
TptrMul | operator- (TptrMul &&in1, TptrMul &&in2) |
| Subtract (destructible inputs)
|
|
template<class T , int N> |
TptrMul | operator- (const TptrMul &in) |
| Negate.
|
|
template<class T , int N> |
TptrMul | operator- (TptrMul &&in) |
| Negate.
|
|
template<class T , int N> |
void | axpy (double alpha, const Tptr &X, TptrMul &Y) |
| Linear combine Y += alpha * X.
|
|
template<class T , int N> |
TptrMul & | operator+= (TptrMul &in, const Tptr &other) |
| Increment.
|
|
template<class T , int N> |
TptrMul & | operator-= (TptrMul &in, const Tptr &other) |
| Decrement.
|
|
template<class T , int N> |
TptrMul | operator+ (const TptrMul &in1, const Tptr &in2) |
| Add (preserve inputs)
|
|
template<class T , int N> |
TptrMul | operator+ (const Tptr &in1, const TptrMul &in2) |
| Add (preserve inputs)
|
|
template<class T , int N> |
TptrMul | operator+ (const Tptr &in1, TptrMul &&in2) |
| Add (destructible input)
|
|
template<class T , int N> |
TptrMul | operator+ (TptrMul &&in1, const Tptr &in2) |
| Add (destructible input)
|
|
template<class T , int N> |
TptrMul | operator- (const TptrMul &in1, const Tptr &in2) |
| Subtract (preserve input)
|
|
template<class T , int N> |
TptrMul | operator- (const Tptr &in1, const TptrMul &in2) |
| Subtract (preserve input)
|
|
template<class T , int N> |
TptrMul | operator- (TptrMul &&in1, const Tptr &in2) |
| Subtract (destructible input)
|
|
template<class T , int N> |
TptrMul | operator- (const Tptr &in1, TptrMul &&in2) |
| Subtract (destructible input)
|
|
template<class T , int N> |
double | dot (const TptrMul &X, const TptrMul &Y) |
| Inner product.
|
|
template<class T , int N> |
double | nrm2 (const TptrMul &X) |
| 2-norm
|
|
template<class T , int N> |
double | sum (const TptrMul &X) |
| Sum of elements.
|
|
vector3 | getGzero (const VectorFieldTilde &X) |
| return G=0 components
|
|
void | setGzero (const VectorFieldTilde &X, vector3<> v) |
| set G=0 components
|
|
vector3 | sumComponents (const VectorField &X) |
| Sum of elements (component-wise)
|
|
ScalarField | lengthSquared (const VectorField &X) |
| Elementwise length squared.
|
|
ScalarField | lengthSquaredWeighted (const vector3<> &w, const VectorField &X) |
| Elementwise length squared (weighted)
|
|
ScalarField | dotElemwise (const VectorField &X, const VectorField &Y) |
| Elementwise dot.
|
|
matrix3 | dotOuter (const VectorField &X, const VectorField &Y) |
| Compute m(i,j) = dot(X[i], Y[j])
|
|
matrix3 | dotOuter (const VectorField &X, const VectorField &Y, const ScalarField &w) |
| Compute m(i,j) = dot(X[i], w * Y[j])
|
|
template<int N> |
RptrMul & | operator+= (RptrMul &in, double scalar) |
| Increment by scalar.
|
|
template<int N> |
RptrMul | operator+ (double scalar, const RptrMul &in) |
| Add scalar (preserve input)
|
|
template<int N> |
RptrMul | operator+ (const RptrMul &in, double scalar) |
| Add scalar (preserve input)
|
|
template<int N> |
RptrMul | operator+ (double scalar, RptrMul &&in) |
| Add scalar (destructible input)
|
|
template<int N> |
RptrMul | operator+ (RptrMul &&in, double scalar) |
| Add scalar (destructible input)
|
|
template<int N> |
GptrMul & | operator*= (GptrMul &in, const RealKernel &kernel) |
| Multiply by kernel.
|
|
template<int N> |
GptrMul | operator* (const RealKernel &kernel, const GptrMul &in) |
| Multiply by kernel (preserve input)
|
|
template<int N> |
GptrMul | operator* (const GptrMul &in, const RealKernel &kernel) |
| Multiply by kernel (preserve input)
|
|
template<int N> |
GptrMul | operator* (const RealKernel &kernel, GptrMul &&in) |
| Multiply by kernel (destructible input)
|
|
template<int N> |
GptrMul | operator* (GptrMul &&in, const RealKernel &kernel) |
| Multiply by kernel (destructible input)
|
|
template<int N> |
GptrMul | O (GptrMul &&X) |
| Inner product operator (diagonal in PW basis)
|
|
template<int N> |
GptrMul | O (const GptrMul &X) |
| Inner product operator (diagonal in PW basis)
|
|
template<int N> |
RptrMul | I (GptrMul &&X) |
| Forward transform: PW basis -> real space (destructible input)
|
|
template<int N> |
GptrMul | J (const RptrMul &X) |
| Inverse transform: Real space -> PW basis.
|
|
template<int N> |
GptrMul | Idag (const RptrMul &X) |
| Forward transform transpose: Real space -> PW basis.
|
|
template<int N> |
RptrMul | Jdag (GptrMul &&X) |
| Inverse transform transpose: PW basis -> real space (destructible input)
|
|
template<int N> |
RptrMul | Jdag (const GptrMul &X) |
| Inverse transform transpose: PW basis -> real space (preserve input)
|
|
template<int N> |
RptrMul | I (const GptrMul &X) |
| Forward transform: PW basis -> real space (preserve input)
|
|
VectorFieldTilde | gradient (const ScalarFieldTilde &) |
| compute the gradient of a complex field, returns cartesian components
|
|
VectorField | gradient (const ScalarField &) |
| compute the gradient of a complex field, returns cartesian components
|
|
ScalarFieldTilde | divergence (const VectorFieldTilde &) |
| compute the divergence of a vector field specified in cartesian components
|
|
ScalarField | divergence (const VectorField &) |
| compute the divergence of a vector field specified in cartesian components
|
|
VectorFieldTilde | operator* (const RadialFunctionG &, const VectorFieldTilde &) |
| Convolve a vector field by a radial function (preserve input)
|
|
VectorFieldTilde | operator* (const RadialFunctionG &, VectorFieldTilde &&) |
| Convolve a vector field by a radial function (destructible input)
|
|
TensorFieldTilde | tensorGradient (const ScalarFieldTilde &) |
| symmetric traceless tensor second derivative of a scalar field
|
|
ScalarFieldTilde | tensorDivergence (const TensorFieldTilde &) |
| second derivative contraction of a symmetric traceless tensor field
|
|
template<int N> |
void | printStats (const RptrMul &, const char *name, FILE *fpLog=stdout) |
| Print mean and standard deviation of each component array with specified name (debug utility)
|
|
void | init (std::vector< ColumnBundle > &, int nbundles, int ncols=0, const Basis *basis=0, const ElecInfo *eInfo=0) |
| Initialize an array of column bundles (with appropriate wavefunction sizes if ncols, basis, qnum and eInfo are all non-zero)
|
|
void | randomize (std::vector< ColumnBundle > &, const ElecInfo &eInfo) |
| randomize an array of columnbundles
|
|
ColumnBundle | clone (const ColumnBundle &) |
|
void | randomize (ColumnBundle &x) |
| Copies the input. More...
|
|
double | dot (const ColumnBundle &x, const ColumnBundle &y) |
| inner product
|
|
ColumnBundle & | operator+= (ColumnBundle &Y, const scaled< ColumnBundle > &X) |
|
ColumnBundle & | operator-= (ColumnBundle &Y, const scaled< ColumnBundle > &X) |
|
ColumnBundle | operator+ (const scaled< ColumnBundle > &Y1, const scaled< ColumnBundle > &Y2) |
|
ColumnBundle | operator- (const scaled< ColumnBundle > &Y1, const scaled< ColumnBundle > &Y2) |
|
ColumnBundle & | operator*= (ColumnBundle &X, double s) |
|
ColumnBundle | operator* (double s, ColumnBundle &&Y) |
|
ColumnBundle | operator* (ColumnBundle &&Y, double s) |
|
scaled< ColumnBundle > | operator* (double s, const ColumnBundle &Y) |
|
scaled< ColumnBundle > | operator* (const ColumnBundle &Y, double s) |
|
scaled< ColumnBundle > | operator- (const ColumnBundle &Y) |
|
ColumnBundle & | operator*= (ColumnBundle &X, complex s) |
|
ColumnBundle | operator* (complex s, const ColumnBundle &Y) |
|
ColumnBundle | operator* (const ColumnBundle &Y, complex s) |
|
ColumnBundleMatrixProduct | operator* (const scaled< ColumnBundle > &sY, const matrixScaledTransOp &Mst) |
|
ColumnBundle & | operator+= (ColumnBundle &Y, const ColumnBundleMatrixProduct &XM) |
|
ColumnBundle & | operator-= (ColumnBundle &Y, const ColumnBundleMatrixProduct &XM) |
|
ColumnBundle | operator+ (const ColumnBundleMatrixProduct &XM1, const ColumnBundleMatrixProduct &XM2) |
|
ColumnBundle | operator- (const ColumnBundleMatrixProduct &XM1, const ColumnBundleMatrixProduct &XM2) |
|
ColumnBundle | operator* (const scaled< ColumnBundle > &, const diagMatrix &) |
|
matrix | operator^ (const scaled< ColumnBundle > &, const scaled< ColumnBundle > &) |
| inner product
|
|
vector3< matrix > | spinOverlap (const scaled< ColumnBundle > &sY) |
| spin-resolved inner product for a spinorial ColumnBundle
|
|
ColumnBundle | Idag_DiagV_I (const ColumnBundle &C, const ScalarFieldArray &V, const ColumnBundle *Cout=0) |
|
ColumnBundle | Idag_DiagV_I (const ColumnBundle &C, const complexScalarFieldArray &V, const ColumnBundle *Cout=0) |
| Same as above for complex potentials.
|
|
ColumnBundle | L (const ColumnBundle &Y) |
| Apply Laplacian.
|
|
ColumnBundle | Linv (const ColumnBundle &Y) |
| Apply Laplacian inverse.
|
|
matrix3 | Lstress (const ColumnBundle &Y, const diagMatrix &F) |
| Compute lattice vector derivative of Tr[Y^LYF] (used for KE stress calculation)
|
|
ColumnBundle | O (const ColumnBundle &Y, std::vector< matrix > *VdagY=0) |
| Apply overlap (and optionally retrieve pseudopotential projections for later reuse)
|
|
ColumnBundle | D (const ColumnBundle &Y, int iDir) |
| Compute the cartesian gradient of a column bundle in direction# iDir.
|
|
ColumnBundle | D (const ColumnBundle &in, const vector3<> &dir) |
| Directional derivative of column bundle along (cartesian direction) dir.
|
|
ColumnBundle | DD (const ColumnBundle &Y, int iDir, int jDir) |
| Compute second spatial derivative of a column bundle along directions# iDir, jDir.
|
|
void | precond_inv_kinetic (ColumnBundle &Y, double KErollover, bool sqrtop=false) |
| Apply inverse kinetic preconditioner (Roughly inv((k+G)^2/2)) in-place.
|
|
diagMatrix | diagDot (const ColumnBundle &X, const ColumnBundle &Y) |
| compute diag(X^Y) efficiently (avoid the off-diagonals)
|
|
void | precond_inv_kinetic_band (ColumnBundle &Y, const diagMatrix &KEref) |
| In-place inverse kinetic preconditioner with band-by-band KE reference (Used by BandDavidson)
|
|
ColumnBundle | translate (ColumnBundle &&, vector3<> dr) |
| translate a column-bundle by dr in lattice coordinates (destructible input)
|
|
ColumnBundle | translate (const ColumnBundle &, vector3<> dr) |
| translate a column-bundle by dr in lattice coordinates (preserve input)
|
|
void | translateColumns (ColumnBundle &, const vector3<> *dr) |
| translate each column of a column bundle by a different dr (in-place)
|
|
ColumnBundle | switchBasis (const ColumnBundle &, const Basis &) |
| return wavefunction projected to a different basis
|
|
complex | traceinner (const diagMatrix &F, const ColumnBundle &X, const ColumnBundle &Y) |
| Return trace(F*X^Y)
|
|
ScalarFieldArray | diagouterI (const diagMatrix &F, const ColumnBundle &X, int nDensities, const GridInfo *gInfoOut=0) |
|
complexScalarFieldArray | diagouterI (const diagMatrix &F, const ColumnBundle &A, const ColumnBundle &B, int nDensities, const GridInfo *gInfoOut) |
|