51 template <
typename T,
int NDIM>
68 _kx =
kx; _ky =
ky; _kz =
kz;
73 double kx() {
return _kx;}
74 double ky() {
return _ky;}
75 double kz() {
return _kz;}
98 template <
typename T,
int NDIM>
107 :
_world(world), _coeff(coeff), _thresh(thresh) {}
117 virtual bool is_od() = 0;
122 virtual bool is_rd() = 0;
132 virtual funcT
op_o(
const std::vector<funcT>& phis,
const funcT&
psi)
141 virtual funcT
op_r(
const funcT& rho,
const funcT&
psi)
150 virtual std::vector<funcT>
multi_op_o(
const std::vector<funcT>& phis)
154 for (
unsigned int pi = 0;
pi < phis.size();
pi++)
165 virtual std::vector<funcT>
multi_op_r(
const funcT& rho,
const std::vector<funcT>& phis)
168 for (
unsigned int pi = 0;
pi < phis.size();
pi++)
225 template <
typename T,
int NDIM>
259 void solve(
int maxits);
283 const std::vector<funcT>&
phis()
290 const std::vector<double>&
eigs()
329 static funcT
compute_rho(std::vector<funcT>
phis, std::vector<double> occs,
336 std::vector<funcT> _phis;
341 std::vector<double> _eigs;
346 std::vector< EigSolverOp<T,NDIM>* > _ops;
351 std::vector<kvecT> _kpoints;
360 std::vector<IEigSolverObserver<T,NDIM>*> _obs;
370 std::vector<poperatorT> _bops;
375 std::vector<double> _occs;
Vector< double, NDIM > kvecT
Definition: eigsolver.h:233
WorldGopInterface & gop
Global operations.
Definition: worldfwd.h:462
Definition: eigsolver.h:52
std::string messsageME()
Definition: eigsolver.h:182
double thresh()
Definition: eigsolver.h:194
void print_matrix_elements(const funcT &phii, const funcT &phij)
Prints a matrix element given the left and right functions.
Definition: eigsolver.cc:243
virtual funcT op_r(const funcT &rho, const funcT &psi)
Density-dependent portion of operator.
Definition: eigsolver.h:141
std::complex< double > func(int n, int t1, int t2, int t3, double xx, double yy, double zz)
Definition: wannier.cc:98
Main include file for MADNESS and defines Function interface.
double get_eig(int indx)
Definition: eigsolver.h:269
const std::vector< funcT > & phis()
Definition: eigsolver.h:283
virtual std::vector< funcT > multi_op_o(const std::vector< funcT > &phis)
Orbital-dependent portion of operator.
Definition: eigsolver.h:150
Definition: eigsolver.h:63
virtual ~IEigSolverObserver()
Definition: eigsolver.h:59
Definition: electronicstructureparams.h:45
virtual std::vector< funcT > multi_op_r(const funcT &rho, const std::vector< funcT > &phis)
Density-dependent portion of operator.
Definition: eigsolver.h:165
double coeff()
Definition: eigsolver.h:178
::std::string string
Definition: gtest-port.h:872
void make_bsh_operators()
Makes the BSH Green's functions for the parallel solver (multi_solve()).
Definition: eigsolver.cc:215
double kz()
Definition: eigsolver.h:75
T matrix_element(const funcT &phii, const funcT &phij)
Computes a matrix element given the left and right functions.
Definition: eigsolver.cc:144
void messageME(std::string messageME)
Definition: eigsolver.h:198
void addObserver(IEigSolverObserver< T, NDIM > *obs)
Definition: eigsolver.h:297
double ky()
Definition: eigsolver.h:74
This header should include pretty much everything needed for the parallel runtime.
virtual ~EigSolver()
Destructor.
Definition: eigsolver.cc:89
void prepare_ops()
Preprocesses the operators for doing an iteration of "eigensolving".
Definition: eigsolver.cc:129
void solve(int maxits)
Definition: eigsolver.cc:280
double kx()
Definition: eigsolver.h:73
void multi_solve(int maxits)
Definition: eigsolver.cc:414
Function< T, NDIM > funcT
Definition: eigsolver.h:231
const T1 &f1 return GTEST_2_TUPLE_() T(f0, f1)
virtual void prepare_op(funcT rho)
Build the potential from a density if a density-dependent operator.
Definition: eigsolver.h:127
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:56
std::shared_ptr< operatorT > poperatorT
Definition: eigsolver.h:235
const double pi
Definition: navstokes_cosines.cc:91
EigSolverOp(World &world, double coeff, double thresh)
Definition: eigsolver.h:106
double psi(const Vector< double, 3 > &r)
Definition: apps/ii/hatom_energy.cc:42
virtual funcT op_o(const std::vector< funcT > &phis, const funcT &psi)
Orbital-dependent portion of operator.
Definition: eigsolver.h:132
Definition: eigsolver.h:99
virtual void iterateOutput(const std::vector< funcT > &phis, const std::vector< double > &eigs, const Function< double, NDIM > &rho, const int &iter, bool periodic)=0
virtual ~EigSolverOp()
Definition: eigsolver.h:112
A parallel world with full functionality wrapping an MPI communicator.
Definition: worldfwd.h:416
void fence()
Synchronizes all processes in communicator AND globally ensures no pending AM or tasks.
Definition: worldgop.cc:52
void update_occupation()
Definition: eigsolver.cc:169
A multiresolution adaptive numerical function.
Definition: derivative.h:61
static funcT compute_rho(std::vector< funcT > phis, std::vector< double > occs, const World &world)
Computes the electronic density.
Definition: eigsolver.cc:108
Definition: eigsolver.h:226
World & _world
Definition: eigsolver.h:189
KPoint(double kx, double ky, double kz, double weight)
Definition: eigsolver.h:66
funcT get_phi(int indx)
Definition: eigsolver.h:276
virtual bool is_rd()=0
Is there a density-dependent term?
FunctionFactory implements the named-parameter idiom for Function.
Definition: funcimpl.h:70
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
const std::vector< double > & eigs()
Definition: eigsolver.h:290
double weight()
Definition: eigsolver.h:79
virtual bool is_od()=0
Is there an orbitally-dependent term?
SeparatedConvolution< double, NDIM > operatorT
Definition: eigsolver.h:234