friend pvector operator*(const pvector& in1,const pvector& in2)Return value:
: a pvector, each of whose elements is the product of the corresponding element of in1 with the corresponding element of in2; i.e., out.dat[i][j][k]=in1.dat[i][j][k]*in2.dat[i][j][k] for all i,j,k.
Input:
- in1, in2: pvectors
Add a function of the above prototype to the pvector class.
Note: This algebraic function gives a short-hand for the operation
(which appears in
density functional theory) so that we do not have to actually form the
(very large!) diagonal matrix
. With this notation, we can now code the above operation as
simply ``V*psi''.