示例#1
0
    def __init__(self, z1, z2, **kwargs):
        """Put the positive background charge where z1 < z < z2.

        z1: float
            Position of lower surface in Angstrom units.
        z2: float
            Position of upper surface in Angstrom units."""
        
        PoissonSolver.__init__(self, **kwargs)
        self.z1 = (z1 - 0.0001)  / Bohr
        self.z2 = (z2 - 0.0001) / Bohr
示例#2
0
 def __init__(self, k2=0.0, nn='M', relax='GS', eps=2e-10):
     assert k2 <= 0, 'Currently only defined for k^2<=0'
     PoissonSolver.__init__(self, nn, relax, eps)
     self.k2 = k2