50 template <
typename T,
int NDIM>
97 template <
typename T,
int NDIM>
149 virtual std::vector<funcT>
multi_op_o(
const std::vector<funcT>& phis)
153 for (
unsigned int pi = 0;
pi < phis.size();
pi++)
164 virtual std::vector<funcT>
multi_op_r(
const funcT& rho,
const std::vector<funcT>& phis)
167 for (
unsigned int pi = 0;
pi < phis.size();
pi++)
224 template <
typename T,
int NDIM>
258 void solve(
int maxits);
282 const std::vector<funcT>&
phis()
289 const std::vector<double>&
eigs()
345 std::vector< EigSolverOp<T,NDIM>* >
_ops;
359 std::vector<IEigSolverObserver<T,NDIM>*>
_obs;
This header should include pretty much everything needed for the parallel runtime.
Definition: eigsolver.h:99
virtual std::vector< funcT > multi_op_o(const std::vector< funcT > &phis)
Orbital-dependent portion of operator.
Definition: eigsolver.h:149
World & _world
Definition: eigsolver.h:188
virtual funcT op_o(const std::vector< funcT > &phis, const funcT &psi)
Orbital-dependent portion of operator.
Definition: eigsolver.h:131
virtual std::vector< funcT > multi_op_r(const funcT &rho, const std::vector< funcT > &phis)
Density-dependent portion of operator.
Definition: eigsolver.h:164
std::string messsageME()
Definition: eigsolver.h:181
virtual bool is_rd()=0
Is there a density-dependent term?
double _thresh
Definition: eigsolver.h:209
double thresh()
Definition: eigsolver.h:193
std::string _messageME
Definition: eigsolver.h:213
double _coeff
Definition: eigsolver.h:205
virtual void prepare_op(funcT rho)
Build the potential from a density if a density-dependent operator.
Definition: eigsolver.h:126
EigSolverOp(World &world, double coeff, double thresh)
Definition: eigsolver.h:105
virtual ~EigSolverOp()
Definition: eigsolver.h:111
Function< T, NDIM > funcT
Definition: eigsolver.h:101
void messageME(std::string messageME)
Definition: eigsolver.h:197
double coeff()
Definition: eigsolver.h:177
virtual bool is_od()=0
Is there an orbitally-dependent term?
virtual funcT op_r(const funcT &rho, const funcT &psi)
Density-dependent portion of operator.
Definition: eigsolver.h:140
Definition: eigsolver.h:226
World & _world
Definition: eigsolver.h:354
std::vector< double > _occs
Definition: eigsolver.h:374
void print_matrix_elements(const funcT &phii, const funcT &phij)
Prints a matrix element given the left and right functions.
Definition: eigsolver.cc:242
void make_bsh_operators()
Makes the BSH Green's functions for the parallel solver (multi_solve()).
Definition: eigsolver.cc:214
void prepare_ops()
Preprocesses the operators for doing an iteration of "eigensolving".
Definition: eigsolver.cc:128
std::vector< double > _eigs
List of the eigenvalues.
Definition: eigsolver.h:340
std::vector< IEigSolverObserver< T, NDIM > * > _obs
Definition: eigsolver.h:359
std::vector< funcT > _phis
List of the functions.
Definition: eigsolver.h:335
std::vector< kvecT > _kpoints
List of the ops.
Definition: eigsolver.h:350
static funcT compute_rho(std::vector< funcT > phis, std::vector< double > occs, const World &world)
Computes the electronic density.
Definition: eigsolver.cc:107
Function< T, NDIM > funcT
Definition: eigsolver.h:230
ElectronicStructureParams _params
Definition: eigsolver.h:378
std::vector< poperatorT > _bops
Definition: eigsolver.h:369
void multi_solve(int maxits)
Definition: eigsolver.cc:413
std::vector< EigSolverOp< T, NDIM > * > _ops
List of the ops.
Definition: eigsolver.h:345
T matrix_element(const funcT &phii, const funcT &phij)
Computes a matrix element given the left and right functions.
Definition: eigsolver.cc:143
Vector< double, NDIM > kvecT
Definition: eigsolver.h:232
void update_occupation()
Definition: eigsolver.cc:168
EigSolver(World &world, std::vector< funcT > phis, std::vector< double > eigs, std::vector< EigSolverOp< T, NDIM > * > ops, std::vector< kvecT > kpoints, ElectronicStructureParams params)
Constructor for periodic system.
Definition: eigsolver.cc:55
double get_eig(int indx)
Definition: eigsolver.h:268
void solve(int maxits)
Definition: eigsolver.cc:279
funcT get_phi(int indx)
Definition: eigsolver.h:275
void addObserver(IEigSolverObserver< T, NDIM > *obs)
Definition: eigsolver.h:296
Function< double, NDIM > _rho
Definition: eigsolver.h:364
SeparatedConvolution< double, NDIM > operatorT
Definition: eigsolver.h:233
const std::vector< funcT > & phis()
Definition: eigsolver.h:282
virtual ~EigSolver()
Destructor.
Definition: eigsolver.cc:88
const std::vector< double > & eigs()
Definition: eigsolver.h:289
std::shared_ptr< operatorT> poperatorT
Definition: eigsolver.h:234
FunctionFactory implements the named-parameter idiom for Function.
Definition: function_factory.h:86
A multiresolution adaptive numerical function.
Definition: mra.h:122
Definition: eigsolver.h:52
virtual ~IEigSolverObserver()
Definition: eigsolver.h:58
Function< T, NDIM > funcT
Definition: eigsolver.h:53
virtual void iterateOutput(const std::vector< funcT > &phis, const std::vector< double > &eigs, const Function< double, NDIM > &rho, const int &iter, bool periodic)=0
Definition: eigsolver.h:63
double kz()
Definition: eigsolver.h:74
double ky()
Definition: eigsolver.h:73
double _kz
Definition: eigsolver.h:86
double _kx
Definition: eigsolver.h:84
double weight()
Definition: eigsolver.h:78
double _weight
Definition: eigsolver.h:91
double kx()
Definition: eigsolver.h:72
KPoint(double kx, double ky, double kz, double weight)
Definition: eigsolver.h:65
double _ky
Definition: eigsolver.h:85
Convolutions in separated form (including Gaussian)
Definition: operator.h:136
void fence(bool debug=false)
Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.
Definition: worldgop.cc:161
A parallel world class.
Definition: world.h:132
WorldGopInterface & gop
Global operations.
Definition: world.h:205
auto T(World &world, response_space &f) -> response_space
Definition: global_functions.cc:34
double psi(const Vector< double, 3 > &r)
Definition: hatom_energy.cc:78
Main include file for MADNESS and defines Function interface.
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
std::shared_ptr< FunctionFunctorInterface< double, 3 > > func(new opT(g))
Definition: electronicstructureparams.h:46
static const double pi
Definition: testcosine.cc:6