/[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 1855 by ksteube, Thu Sep 25 06:43:44 2008 UTC revision 1856 by gross, Tue Oct 7 07:10:47 2008 UTC
# Line 362  class Test_Dump(unittest.TestCase): Line 362  class Test_Dump(unittest.TestCase):
362     arg3=numarray.array([[[-2.3667, -0.040], [-4.7398, -3.2412]], [[-2.125, -2.240], [2.237, -4.279]], [[0.68720, 2.4059], [-2.4964, 3.17453]], [[-4.907, -4.9431], [-0.3604, 0.4269]], [[1.4179, 3.326], [1.356, -0.4610]], [[3.378, 2.0902], [-2.6857, 1.3585]]])     arg3=numarray.array([[[-2.3667, -0.040], [-4.7398, -3.2412]], [[-2.125, -2.240], [2.237, -4.279]], [[0.68720, 2.4059], [-2.4964, 3.17453]], [[-4.907, -4.9431], [-0.3604, 0.4269]], [[1.4179, 3.326], [1.356, -0.4610]], [[3.378, 2.0902], [-2.6857, 1.3585]]])
363     arg4=numarray.array([[[[-3.810, -1.3597, -1.5307, 1.099], [-1.828, 0.2526, -1.4429, 2.326], [4.9732, -2.063, 1.3153, -3.809]], [[-4.8902, -4.714, 1.520, -1.931], [-3.8847, 4.3867, 1.894030, 2.432], [-1.2082, -0.8304, 2.2612, 4.6399]]], [[[-4.5922, -3.309, -0.8171, -0.7210], [2.8051, -4.93047, 0.08450, 4.3824], [0.43204, 2.1908, 4.512633, -1.8218]], [[2.2493, -4.190, -2.3893, -4.147], [-2.104, -4.635, -4.2767, -3.53151], [-2.351, -1.6614, 2.9385, 4.099]]], [[[1.710, 0.2235, -3.4917, 0.8713], [-0.2881, 4.6278, 3.603, -2.1211], [-0.565, 4.294, -2.210827, -0.37651]], [[0.6578, -2.869, -2.490, -4.789], [3.232, 2.483, 0.9531, 2.260], [-1.785, 0.42156, -1.8379, 4.212]]]])     arg4=numarray.array([[[[-3.810, -1.3597, -1.5307, 1.099], [-1.828, 0.2526, -1.4429, 2.326], [4.9732, -2.063, 1.3153, -3.809]], [[-4.8902, -4.714, 1.520, -1.931], [-3.8847, 4.3867, 1.894030, 2.432], [-1.2082, -0.8304, 2.2612, 4.6399]]], [[[-4.5922, -3.309, -0.8171, -0.7210], [2.8051, -4.93047, 0.08450, 4.3824], [0.43204, 2.1908, 4.512633, -1.8218]], [[2.2493, -4.190, -2.3893, -4.147], [-2.104, -4.635, -4.2767, -3.53151], [-2.351, -1.6614, 2.9385, 4.099]]], [[[1.710, 0.2235, -3.4917, 0.8713], [-0.2881, 4.6278, 3.603, -2.1211], [-0.565, 4.294, -2.210827, -0.37651]], [[0.6578, -2.869, -2.490, -4.789], [3.232, 2.483, 0.9531, 2.260], [-1.785, 0.42156, -1.8379, 4.212]]]])
364    
365     def _diffDataObjects(self,d_ref,filemame):     def _diffDataObjects(self,d_ref,filemame, use_old_file=False):
366         d_ref.dump(filemame)         if not use_old_file: d_ref.dump(filemame)
367         d=load(filemame, self.domain)         d=load(filemame, self.domain)
368         self.failUnless(not d.isEmpty(),"data in %s are empty."%filemame)         self.failUnless(not d.isEmpty(),"data in %s are empty."%filemame)
369         self.failUnless(d_ref.getFunctionSpace() == d.getFunctionSpace(), "wrong function space in %s."%filemame)         self.failUnless(d_ref.getFunctionSpace() == d.getFunctionSpace(), "wrong function space in %s."%filemame)
# Line 583  class Test_Dump(unittest.TestCase): Line 583  class Test_Dump(unittest.TestCase):
583     def test_DumpAndLoad_Expanded_Solution_Rank0(self):     def test_DumpAndLoad_Expanded_Solution_Rank0(self):
584         if loadIsConfigured():         if loadIsConfigured():
585            filemame=os.path.join(self.filename_base,"expanded_solution_rank0.nc")            filemame=os.path.join(self.filename_base,"expanded_solution_rank0.nc")
586              d=Data(length(Solution(self.domain).getX())*self.arg0,Solution(self.domain))
587            self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)            self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
588            self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)            self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
589            self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)            if getMPISizeWorld() ==1:
590            d=Data(length(Solution(self.domain).getX())*self.arg0,Solution(self.domain))               d=Data(length(Solution(self.domain_with_different_sample_ordering).getX())*self.arg0,Solution(self.domain_with_different_sample_ordering))
591            self._diffDataObjects(d,filemame)               self._diffDataObjects(d,filemame, use_old_file=True)
592    
593     def test_DumpAndLoad_Expanded_Solution_Rank1(self):     def test_DumpAndLoad_Expanded_Solution_Rank1(self):
594         if loadIsConfigured():         if loadIsConfigured():
595            filemame=os.path.join(self.filename_base,"expanded_solution_rank1.nc")            filemame=os.path.join(self.filename_base,"expanded_solution_rank1.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
596            d=Data(length(Solution(self.domain).getX())*self.arg1,Solution(self.domain))            d=Data(length(Solution(self.domain).getX())*self.arg1,Solution(self.domain))
597            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
598              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
599              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
600              if getMPISizeWorld() ==1:
601                 d=Data(length(Solution(self.domain_with_different_sample_ordering).getX())*self.arg1,Solution(self.domain_with_different_sample_ordering))
602                 self._diffDataObjects(d,filemame, use_old_file=True)
603    
604     def test_DumpAndLoad_Expanded_Solution_Rank2(self):     def test_DumpAndLoad_Expanded_Solution_Rank2(self):
605         if loadIsConfigured():         if loadIsConfigured():
606            filemame=os.path.join(self.filename_base,"expanded_solution_rank2.nc")            filemame=os.path.join(self.filename_base,"expanded_solution_rank2.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
607            d=Data(length(Solution(self.domain).getX())*self.arg2,Solution(self.domain))            d=Data(length(Solution(self.domain).getX())*self.arg2,Solution(self.domain))
608            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
609              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
610              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
611              if getMPISizeWorld() ==1:
612                 d=Data(length(Solution(self.domain_with_different_sample_ordering).getX())*self.arg2,Solution(self.domain_with_different_sample_ordering))
613                 self._diffDataObjects(d,filemame, use_old_file=True)
614    
615     def test_DumpAndLoad_Expanded_Solution_Rank3(self):     def test_DumpAndLoad_Expanded_Solution_Rank3(self):
616         if loadIsConfigured():         if loadIsConfigured():
617            filemame=os.path.join(self.filename_base,"expanded_solution_rank3.nc")            filemame=os.path.join(self.filename_base,"expanded_solution_rank3.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
618            d=Data(length(Solution(self.domain).getX())*self.arg3,Solution(self.domain))            d=Data(length(Solution(self.domain).getX())*self.arg3,Solution(self.domain))
619            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
620              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
621              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
622              if getMPISizeWorld() ==1:
623                 d=Data(length(Solution(self.domain_with_different_sample_ordering).getX())*self.arg3,Solution(self.domain_with_different_sample_ordering))
624                 self._diffDataObjects(d,filemame, use_old_file=True)
625    
626     def test_DumpAndLoad_Expanded_Solution_Rank4(self):     def test_DumpAndLoad_Expanded_Solution_Rank4(self):
627         if loadIsConfigured():         if loadIsConfigured():
628            filemame=os.path.join(self.filename_base,"expanded_solution_rank4.nc")            filemame=os.path.join(self.filename_base,"expanded_solution_rank4.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
629            d=Data(length(Solution(self.domain).getX())*self.arg4,Solution(self.domain))            d=Data(length(Solution(self.domain).getX())*self.arg4,Solution(self.domain))
630            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
631              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
632              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
633              if getMPISizeWorld() ==1:
634                 d=Data(length(Solution(self.domain_with_different_sample_ordering).getX())*self.arg4,Solution(self.domain_with_different_sample_ordering))
635                 self._diffDataObjects(d,filemame, use_old_file=True)
636     #===========================================================================     #===========================================================================
637     def test_DumpAndLoad_Expanded_ReducedSolution_Rank0(self):     def test_DumpAndLoad_Expanded_ReducedSolution_Rank0(self):
638         if loadIsConfigured():         if loadIsConfigured():
639            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank0.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank0.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
640            d=Data(length(ReducedSolution(self.domain).getX())*self.arg0,ReducedSolution(self.domain))            d=Data(length(ReducedSolution(self.domain).getX())*self.arg0,ReducedSolution(self.domain))
641            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
642              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
643              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
644              if getMPISizeWorld() ==1:
645                 d=Data(length(ReducedSolution(self.domain_with_different_sample_ordering).getX())*self.arg0,ReducedSolution(self.domain_with_different_sample_ordering))
646                 self._diffDataObjects(d,filemame, use_old_file=True)
647    
648     def test_DumpAndLoad_Expanded_ReducedSolution_Rank1(self):     def test_DumpAndLoad_Expanded_ReducedSolution_Rank1(self):
649         if loadIsConfigured():         if loadIsConfigured():
650            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank1.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank1.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
651            d=Data(length(ReducedSolution(self.domain).getX())*self.arg1,ReducedSolution(self.domain))            d=Data(length(ReducedSolution(self.domain).getX())*self.arg1,ReducedSolution(self.domain))
652            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
653              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
654              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
655              if getMPISizeWorld() ==1:
656                 d=Data(length(ReducedSolution(self.domain_with_different_sample_ordering).getX())*self.arg1,ReducedSolution(self.domain_with_different_sample_ordering))
657                 self._diffDataObjects(d,filemame, use_old_file=True)
658    
659     def test_DumpAndLoad_Expanded_ReducedSolution_Rank2(self):     def test_DumpAndLoad_Expanded_ReducedSolution_Rank2(self):
660         if loadIsConfigured():         if loadIsConfigured():
661            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank2.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank2.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
662            d=Data(length(ReducedSolution(self.domain).getX())*self.arg2,ReducedSolution(self.domain))            d=Data(length(ReducedSolution(self.domain).getX())*self.arg2,ReducedSolution(self.domain))
663            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
664              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
665              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
666              if getMPISizeWorld() ==1:
667                 d=Data(length(ReducedSolution(self.domain_with_different_sample_ordering).getX())*self.arg2,ReducedSolution(self.domain_with_different_sample_ordering))
668                 self._diffDataObjects(d,filemame, use_old_file=True)
669    
670     def test_DumpAndLoad_Expanded_ReducedSolution_Rank3(self):     def test_DumpAndLoad_Expanded_ReducedSolution_Rank3(self):
671         if loadIsConfigured():         if loadIsConfigured():
672            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank3.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank3.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
673            d=Data(length(ReducedSolution(self.domain).getX())*self.arg3,ReducedSolution(self.domain))            d=Data(length(ReducedSolution(self.domain).getX())*self.arg3,ReducedSolution(self.domain))
674            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
675              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
676              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
677              if getMPISizeWorld() ==1:
678                 d=Data(length(ReducedSolution(self.domain_with_different_sample_ordering).getX())*self.arg3,ReducedSolution(self.domain_with_different_sample_ordering))
679                 self._diffDataObjects(d,filemame, use_old_file=True)
680    
681     def test_DumpAndLoad_Expanded_ReducedSolution_Rank4(self):     def test_DumpAndLoad_Expanded_ReducedSolution_Rank4(self):
682         if loadIsConfigured():         if loadIsConfigured():
683            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank4.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank4.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
684            d=Data(length(ReducedSolution(self.domain).getX())*self.arg4,ReducedSolution(self.domain))            d=Data(length(ReducedSolution(self.domain).getX())*self.arg4,ReducedSolution(self.domain))
685            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
686              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
687              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
688              if getMPISizeWorld() ==1:
689                 d=Data(length(ReducedSolution(self.domain_with_different_sample_ordering).getX())*self.arg4,ReducedSolution(self.domain_with_different_sample_ordering))
690                 self._diffDataObjects(d,filemame, use_old_file=True)
691     #===========================================================================     #===========================================================================
692     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank0(self):     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank0(self):
693         if loadIsConfigured():         if loadIsConfigured():
694            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank0.nc")            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank0.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
695            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg0,ContinuousFunction(self.domain))            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg0,ContinuousFunction(self.domain))
696            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
697              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
698              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
699              if getMPISizeWorld() ==1:
700                 d=Data(length(ContinuousFunction(self.domain_with_different_sample_ordering).getX())*self.arg0,ContinuousFunction(self.domain_with_different_sample_ordering))
701                 self._diffDataObjects(d,filemame, use_old_file=True)
702    
703     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank1(self):     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank1(self):
704         if loadIsConfigured():         if loadIsConfigured():
705            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank1.nc")            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank1.nc")
706            self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)            self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
707            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg1,ContinuousFunction(self.domain))            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg1,ContinuousFunction(self.domain))
708            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
709              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
710              if getMPISizeWorld() ==1:
711                 d=Data(length(ContinuousFunction(self.domain_with_different_sample_ordering).getX())*self.arg1,ContinuousFunction(self.domain_with_different_sample_ordering))
712                 self._diffDataObjects(d,filemame, use_old_file=True)
713    
714     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank2(self):     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank2(self):
715         if loadIsConfigured():         if loadIsConfigured():
716            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank2.nc")            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank2.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
717            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg2,ContinuousFunction(self.domain))            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg2,ContinuousFunction(self.domain))
718            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
719              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
720              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
721              if getMPISizeWorld() ==1:
722                 d=Data(length(ContinuousFunction(self.domain_with_different_sample_ordering).getX())*self.arg2,ContinuousFunction(self.domain_with_different_sample_ordering))
723                 self._diffDataObjects(d,filemame, use_old_file=True)
724    
725     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank3(self):     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank3(self):
726         if loadIsConfigured():         if loadIsConfigured():
727            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank3.nc")            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank3.nc")
728            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg3,ContinuousFunction(self.domain))            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg3,ContinuousFunction(self.domain))
729            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
730              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
731              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
732              if getMPISizeWorld() ==1:
733                 d=Data(length(ContinuousFunction(self.domain_with_different_sample_ordering).getX())*self.arg3,ContinuousFunction(self.domain_with_different_sample_ordering))
734                 self._diffDataObjects(d,filemame, use_old_file=True)
735    
736     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank4(self):     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank4(self):
737         if loadIsConfigured():         if loadIsConfigured():
738            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank4.nc")            filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank4.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
739            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg4,ContinuousFunction(self.domain))            d=Data(length(ContinuousFunction(self.domain).getX())*self.arg4,ContinuousFunction(self.domain))
740            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
741              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
742              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
743              if getMPISizeWorld() ==1:
744                 d=Data(length(ContinuousFunction(self.domain_with_different_sample_ordering).getX())*self.arg4,ContinuousFunction(self.domain_with_different_sample_ordering))
745                 self._diffDataObjects(d,filemame, use_old_file=True)
746    
747     #===========================================================================     #===========================================================================
748     def test_DumpAndLoad_Expanded_Function_Rank0(self):     def test_DumpAndLoad_Expanded_Function_Rank0(self):
749         if loadIsConfigured():         if loadIsConfigured():
750            filemame=os.path.join(self.filename_base,"expanded_function_rank0.nc")            filemame=os.path.join(self.filename_base,"expanded_function_rank0.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
751            d=Data(length(Function(self.domain).getX())*self.arg0,Function(self.domain))            d=Data(length(Function(self.domain).getX())*self.arg0,Function(self.domain))
752            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
753              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
754              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
755              if getMPISizeWorld() ==1:
756                 d=Data(length(Function(self.domain_with_different_sample_ordering).getX())*self.arg0,Function(self.domain_with_different_sample_ordering))
757                 self._diffDataObjects(d,filemame, use_old_file=True)
758    
759     def test_DumpAndLoad_Expanded_Function_Rank1(self):     def test_DumpAndLoad_Expanded_Function_Rank1(self):
760         if loadIsConfigured():         if loadIsConfigured():
761            filemame=os.path.join(self.filename_base,"expanded_function_rank1.nc")            filemame=os.path.join(self.filename_base,"expanded_function_rank1.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
762            d=Data(length(Function(self.domain).getX())*self.arg1,Function(self.domain))            d=Data(length(Function(self.domain).getX())*self.arg1,Function(self.domain))
763            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
764              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
765              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
766              if getMPISizeWorld() ==1:
767                 d=Data(length(Function(self.domain_with_different_sample_ordering).getX())*self.arg1,Function(self.domain_with_different_sample_ordering))
768                 self._diffDataObjects(d,filemame, use_old_file=True)
769    
770     def test_DumpAndLoad_Expanded_Function_Rank2(self):     def test_DumpAndLoad_Expanded_Function_Rank2(self):
771         if loadIsConfigured():         if loadIsConfigured():
772            filemame=os.path.join(self.filename_base,"expanded_function_rank2.nc")            filemame=os.path.join(self.filename_base,"expanded_function_rank2.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
773            d=Data(length(Function(self.domain).getX())*self.arg2,Function(self.domain))            d=Data(length(Function(self.domain).getX())*self.arg2,Function(self.domain))
774            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
775              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
776              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
777              if getMPISizeWorld() ==1:
778                 d=Data(length(Function(self.domain_with_different_sample_ordering).getX())*self.arg2,Function(self.domain_with_different_sample_ordering))
779                 self._diffDataObjects(d,filemame, use_old_file=True)
780    
781     def test_DumpAndLoad_Expanded_Function_Rank3(self):     def test_DumpAndLoad_Expanded_Function_Rank3(self):
782         if loadIsConfigured():         if loadIsConfigured():
783            filemame=os.path.join(self.filename_base,"expanded_function_rank3.nc")            filemame=os.path.join(self.filename_base,"expanded_function_rank3.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
784            d=Data(length(Function(self.domain).getX())*self.arg3,Function(self.domain))            d=Data(length(Function(self.domain).getX())*self.arg3,Function(self.domain))
785            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
786              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
787              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
788              if getMPISizeWorld() ==1:
789                 d=Data(length(Function(self.domain_with_different_sample_ordering).getX())*self.arg3,Function(self.domain_with_different_sample_ordering))
790                 self._diffDataObjects(d,filemame, use_old_file=True)
791    
792     def test_DumpAndLoad_Expanded_Function_Rank4(self):     def test_DumpAndLoad_Expanded_Function_Rank4(self):
793         if loadIsConfigured():         if loadIsConfigured():
794            filemame=os.path.join(self.filename_base,"expanded_function_rank4.nc")            filemame=os.path.join(self.filename_base,"expanded_function_rank4.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
795            d=Data(length(Function(self.domain).getX())*self.arg4,Function(self.domain))            d=Data(length(Function(self.domain).getX())*self.arg4,Function(self.domain))
796            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
797              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
798              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
799              if getMPISizeWorld() ==1:
800                 d=Data(length(Function(self.domain_with_different_sample_ordering).getX())*self.arg4,Function(self.domain_with_different_sample_ordering))
801                 self._diffDataObjects(d,filemame, use_old_file=True)
802    
803     #===========================================================================     #===========================================================================
804     def test_DumpAndLoad_Expanded_ReducedFunction_Rank0(self):     def test_DumpAndLoad_Expanded_ReducedFunction_Rank0(self):
805         if loadIsConfigured():         if loadIsConfigured():
806            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank0.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank0.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
807            d=Data(length(ReducedFunction(self.domain).getX())*self.arg0,ReducedFunction(self.domain))            d=Data(length(ReducedFunction(self.domain).getX())*self.arg0,ReducedFunction(self.domain))
808            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
809              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
810              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
811              if getMPISizeWorld() ==1:
812                 d=Data(length(ReducedFunction(self.domain_with_different_sample_ordering).getX())*self.arg0,ReducedFunction(self.domain_with_different_sample_ordering))
813                 self._diffDataObjects(d,filemame, use_old_file=True)
814    
815     def test_DumpAndLoad_Expanded_ReducedFunction_Rank1(self):     def test_DumpAndLoad_Expanded_ReducedFunction_Rank1(self):
816         if loadIsConfigured():         if loadIsConfigured():
817            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank1.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank1.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
818            d=Data(length(ReducedFunction(self.domain).getX())*self.arg1,ReducedFunction(self.domain))            d=Data(length(ReducedFunction(self.domain).getX())*self.arg1,ReducedFunction(self.domain))
819            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
820              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
821              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
822              if getMPISizeWorld() ==1:
823                 d=Data(length(ReducedFunction(self.domain_with_different_sample_ordering).getX())*self.arg1,ReducedFunction(self.domain_with_different_sample_ordering))
824                 self._diffDataObjects(d,filemame, use_old_file=True)
825    
826     def test_DumpAndLoad_Expanded_ReducedFunction_Rank2(self):     def test_DumpAndLoad_Expanded_ReducedFunction_Rank2(self):
827         if loadIsConfigured():         if loadIsConfigured():
828            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank2.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank2.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
829            d=Data(length(ReducedFunction(self.domain).getX())*self.arg2,ReducedFunction(self.domain))            d=Data(length(ReducedFunction(self.domain).getX())*self.arg2,ReducedFunction(self.domain))
830            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
831              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
832              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
833              if getMPISizeWorld() ==1:
834                 d=Data(length(ReducedFunction(self.domain_with_different_sample_ordering).getX())*self.arg2,ReducedFunction(self.domain_with_different_sample_ordering))
835                 self._diffDataObjects(d,filemame, use_old_file=True)
836    
837     def test_DumpAndLoad_Expanded_ReducedFunction_Rank3(self):     def test_DumpAndLoad_Expanded_ReducedFunction_Rank3(self):
838         if loadIsConfigured():         if loadIsConfigured():
839            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank3.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank3.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
840            d=Data(length(ReducedFunction(self.domain).getX())*self.arg3,ReducedFunction(self.domain))            d=Data(length(ReducedFunction(self.domain).getX())*self.arg3,ReducedFunction(self.domain))
841            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
842              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
843              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
844              if getMPISizeWorld() ==1:
845                 d=Data(length(ReducedFunction(self.domain_with_different_sample_ordering).getX())*self.arg3,ReducedFunction(self.domain_with_different_sample_ordering))
846                 self._diffDataObjects(d,filemame, use_old_file=True)
847    
848     def test_DumpAndLoad_Expanded_ReducedFunction_Rank4(self):     def test_DumpAndLoad_Expanded_ReducedFunction_Rank4(self):
849         if loadIsConfigured():         if loadIsConfigured():
850            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank4.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank4.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
851            d=Data(length(ReducedFunction(self.domain).getX())*self.arg4,ReducedFunction(self.domain))            d=Data(length(ReducedFunction(self.domain).getX())*self.arg4,ReducedFunction(self.domain))
852            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
853              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
854              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
855              if getMPISizeWorld() ==1:
856                 d=Data(length(ReducedFunction(self.domain_with_different_sample_ordering).getX())*self.arg4,ReducedFunction(self.domain_with_different_sample_ordering))
857                 self._diffDataObjects(d,filemame, use_old_file=True)
858    
859     #===========================================================================     #===========================================================================
860     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank0(self):     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank0(self):
861         if loadIsConfigured():         if loadIsConfigured():
862            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank0.nc")            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank0.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
863            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg0,FunctionOnBoundary(self.domain))            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg0,FunctionOnBoundary(self.domain))
864            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
865              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
866              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
867              if getMPISizeWorld() ==1:
868                 d=Data(length(FunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg0,FunctionOnBoundary(self.domain_with_different_sample_ordering))
869                 self._diffDataObjects(d,filemame, use_old_file=True)
870    
871     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank1(self):     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank1(self):
872         if loadIsConfigured():         if loadIsConfigured():
873            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank1.nc")            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank1.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
874            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg1,FunctionOnBoundary(self.domain))            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg1,FunctionOnBoundary(self.domain))
875            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
876              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
877              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
878              if getMPISizeWorld() ==1:
879                 d=Data(length(FunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg1,FunctionOnBoundary(self.domain_with_different_sample_ordering))
880                 self._diffDataObjects(d,filemame, use_old_file=True)
881    
882     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank2(self):     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank2(self):
883         if loadIsConfigured():         if loadIsConfigured():
884            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank2.nc")            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank2.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
885            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg2,FunctionOnBoundary(self.domain))            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg2,FunctionOnBoundary(self.domain))
886            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
887              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
888              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
889              if getMPISizeWorld() ==1:
890                 d=Data(length(FunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg2,FunctionOnBoundary(self.domain_with_different_sample_ordering))
891                 self._diffDataObjects(d,filemame, use_old_file=True)
892    
893     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank3(self):     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank3(self):
894         if loadIsConfigured():         if loadIsConfigured():
895            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank3.nc")            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank3.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
896            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg3,FunctionOnBoundary(self.domain))            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg3,FunctionOnBoundary(self.domain))
897            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
898              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
899              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
900              if getMPISizeWorld() ==1:
901                 d=Data(length(FunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg3,FunctionOnBoundary(self.domain_with_different_sample_ordering))
902                 self._diffDataObjects(d,filemame, use_old_file=True)
903    
904     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank4(self):     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank4(self):
905         if loadIsConfigured():         if loadIsConfigured():
906            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank4.nc")            filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank4.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
907            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg4,FunctionOnBoundary(self.domain))            d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg4,FunctionOnBoundary(self.domain))
908            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
909              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
910              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
911              if getMPISizeWorld() ==1:
912                 d=Data(length(FunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg4,FunctionOnBoundary(self.domain_with_different_sample_ordering))
913                 self._diffDataObjects(d,filemame, use_old_file=True)
914    
915     #===========================================================================     #===========================================================================
916     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank0(self):     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank0(self):
917         if loadIsConfigured():         if loadIsConfigured():
918            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank0.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank0.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
919            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg0,ReducedFunctionOnBoundary(self.domain))            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg0,ReducedFunctionOnBoundary(self.domain))
920            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
921              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
922              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
923              if getMPISizeWorld() ==1:
924                 d=Data(length(ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg0,ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering))
925                 self._diffDataObjects(d,filemame, use_old_file=True)
926    
927     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank1(self):     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank1(self):
928         if loadIsConfigured():         if loadIsConfigured():
929            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank1.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank1.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
930            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg1,ReducedFunctionOnBoundary(self.domain))            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg1,ReducedFunctionOnBoundary(self.domain))
931            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
932              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
933              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
934              if getMPISizeWorld() ==1:
935                 d=Data(length(ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg1,ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering))
936                 self._diffDataObjects(d,filemame, use_old_file=True)
937    
938     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank2(self):     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank2(self):
939         if loadIsConfigured():         if loadIsConfigured():
940            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank2.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank2.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
941            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg2,ReducedFunctionOnBoundary(self.domain))            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg2,ReducedFunctionOnBoundary(self.domain))
942            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
943              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
944              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
945              if getMPISizeWorld() ==1:
946                 d=Data(length(ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg2,ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering))
947                 self._diffDataObjects(d,filemame, use_old_file=True)
948    
949     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank3(self):     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank3(self):
950         if loadIsConfigured():         if loadIsConfigured():
951            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank3.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank3.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
952            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg3,ReducedFunctionOnBoundary(self.domain))            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg3,ReducedFunctionOnBoundary(self.domain))
953            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
954              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
955              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
956              if getMPISizeWorld() ==1:
957                 d=Data(length(ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg3,ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering))
958                 self._diffDataObjects(d,filemame, use_old_file=True)
959    
960     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank4(self):     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank4(self):
961         if loadIsConfigured():         if loadIsConfigured():
962            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank4.nc")            filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank4.nc")
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)  
           self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)  
963            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg4,ReducedFunctionOnBoundary(self.domain))            d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg4,ReducedFunctionOnBoundary(self.domain))
964            self._diffDataObjects(d,filemame)            self._diffDataObjects(d,filemame)
965              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
966              self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
967              if getMPISizeWorld() ==1:
968                 d=Data(length(ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering).getX())*self.arg4,ReducedFunctionOnBoundary(self.domain_with_different_sample_ordering))
969                 self._diffDataObjects(d,filemame, use_old_file=True)
970    
971     #===========================================================================     #===========================================================================
972     ## This functionspace does not currently support tags.     ## This functionspace does not currently support tags.

Legend:
Removed from v.1855  
changed lines
  Added in v.1856

  ViewVC Help
Powered by ViewVC 1.1.26