示例#1
0
 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))
示例#2
0
 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))
示例#3
0
 def getHeatCapacity(self, T):
     return schrodinger.getHeatCapacity(T,self.energy,nmax=len(self.evals))