/[escript]/trunk/escript/test/python/test_objects.py
ViewVC logotype

Diff of /trunk/escript/test/python/test_objects.py

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

revision 2652 by jfenwick, Mon Sep 7 03:38:50 2009 UTC revision 2653 by jfenwick, Tue Sep 8 04:26:30 2009 UTC
# Line 322  class Test_Domain(unittest.TestCase): Line 322  class Test_Domain(unittest.TestCase):
322          if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)          if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)
323          if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)          if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)
324     #===========================================================================     #===========================================================================
325    
326    class Test_GlobalMinMax(unittest.TestCase):
327       def test_GlobalMinMax(self):
328        myrank=getMPIRankWorld()
329        d=Data(myrank,Function(self.domain))
330        minproc=inf(d)
331        maxproc=sup(d)      #This tells us where to expect values to be
332        if d.getNumberOfDataPoints()>0:
333            d.setValueOfDataPoint(0,myrank-0.001);
334        p,n=d.minGlobalDataPoint()
335        self.failUnless(p==minproc,"Incorrect process indentified as holding min")
336        self.failUnless(n==0,"Incorrect position for min")
337        if d.getNumberOfDataPoints()>0:
338            d.setValueOfDataPoint(0,myrank+0.001)
339        p,n=d.maxGlobalDataPoint()  
340        self.failUnless(p==maxproc,"Incorrect process indentified as holding min")
341        self.failUnless(n==0,"Incorrect position for min")
342    
343        
344    
345  class Test_SetDataPointValue(unittest.TestCase):  class Test_SetDataPointValue(unittest.TestCase):
346     arg0=9.81     arg0=9.81
347     arg1=numpy.array([3.098, -3.111])     arg1=numpy.array([3.098, -3.111])

Legend:
Removed from v.2652  
changed lines
  Added in v.2653

  ViewVC Help
Powered by ViewVC 1.1.26