JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ColumnBundle.h File Reference
#include <core/ManagedMemory.h>
#include <core/ScalarFieldArray.h>
#include <core/matrix.h>
#include <core/scaled.h>
#include <electronic/Basis.h>

Classes

class  ColumnBundle
 Wavefunction data structure. More...
 
struct  ColumnBundleMatrixProduct
 ColumnBundle with a pending matrix multiply (on the right side) More...
 

Functions

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
 
ColumnBundleoperator+= (ColumnBundle &Y, const scaled< ColumnBundle > &X)
 
ColumnBundleoperator-= (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)
 
ColumnBundleoperator*= (ColumnBundle &X, double s)
 
ColumnBundle operator* (double s, ColumnBundle &&Y)
 
ColumnBundle operator* (ColumnBundle &&Y, double s)
 
scaled< ColumnBundleoperator* (double s, const ColumnBundle &Y)
 
scaled< ColumnBundleoperator* (const ColumnBundle &Y, double s)
 
scaled< ColumnBundleoperator- (const ColumnBundle &Y)
 
ColumnBundleoperator*= (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)
 
ColumnBundleoperator+= (ColumnBundle &Y, const ColumnBundleMatrixProduct &XM)
 
ColumnBundleoperator-= (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< matrixspinOverlap (const scaled< ColumnBundle > &sY1, const scaled< ColumnBundle > &sY2)
 spin-resolved inner product for spinorial ColumnBundle's
 
ColumnBundle Idag_DiagV_I (const ColumnBundle &C, const ScalarFieldArray &V)
 
ColumnBundle L (const ColumnBundle &Y)
 Apply Laplacian.
 
ColumnBundle Linv (const ColumnBundle &Y)
 Apply Laplacian inverse.
 
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 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)
 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)
 

Detailed Description

ColumnBundle class and operators