Ejemplo n.º 1
0
 def initialize(self, wfs):
     if wfs.bd.comm.size > 1:
         raise ValueError('CG eigensolver does not support band '
                          'parallelization.  This calculation parallelizes '
                          'over %d band groups.' % wfs.bd.comm.size)
     Eigensolver.initialize(self, wfs)
     self.overlap = wfs.overlap
Ejemplo n.º 2
0
 def initialize(self, wfs):
     if wfs.bd.comm.size > 1:
         raise ValueError('CG eigensolver does not support band '
                          'parallelization.  This calculation parallelizes '
                          'over %d band groups.' % wfs.bd.comm.size)
     Eigensolver.initialize(self, wfs)
     self.overlap = wfs.overlap
Ejemplo n.º 3
0
 def initialize(self, wfs):
     if self.blocksize is None:
         if wfs.mode == 'pw':
             S = wfs.pd.comm.size
             # Use a multiple of S for maximum efficiency
             self.blocksize = int(np.ceil(10 / S)) * S
         else:
             self.blocksize = 10
     Eigensolver.initialize(self, wfs)
Ejemplo n.º 4
0
    def initialize(self, wfs):
        Eigensolver.initialize(self, wfs)

        if wfs.gd.comm.rank == 0 and wfs.bd.comm.rank == 0:
            # Allocate arrays
            B = self.nbands
            self.H_NN = np.empty((2 * B, 2 * B), self.dtype)
            self.S_NN = np.empty((2 * B, 2 * B), self.dtype)
            self.eps_N = np.empty(2 * B)
Ejemplo n.º 5
0
    def initialize(self, wfs):

        Eigensolver.initialize(self, wfs)
        self.overlap = wfs.overlap

        # Allocate arrays
        self.H_2n2n = np.empty((2 * self.nbands, 2 * self.nbands), self.dtype)
        self.S_2n2n = np.empty((2 * self.nbands, 2 * self.nbands), self.dtype)
        self.eps_2n = np.empty(2 * self.nbands)
Ejemplo n.º 6
0
 def initialize(self, wfs):
     Eigensolver.initialize(self, wfs)
     self.overlap = wfs.overlap
     # Allocate arrays
     self.H_nn = np.zeros((self.nbands, self.nbands), self.dtype)
     self.S_nn = np.zeros((self.nbands, self.nbands), self.dtype)
     self.H_2n2n = np.empty((2 * self.nbands, 2 * self.nbands),
                             self.dtype)
     self.S_2n2n = np.empty((2 * self.nbands, 2 * self.nbands),
                             self.dtype)        
     self.eps_2n = np.empty(2 * self.nbands)
Ejemplo n.º 7
0
 def initialize(self, wfs):
     if wfs.bd.comm.size > 1:
         raise ValueError('Davidson eigensolver does not support band '
                          'parallelization.  This calculation parallelizes '
                          'over %d band groups.' % wfs.bd.comm.size)
     Eigensolver.initialize(self, wfs)
     self.overlap = wfs.overlap
     # Allocate arrays
     self.H_nn = np.zeros((self.nbands, self.nbands), self.dtype)
     self.S_nn = np.zeros((self.nbands, self.nbands), self.dtype)
     self.H_2n2n = np.empty((2 * self.nbands, 2 * self.nbands), self.dtype)
     self.S_2n2n = np.empty((2 * self.nbands, 2 * self.nbands), self.dtype)
     self.eps_2n = np.empty(2 * self.nbands)
Ejemplo n.º 8
0
 def initialize(self, wfs):
     if wfs.bd.comm.size > 1:
         raise ValueError(
             "Davidson eigensolver does not support band "
             "parallelization.  This calculation parallelizes "
             "over %d band groups." % wfs.bd.comm.size
         )
     Eigensolver.initialize(self, wfs)
     self.overlap = wfs.overlap
     # Allocate arrays
     self.H_nn = np.zeros((self.nbands, self.nbands), self.dtype)
     self.S_nn = np.zeros((self.nbands, self.nbands), self.dtype)
     self.H_2n2n = np.empty((2 * self.nbands, 2 * self.nbands), self.dtype)
     self.S_2n2n = np.empty((2 * self.nbands, 2 * self.nbands), self.dtype)
     self.eps_2n = np.empty(2 * self.nbands)
Ejemplo n.º 9
0
 def initialize(self, wfs):
     Eigensolver.initialize(self, wfs)
     self.overlap = wfs.overlap
     # Allocate arrays
     self.phi_G = self.gd.empty(dtype=self.dtype)
     self.phi_old_G = self.gd.empty(dtype=self.dtype)