/[escript]/trunk/downunder/py_src/datasources.py
ViewVC logotype

Diff of /trunk/downunder/py_src/datasources.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3985 by caltinay, Fri Sep 21 06:41:03 2012 UTC revision 3986 by caltinay, Sun Sep 23 23:01:10 2012 UTC
# Line 255  class DataSource(object): Line 255  class DataSource(object):
255    
256          # cell size / point spacing          # cell size / point spacing
257          self._spacing = DX+[dz]          self._spacing = DX+[dz]
258          self._spacing = [np.round(si) for si in self._spacing]          self._spacing = [float(np.round(si)) for si in self._spacing]
259    
260          # length of domain (without padding)          # length of domain (without padding)
261          l = [NE[i]*self._spacing[i] for i in xrange(len(NE))]          l = [NE[i]*self._spacing[i] for i in xrange(len(NE))]
# Line 276  class DataSource(object): Line 276  class DataSource(object):
276              dom=self.getDomainClass()(*self._dom_NE, l0=lo[0], l1=lo[1], l2=lo[2])              dom=self.getDomainClass()(*self._dom_NE, l0=lo[0], l1=lo[1], l2=lo[2])
277              # ripley may internally adjust NE and length, so recompute              # ripley may internally adjust NE and length, so recompute
278              self._dom_len=[sup(dom.getX()[i])-inf(dom.getX()[i]) for i in xrange(3)]              self._dom_len=[sup(dom.getX()[i])-inf(dom.getX()[i]) for i in xrange(3)]
279              self._dom_NE=[self._dom_len[i]/self._spacing[i] for i in xrange(3)]              self._dom_NE=[int(self._dom_len[i]/self._spacing[i]) for i in xrange(3)]
280              x=dom.getX()-[self._dom_origin[i]+NE_pad[i]*self._spacing[i] for i in xrange(3)]              x=dom.getX()-[self._dom_origin[i]+NE_pad[i]*self._spacing[i] for i in xrange(3)]
281              mask=wherePositive(dom.getX()[2])              mask=wherePositive(dom.getX()[2])
282    

Legend:
Removed from v.3985  
changed lines
  Added in v.3986

  ViewVC Help
Powered by ViewVC 1.1.26