def test_getHeatCapacity(self): """ Test the getHeatCapacity() method. """ Tlist = numpy.array([300,500,1000,1500,2000]) Cvexplist = numpy.array([1, 1, 1, 1, 1]) for T, Cvexp in zip(Tlist, Cvexplist): Cvact = getHeatCapacity(T, self.energy, self.degeneracy, self.n0) self.assertAlmostEqual(Cvexp / Cvact, 1.0, 4, '{0} != {1} within 4 figures'.format(Cvexp, Cvact))
def getHeatCapacity(self, T): return schrodinger.getHeatCapacity(T,self.energy,nmax=len(self.evals))