| 229 | Upper mesh bound. |
| 230 | """ |
| 231 | def __init__(self, function, x_min, x_max, n_pts=100, name=''): |
| 232 | assert callable(function), "function is not callable" |
| 233 | self.function,self.x_min,self.x_max = function,x_min,x_max |
| 234 | try : |
| 235 | e = function(0.001) |
| 236 | len(numpy.array(e).shape) ==1 |
| 237 | except : |
| 238 | raise RuntimeError("Value of the function must be a 1d-array") |
| 239 | self.__f(n_pts) # compute arrays |
| 240 | DOS.__init__(self,self.eps,self.rho,name) |
| 241 | |
| 242 | #------------------------------------------------------------- |
| 243 | |