def initMat(self): # Initialize the matrices self.D2mat, self.Smat = FEM.D2mat(self.grid), FEM.Smat(self.grid) #self.Lm=1.0/self.grid.x**2 #self.L2mat = [FEM.Vmat(self.grid,ii*(ii+1)/2.0*self.Lm) for ii in range(self.Lmax)] #self.VZ = self.Z/self.grid.x self.L2mat=[FEM.Lmat(self.grid,ii) for ii in range(self.Lmax)] self.hartree() self.xc=excorr.xc(self) self.VHmat = FEM.Vmat(self.grid,self.VH) #self.VZmat = -FEM.Vmat(self.grid,self.VZ) self.VZmat = -FEM.Zmat(self.grid,self.Z) self.Vxcmat = [FEM.Vmat(self.grid,Vxc) for Vxc in self.Vxc]
def updateMat(self): # Initialize the matrices self.hartree() self.xc=excorr.xc(self) self.VHmat = FEM.Vmat(self.grid,self.VH) self.Vxcmat = [FEM.Vmat(self.grid,self.Vxc[ii]) for ii in range(self.spin)]