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

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

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

revision 2470 by gross, Thu Jun 11 08:32:32 2009 UTC revision 2474 by gross, Tue Jun 16 06:32:15 2009 UTC
# Line 67  class Test_LameEquation(Test_linearPDEs) Line 67  class Test_LameEquation(Test_linearPDEs)
67      def test_config(self):      def test_config(self):
68          mypde=LameEquation(self.domain,debug=self.DEBUG)          mypde=LameEquation(self.domain,debug=self.DEBUG)
69          d=self.domain.getDim()          d=self.domain.getDim()
70          self.failUnlessEqual((mypde.getNumEquations(),mypde.getNumSolutions(),mypde.isSymmetric()),(d,d,True),"set up incorrect")          self.failUnlessEqual((mypde.getNumEquations(), mypde.getNumSolutions(), mypde.getSolverOptions().isSymmetric()),(d,d,True),"set up incorrect")
71    
72      def test_setCoefficient_q(self):      def test_setCoefficient_q(self):
73          mypde=LameEquation(self.domain,debug=self.DEBUG)          mypde=LameEquation(self.domain,debug=self.DEBUG)
# Line 330  class Test_Helmholtz(Test_linearPDEs): Line 330  class Test_Helmholtz(Test_linearPDEs):
330    
331      def test_config(self):      def test_config(self):
332          mypde=Helmholtz(self.domain,debug=self.DEBUG)          mypde=Helmholtz(self.domain,debug=self.DEBUG)
333          self.failUnlessEqual((mypde.getNumEquations(),mypde.getNumSolutions(),mypde.isSymmetric()),(1,1,True),"set up incorrect")          self.failUnlessEqual((mypde.getNumEquations(), mypde.getNumSolutions(), mypde.getSolverOptions().isSymmetric()),(1,1,True),"set up incorrect")
334      def test_setCoefficient_q(self):      def test_setCoefficient_q(self):
335          mypde=Helmholtz(self.domain,debug=self.DEBUG)          mypde=Helmholtz(self.domain,debug=self.DEBUG)
336          x=self.domain.getX()          x=self.domain.getX()
# Line 526  class Test_Poisson(Test_linearPDEs): Line 526  class Test_Poisson(Test_linearPDEs):
526    
527      def test_config(self):      def test_config(self):
528          mypde=Poisson(self.domain,debug=self.DEBUG)          mypde=Poisson(self.domain,debug=self.DEBUG)
529          self.failUnlessEqual((mypde.getNumEquations(),mypde.getNumSolutions(),mypde.isSymmetric()),(1,1,True),"set up incorrect")          self.failUnlessEqual((mypde.getNumEquations(), mypde.getNumSolutions(), mypde.getSolverOptions().isSymmetric()),(1,1,True),"set up incorrect")
530      def test_setCoefficient_q(self):      def test_setCoefficient_q(self):
531          mypde=Poisson(self.domain,debug=self.DEBUG)          mypde=Poisson(self.domain,debug=self.DEBUG)
532          x=self.domain.getX()          x=self.domain.getX()
# Line 720  class Test_LinearPDE_noLumping(Test_line Line 720  class Test_LinearPDE_noLumping(Test_line
720          self.failUnless(so.getRestart() == 14, "Truncation is wrong.")          self.failUnless(so.getRestart() == 14, "Truncation is wrong.")
721          so.setRestart(None)          so.setRestart(None)
722          self.failUnless(so.getRestart() == None, "Truncation is wrong.")          self.failUnless(so.getRestart() == None, "Truncation is wrong.")
723            
724            self.failUnless(not so.isVerbose(), "initial verbosity flag is wrong.")
725            so.setVerbosityOn()
726            self.failUnless(so.isVerbose(), "verbosity (1) flag is wrong.")
727            so.setVerbosityOff()
728            self.failUnless(not so.isVerbose(), "verbosity (2) flag is wrong.")
729            so.setVerbosity(verbose=True)
730            self.failUnless(so.isVerbose(), "verbosity (3) flag is wrong.")
731            so.setVerbosity(verbose=False)
732            self.failUnless(not so.isVerbose(), "verbosity (4) flag is wrong.")
733    
734          self.failUnless(not so.isSymmetric(), "initial symmetry flag is wrong.")          self.failUnless(not so.isSymmetric(), "initial symmetry flag is wrong.")
735          so.setSymmetryOn()          so.setSymmetryOn()
736          self.failUnless(so.isSymmetric(), "symmetry (1) flag is wrong.")          self.failUnless(so.isSymmetric(), "symmetry (1) flag is wrong.")
# Line 924  class Test_LinearPDE_noLumping(Test_line Line 934  class Test_LinearPDE_noLumping(Test_line
934                    
935      def test_setCoefficient_WithIllegalFunctionSpace(self):      def test_setCoefficient_WithIllegalFunctionSpace(self):
936          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
937          self.failUnlessRaises(IllegalCoefficientFunctionSpace,mypde.setValue, C=Vector(0.,FunctionOnBoundary(self.domain)))          self.failUnlessRaises(IllegalCoefficientFunctionSpace, mypde.setValue, C=Vector(0.,FunctionOnBoundary(self.domain)))
938    
939      def test_setCoefficient_WithWrongName(self):      def test_setCoefficient_WithWrongName(self):
940          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
# Line 945  class Test_LinearPDE_noLumping(Test_line Line 955  class Test_LinearPDE_noLumping(Test_line
955      def test_attemptToChangeOrderAfterDefinedCoefficient(self):      def test_attemptToChangeOrderAfterDefinedCoefficient(self):
956          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
957          mypde.setValue(D=1.)          mypde.setValue(D=1.)
958          self.failUnlessRaises(RuntimeError,mypde.setReducedOrderOn)          self.failUnlessRaises(RuntimeError, mypde.setReducedOrderOn)
959    
960      def test_reducedOnConfig(self):      def test_reducedOnConfig(self):
961          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
962          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
963          self.failUnlessEqual((mypde.getFunctionSpaceForSolution(),mypde.getFunctionSpaceForEquation()),(ReducedSolution(self.domain),ReducedSolution(self.domain)),"reduced function spaces expected.")          self.failUnlessEqual((mypde.getFunctionSpaceForSolution(), mypde.getFunctionSpaceForEquation()),(ReducedSolution(self.domain),ReducedSolution(self.domain)),"reduced function spaces expected.")
964      #      #
965      #  set coefficients for scalars:      #  set coefficients for scalars:
966      #      #
# Line 959  class Test_LinearPDE_noLumping(Test_line Line 969  class Test_LinearPDE_noLumping(Test_line
969          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
970          mypde.setValue(A=numpy.ones((d,d)))          mypde.setValue(A=numpy.ones((d,d)))
971          coeff=mypde.getCoefficient("A")          coeff=mypde.getCoefficient("A")
972          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,d),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,d),Function(self.domain),1,1))
973      def test_setCoefficient_B_Scalar(self):      def test_setCoefficient_B_Scalar(self):
974          d=self.domain.getDim()          d=self.domain.getDim()
975          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
976          mypde.setValue(B=numpy.ones((d,)))          mypde.setValue(B=numpy.ones((d,)))
977          coeff=mypde.getCoefficient("B")          coeff=mypde.getCoefficient("B")
978          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),Function(self.domain),1,1))
979      def test_setCoefficient_C_Scalar(self):      def test_setCoefficient_C_Scalar(self):
980          d=self.domain.getDim()          d=self.domain.getDim()
981          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
982          mypde.setValue(C=numpy.ones((d,)))          mypde.setValue(C=numpy.ones((d,)))
983          coeff=mypde.getCoefficient("C")          coeff=mypde.getCoefficient("C")
984          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),Function(self.domain),1,1))
985      def test_setCoefficient_D_Scalar(self):      def test_setCoefficient_D_Scalar(self):
986          d=self.domain.getDim()          d=self.domain.getDim()
987          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
988          mypde.setValue(D=1.)          mypde.setValue(D=1.)
989          coeff=mypde.getCoefficient("D")          coeff=mypde.getCoefficient("D")
990          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),Function(self.domain),1,1))
991      def test_setCoefficient_X_Scalar(self):      def test_setCoefficient_X_Scalar(self):
992          d=self.domain.getDim()          d=self.domain.getDim()
993          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
994          mypde.setValue(X=numpy.ones((d,)))          mypde.setValue(X=numpy.ones((d,)))
995          coeff=mypde.getCoefficient("X")          coeff=mypde.getCoefficient("X")
996          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((d,),Function(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((d,),Function(self.domain),1))
997      def test_setCoefficient_Y_Scalar(self):      def test_setCoefficient_Y_Scalar(self):
998          d=self.domain.getDim()          d=self.domain.getDim()
999          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1000          mypde.setValue(Y=1.)          mypde.setValue(Y=1.)
1001          coeff=mypde.getCoefficient("Y")          coeff=mypde.getCoefficient("Y")
1002          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),Function(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),Function(self.domain),1))
1003      def test_setCoefficient_y_Scalar(self):      def test_setCoefficient_y_Scalar(self):
1004          d=self.domain.getDim()          d=self.domain.getDim()
1005          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1006          mypde.setValue(y=1.)          mypde.setValue(y=1.)
1007          coeff=mypde.getCoefficient("y")          coeff=mypde.getCoefficient("y")
1008          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1))
1009      def test_setCoefficient_d_Scalar(self):      def test_setCoefficient_d_Scalar(self):
1010          d=self.domain.getDim()          d=self.domain.getDim()
1011          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1012          mypde.setValue(d=1.)          mypde.setValue(d=1.)
1013          coeff=mypde.getCoefficient("d")          coeff=mypde.getCoefficient("d")
1014          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1,1))
1015      def test_setCoefficient_d_contact_Scalar(self):      def test_setCoefficient_d_contact_Scalar(self):
1016          d=self.domain.getDim()          d=self.domain.getDim()
1017          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1018          mypde.setValue(d_contact=1.)          mypde.setValue(d_contact=1.)
1019          coeff=mypde.getCoefficient("d_contact")          coeff=mypde.getCoefficient("d_contact")
1020          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),FunctionOnContactZero(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),FunctionOnContactZero(self.domain),1,1))
1021      def test_setCoefficient_y_contact_Scalar(self):      def test_setCoefficient_y_contact_Scalar(self):
1022          d=self.domain.getDim()          d=self.domain.getDim()
1023          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1024          mypde.setValue(y_contact=1.)          mypde.setValue(y_contact=1.)
1025          coeff=mypde.getCoefficient("y_contact")          coeff=mypde.getCoefficient("y_contact")
1026          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),FunctionOnContactZero(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),FunctionOnContactZero(self.domain),1))
1027      def test_setCoefficient_A_reduced_Scalar(self):      def test_setCoefficient_A_reduced_Scalar(self):
1028          d=self.domain.getDim()          d=self.domain.getDim()
1029          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1030          mypde.setValue(A_reduced=numpy.ones((d,d)))          mypde.setValue(A_reduced=numpy.ones((d,d)))
1031          coeff=mypde.getCoefficient("A_reduced")          coeff=mypde.getCoefficient("A_reduced")
1032          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,d),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,d),ReducedFunction(self.domain),1,1))
1033      def test_setCoefficient_B_reduced_Scalar(self):      def test_setCoefficient_B_reduced_Scalar(self):
1034          d=self.domain.getDim()          d=self.domain.getDim()
1035          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1036          mypde.setValue(B_reduced=numpy.ones((d,)))          mypde.setValue(B_reduced=numpy.ones((d,)))
1037          coeff=mypde.getCoefficient("B_reduced")          coeff=mypde.getCoefficient("B_reduced")
1038          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))
1039      def test_setCoefficient_C_reduced_Scalar(self):      def test_setCoefficient_C_reduced_Scalar(self):
1040          d=self.domain.getDim()          d=self.domain.getDim()
1041          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1042          mypde.setValue(C_reduced=numpy.ones((d,)))          mypde.setValue(C_reduced=numpy.ones((d,)))
1043          coeff=mypde.getCoefficient("C_reduced")          coeff=mypde.getCoefficient("C_reduced")
1044          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))
1045      def test_setCoefficient_D_reduced_Scalar(self):      def test_setCoefficient_D_reduced_Scalar(self):
1046          d=self.domain.getDim()          d=self.domain.getDim()
1047          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1048          mypde.setValue(D_reduced=1.)          mypde.setValue(D_reduced=1.)
1049          coeff=mypde.getCoefficient("D_reduced")          coeff=mypde.getCoefficient("D_reduced")
1050          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))
1051      def test_setCoefficient_X_reduced_Scalar(self):      def test_setCoefficient_X_reduced_Scalar(self):
1052          d=self.domain.getDim()          d=self.domain.getDim()
1053          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1054          mypde.setValue(X_reduced=numpy.ones((d,)))          mypde.setValue(X_reduced=numpy.ones((d,)))
1055          coeff=mypde.getCoefficient("X_reduced")          coeff=mypde.getCoefficient("X_reduced")
1056          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1))
1057      def test_setCoefficient_Y_reduced_Scalar(self):      def test_setCoefficient_Y_reduced_Scalar(self):
1058          d=self.domain.getDim()          d=self.domain.getDim()
1059          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1060          mypde.setValue(Y_reduced=1.)          mypde.setValue(Y_reduced=1.)
1061          coeff=mypde.getCoefficient("Y_reduced")          coeff=mypde.getCoefficient("Y_reduced")
1062          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1))
1063      def test_setCoefficient_y_reduced_Scalar(self):      def test_setCoefficient_y_reduced_Scalar(self):
1064          d=self.domain.getDim()          d=self.domain.getDim()
1065          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1066          mypde.setValue(y_reduced=1.)          mypde.setValue(y_reduced=1.)
1067          coeff=mypde.getCoefficient("y_reduced")          coeff=mypde.getCoefficient("y_reduced")
1068          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))
1069      def test_setCoefficient_d_reduced_Scalar(self):      def test_setCoefficient_d_reduced_Scalar(self):
1070          d=self.domain.getDim()          d=self.domain.getDim()
1071          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1072          mypde.setValue(d_reduced=1.)          mypde.setValue(d_reduced=1.)
1073          coeff=mypde.getCoefficient("d_reduced")          coeff=mypde.getCoefficient("d_reduced")
1074          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))
1075      def test_setCoefficient_d_contact_reduced_Scalar(self):      def test_setCoefficient_d_contact_reduced_Scalar(self):
1076          d=self.domain.getDim()          d=self.domain.getDim()
1077          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1078          mypde.setValue(d_contact_reduced=1.)          mypde.setValue(d_contact_reduced=1.)
1079          coeff=mypde.getCoefficient("d_contact_reduced")          coeff=mypde.getCoefficient("d_contact_reduced")
1080          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1,1))
1081      def test_setCoefficient_y_contact_reduced_Scalar(self):      def test_setCoefficient_y_contact_reduced_Scalar(self):
1082          d=self.domain.getDim()          d=self.domain.getDim()
1083          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1084          mypde.setValue(y_contact_reduced=1.)          mypde.setValue(y_contact_reduced=1.)
1085          coeff=mypde.getCoefficient("y_contact_reduced")          coeff=mypde.getCoefficient("y_contact_reduced")
1086          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1))
1087      def test_setCoefficient_r_Scalar(self):      def test_setCoefficient_r_Scalar(self):
1088          d=self.domain.getDim()          d=self.domain.getDim()
1089          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)
1090          mypde.setValue(r=1.)          mypde.setValue(r=1.)
1091          coeff=mypde.getCoefficient("r")          coeff=mypde.getCoefficient("r")
1092          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((),Solution(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((),Solution(self.domain),1))
1093      def test_setCoefficient_q_Scalar(self):      def test_setCoefficient_q_Scalar(self):
1094          d=self.domain.getDim()          d=self.domain.getDim()
1095          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)
1096          mypde.setValue(q=1.)          mypde.setValue(q=1.)
1097          coeff=mypde.getCoefficient("q")          coeff=mypde.getCoefficient("q")
1098          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((),Solution(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((),Solution(self.domain),1))
1099      def test_setCoefficient_r_Scalar_reducedOn(self):      def test_setCoefficient_r_Scalar_reducedOn(self):
1100          d=self.domain.getDim()          d=self.domain.getDim()
1101          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)
1102          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
1103          mypde.setValue(r=1.)          mypde.setValue(r=1.)
1104          coeff=mypde.getCoefficient("r")          coeff=mypde.getCoefficient("r")
1105          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((),ReducedSolution(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((),ReducedSolution(self.domain),1))
1106      def test_setCoefficient_q_Scalar_reducedOn(self):      def test_setCoefficient_q_Scalar_reducedOn(self):
1107          d=self.domain.getDim()          d=self.domain.getDim()
1108          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)
1109          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
1110          mypde.setValue(q=1.)          mypde.setValue(q=1.)
1111          coeff=mypde.getCoefficient("q")          coeff=mypde.getCoefficient("q")
1112          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((),ReducedSolution(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((),ReducedSolution(self.domain),1))
1113    
1114      def test_setCoefficient_A_reduced_Scalar_usingA(self):      def test_setCoefficient_A_reduced_Scalar_usingA(self):
1115          d=self.domain.getDim()          d=self.domain.getDim()
1116          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1117          mypde.setValue(A=Data(numpy.ones((d,d)),ReducedFunction(self.domain)))          mypde.setValue(A=Data(numpy.ones((d,d)),ReducedFunction(self.domain)))
1118          coeff=mypde.getCoefficient("A_reduced")          coeff=mypde.getCoefficient("A_reduced")
1119          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,d),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,d),ReducedFunction(self.domain),1,1))
1120      def test_setCoefficient_B_reduced_Scalar_usingB(self):      def test_setCoefficient_B_reduced_Scalar_usingB(self):
1121          d=self.domain.getDim()          d=self.domain.getDim()
1122          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1123          mypde.setValue(B=Data(numpy.ones((d,)),ReducedFunction(self.domain)))          mypde.setValue(B=Data(numpy.ones((d,)),ReducedFunction(self.domain)))
1124          coeff=mypde.getCoefficient("B_reduced")          coeff=mypde.getCoefficient("B_reduced")
1125          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))
1126      def test_setCoefficient_C_reduced_Scalar_usingC(self):      def test_setCoefficient_C_reduced_Scalar_usingC(self):
1127          d=self.domain.getDim()          d=self.domain.getDim()
1128          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1129          mypde.setValue(C=Data(numpy.ones((d,)),ReducedFunction(self.domain)))          mypde.setValue(C=Data(numpy.ones((d,)),ReducedFunction(self.domain)))
1130          coeff=mypde.getCoefficient("C_reduced")          coeff=mypde.getCoefficient("C_reduced")
1131          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))
1132      def test_setCoefficient_D_reduced_Scalar_usingD(self):      def test_setCoefficient_D_reduced_Scalar_usingD(self):
1133          d=self.domain.getDim()          d=self.domain.getDim()
1134          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1135          mypde.setValue(D=Scalar(1.,ReducedFunction(self.domain)))          mypde.setValue(D=Scalar(1.,ReducedFunction(self.domain)))
1136          coeff=mypde.getCoefficient("D_reduced")          coeff=mypde.getCoefficient("D_reduced")
1137          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))
1138      def test_setCoefficient_X_reduced_Scalar_usingX(self):      def test_setCoefficient_X_reduced_Scalar_usingX(self):
1139          d=self.domain.getDim()          d=self.domain.getDim()
1140          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1141          mypde.setValue(X_reduced=Data(numpy.ones((d,)),ReducedFunction(self.domain)))          mypde.setValue(X_reduced=Data(numpy.ones((d,)),ReducedFunction(self.domain)))
1142          coeff=mypde.getCoefficient("X_reduced")          coeff=mypde.getCoefficient("X_reduced")
1143          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1))
1144      def test_setCoefficient_Y_reduced_Scalar_usingY(self):      def test_setCoefficient_Y_reduced_Scalar_usingY(self):
1145          d=self.domain.getDim()          d=self.domain.getDim()
1146          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1147          mypde.setValue(Y=Scalar(1.,ReducedFunction(self.domain)))          mypde.setValue(Y=Scalar(1.,ReducedFunction(self.domain)))
1148          coeff=mypde.getCoefficient("Y_reduced")          coeff=mypde.getCoefficient("Y_reduced")
1149          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1))
1150      def test_setCoefficient_y_reduced_Scalar_using_y(self):      def test_setCoefficient_y_reduced_Scalar_using_y(self):
1151          d=self.domain.getDim()          d=self.domain.getDim()
1152          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1153          mypde.setValue(y=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(y=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))
1154          coeff=mypde.getCoefficient("y_reduced")          coeff=mypde.getCoefficient("y_reduced")
1155          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))
1156      def test_setCoefficient_d_reduced_Scalar_using_d(self):      def test_setCoefficient_d_reduced_Scalar_using_d(self):
1157          d=self.domain.getDim()          d=self.domain.getDim()
1158          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1159          mypde.setValue(d=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(d=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))
1160          coeff=mypde.getCoefficient("d_reduced")          coeff=mypde.getCoefficient("d_reduced")
1161          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))
1162      def test_setCoefficient_d_contact_reduced_Scalar_using_d_contact(self):      def test_setCoefficient_d_contact_reduced_Scalar_using_d_contact(self):
1163          d=self.domain.getDim()          d=self.domain.getDim()
1164          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1165          mypde.setValue(d_contact=Scalar(1.,ReducedFunctionOnContactZero(self.domain)))          mypde.setValue(d_contact=Scalar(1.,ReducedFunctionOnContactZero(self.domain)))
1166          coeff=mypde.getCoefficient("d_contact_reduced")          coeff=mypde.getCoefficient("d_contact_reduced")
1167          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1,1))
1168      def test_setCoefficient_y_contact_reduced_Scalar_using_y_contact(self):      def test_setCoefficient_y_contact_reduced_Scalar_using_y_contact(self):
1169          d=self.domain.getDim()          d=self.domain.getDim()
1170          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1171          mypde.setValue(y_contact=Scalar(1.,ReducedFunctionOnContactZero(self.domain)))          mypde.setValue(y_contact=Scalar(1.,ReducedFunctionOnContactZero(self.domain)))
1172          coeff=mypde.getCoefficient("y_contact_reduced")          coeff=mypde.getCoefficient("y_contact_reduced")
1173          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1))
1174      #      #
1175      #  set coefficients for systems:      #  set coefficients for systems:
1176      #      #
# Line 1169  class Test_LinearPDE_noLumping(Test_line Line 1179  class Test_LinearPDE_noLumping(Test_line
1179          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1180          mypde.setValue(A=numpy.ones((self.N,d,self.N,d)))          mypde.setValue(A=numpy.ones((self.N,d,self.N,d)))
1181          coeff=mypde.getCoefficient("A")          coeff=mypde.getCoefficient("A")
1182          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N,d),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N,d),Function(self.domain),self.N,self.N))
1183      def test_setCoefficient_B_System(self):      def test_setCoefficient_B_System(self):
1184          d=self.domain.getDim()          d=self.domain.getDim()
1185          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1186          mypde.setValue(B=numpy.ones((self.N,d,self.N)))          mypde.setValue(B=numpy.ones((self.N,d,self.N)))
1187          coeff=mypde.getCoefficient("B")          coeff=mypde.getCoefficient("B")
1188          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N),Function(self.domain),self.N,self.N))
1189      def test_setCoefficient_C_System(self):      def test_setCoefficient_C_System(self):
1190          d=self.domain.getDim()          d=self.domain.getDim()
1191          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1192          mypde.setValue(C=numpy.ones((self.N,self.N,d)))          mypde.setValue(C=numpy.ones((self.N,self.N,d)))
1193          coeff=mypde.getCoefficient("C")          coeff=mypde.getCoefficient("C")
1194          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N,d),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N,d),Function(self.domain),self.N,self.N))
1195      def test_setCoefficient_D_System(self):      def test_setCoefficient_D_System(self):
1196          d=self.domain.getDim()          d=self.domain.getDim()
1197          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1198          mypde.setValue(D=numpy.ones((self.N,self.N)))          mypde.setValue(D=numpy.ones((self.N,self.N)))
1199          coeff=mypde.getCoefficient("D")          coeff=mypde.getCoefficient("D")
1200          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),Function(self.domain),self.N,self.N))
1201      def test_setCoefficient_X_System(self):      def test_setCoefficient_X_System(self):
1202          d=self.domain.getDim()          d=self.domain.getDim()
1203          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1204          mypde.setValue(X=numpy.ones((self.N,d)))          mypde.setValue(X=numpy.ones((self.N,d)))
1205          coeff=mypde.getCoefficient("X")          coeff=mypde.getCoefficient("X")
1206          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,d),Function(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,d),Function(self.domain),self.N))
1207      def test_setCoefficient_Y_System(self):      def test_setCoefficient_Y_System(self):
1208          d=self.domain.getDim()          d=self.domain.getDim()
1209          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1210          mypde.setValue(Y=numpy.ones((self.N,)))          mypde.setValue(Y=numpy.ones((self.N,)))
1211          coeff=mypde.getCoefficient("Y")          coeff=mypde.getCoefficient("Y")
1212          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),Function(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),Function(self.domain),self.N))
1213      def test_setCoefficient_y_System(self):      def test_setCoefficient_y_System(self):
1214          d=self.domain.getDim()          d=self.domain.getDim()
1215          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1216          mypde.setValue(y=numpy.ones((self.N,)))          mypde.setValue(y=numpy.ones((self.N,)))
1217          coeff=mypde.getCoefficient("y")          coeff=mypde.getCoefficient("y")
1218          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),FunctionOnBoundary(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),FunctionOnBoundary(self.domain),self.N))
1219      def test_setCoefficient_d_System(self):      def test_setCoefficient_d_System(self):
1220          d=self.domain.getDim()          d=self.domain.getDim()
1221          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1222          mypde.setValue(d=numpy.ones((self.N,self.N)))          mypde.setValue(d=numpy.ones((self.N,self.N)))
1223          coeff=mypde.getCoefficient("d")          coeff=mypde.getCoefficient("d")
1224          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),FunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),FunctionOnBoundary(self.domain),self.N,self.N))
1225      def test_setCoefficient_d_contact_System(self):      def test_setCoefficient_d_contact_System(self):
1226          d=self.domain.getDim()          d=self.domain.getDim()
1227          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1228          mypde.setValue(d_contact=numpy.ones((self.N,self.N)))          mypde.setValue(d_contact=numpy.ones((self.N,self.N)))
1229          coeff=mypde.getCoefficient("d_contact")          coeff=mypde.getCoefficient("d_contact")
1230          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),FunctionOnContactZero(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),FunctionOnContactZero(self.domain),self.N,self.N))
1231      def test_setCoefficient_y_contact_System(self):      def test_setCoefficient_y_contact_System(self):
1232          d=self.domain.getDim()          d=self.domain.getDim()
1233          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1234          mypde.setValue(y_contact=numpy.ones((self.N,)))          mypde.setValue(y_contact=numpy.ones((self.N,)))
1235          coeff=mypde.getCoefficient("y_contact")          coeff=mypde.getCoefficient("y_contact")
1236          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),FunctionOnContactZero(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),FunctionOnContactZero(self.domain),self.N))
1237      def test_setCoefficient_A_reduced_System(self):      def test_setCoefficient_A_reduced_System(self):
1238          d=self.domain.getDim()          d=self.domain.getDim()
1239          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1240          mypde.setValue(A_reduced=numpy.ones((self.N,d,self.N,d)))          mypde.setValue(A_reduced=numpy.ones((self.N,d,self.N,d)))
1241          coeff=mypde.getCoefficient("A_reduced")          coeff=mypde.getCoefficient("A_reduced")
1242          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N,d),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N,d),ReducedFunction(self.domain),self.N,self.N))
1243      def test_setCoefficient_B_reduced_System(self):      def test_setCoefficient_B_reduced_System(self):
1244          d=self.domain.getDim()          d=self.domain.getDim()
1245          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1246          mypde.setValue(B_reduced=numpy.ones((self.N,d,self.N)))          mypde.setValue(B_reduced=numpy.ones((self.N,d,self.N)))
1247          coeff=mypde.getCoefficient("B_reduced")          coeff=mypde.getCoefficient("B_reduced")
1248          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N),ReducedFunction(self.domain),self.N,self.N))
1249      def test_setCoefficient_C_reduced_System(self):      def test_setCoefficient_C_reduced_System(self):
1250          d=self.domain.getDim()          d=self.domain.getDim()
1251          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1252          mypde.setValue(C_reduced=numpy.ones((self.N,self.N,d)))          mypde.setValue(C_reduced=numpy.ones((self.N,self.N,d)))
1253          coeff=mypde.getCoefficient("C_reduced")          coeff=mypde.getCoefficient("C_reduced")
1254          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N,d),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N,d),ReducedFunction(self.domain),self.N,self.N))
1255      def test_setCoefficient_D_System_reduced(self):      def test_setCoefficient_D_System_reduced(self):
1256          d=self.domain.getDim()          d=self.domain.getDim()
1257          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1258          mypde.setValue(D_reduced=numpy.ones((self.N,self.N)))          mypde.setValue(D_reduced=numpy.ones((self.N,self.N)))
1259          coeff=mypde.getCoefficient("D_reduced")          coeff=mypde.getCoefficient("D_reduced")
1260          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))
1261      def test_setCoefficient_X_System_reduced(self):      def test_setCoefficient_X_System_reduced(self):
1262          d=self.domain.getDim()          d=self.domain.getDim()
1263          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1264          mypde.setValue(X_reduced=numpy.ones((self.N,d)))          mypde.setValue(X_reduced=numpy.ones((self.N,d)))
1265          coeff=mypde.getCoefficient("X_reduced")          coeff=mypde.getCoefficient("X_reduced")
1266          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,d),ReducedFunction(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,d),ReducedFunction(self.domain),self.N))
1267      def test_setCoefficient_Y_System_reduced(self):      def test_setCoefficient_Y_System_reduced(self):
1268          d=self.domain.getDim()          d=self.domain.getDim()
1269          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1270          mypde.setValue(Y_reduced=numpy.ones((self.N,)))          mypde.setValue(Y_reduced=numpy.ones((self.N,)))
1271          coeff=mypde.getCoefficient("Y_reduced")          coeff=mypde.getCoefficient("Y_reduced")
1272          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunction(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunction(self.domain),self.N))
1273      def test_setCoefficient_y_System_reduced(self):      def test_setCoefficient_y_System_reduced(self):
1274          d=self.domain.getDim()          d=self.domain.getDim()
1275          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1276          mypde.setValue(y_reduced=numpy.ones((self.N,)))          mypde.setValue(y_reduced=numpy.ones((self.N,)))
1277          coeff=mypde.getCoefficient("y_reduced")          coeff=mypde.getCoefficient("y_reduced")
1278          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunctionOnBoundary(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunctionOnBoundary(self.domain),self.N))
1279      def test_setCoefficient_d_reduced_System(self):      def test_setCoefficient_d_reduced_System(self):
1280          d=self.domain.getDim()          d=self.domain.getDim()
1281          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1282          mypde.setValue(d_reduced=numpy.ones((self.N,self.N)))          mypde.setValue(d_reduced=numpy.ones((self.N,self.N)))
1283          coeff=mypde.getCoefficient("d_reduced")          coeff=mypde.getCoefficient("d_reduced")
1284          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))
1285      def test_setCoefficient_d_contact_reduced_System(self):      def test_setCoefficient_d_contact_reduced_System(self):
1286          d=self.domain.getDim()          d=self.domain.getDim()
1287          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1288          mypde.setValue(d_contact_reduced=numpy.ones((self.N,self.N)))          mypde.setValue(d_contact_reduced=numpy.ones((self.N,self.N)))
1289          coeff=mypde.getCoefficient("d_contact_reduced")          coeff=mypde.getCoefficient("d_contact_reduced")
1290          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnContactZero(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnContactZero(self.domain),self.N,self.N))
1291      def test_setCoefficient_y_contact_reduced_System(self):      def test_setCoefficient_y_contact_reduced_System(self):
1292          d=self.domain.getDim()          d=self.domain.getDim()
1293          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1294          mypde.setValue(y_contact_reduced=numpy.ones((self.N,)))          mypde.setValue(y_contact_reduced=numpy.ones((self.N,)))
1295          coeff=mypde.getCoefficient("y_contact_reduced")          coeff=mypde.getCoefficient("y_contact_reduced")
1296          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunctionOnContactZero(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunctionOnContactZero(self.domain),self.N))
1297      def test_setCoefficient_r_System(self):      def test_setCoefficient_r_System(self):
1298          d=self.domain.getDim()          d=self.domain.getDim()
1299          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)
1300          mypde.setValue(r=numpy.ones((self.N,)))          mypde.setValue(r=numpy.ones((self.N,)))
1301          coeff=mypde.getCoefficient("r")          coeff=mypde.getCoefficient("r")
1302          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((self.N,),Solution(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((self.N,),Solution(self.domain),self.N))
1303      def test_setCoefficient_q_System(self):      def test_setCoefficient_q_System(self):
1304          d=self.domain.getDim()          d=self.domain.getDim()
1305          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)
1306          mypde.setValue(q=numpy.ones((self.N,)))          mypde.setValue(q=numpy.ones((self.N,)))
1307          coeff=mypde.getCoefficient("q")          coeff=mypde.getCoefficient("q")
1308          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((self.N,),Solution(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((self.N,),Solution(self.domain),self.N))
1309      def test_setCoefficient_r_System_reducedOn(self):      def test_setCoefficient_r_System_reducedOn(self):
1310          d=self.domain.getDim()          d=self.domain.getDim()
1311          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)
1312          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
1313          mypde.setValue(r=numpy.ones((self.N,)))          mypde.setValue(r=numpy.ones((self.N,)))
1314          coeff=mypde.getCoefficient("r")          coeff=mypde.getCoefficient("r")
1315          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((self.N,),ReducedSolution(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((self.N,),ReducedSolution(self.domain),self.N))
1316      def test_setCoefficient_q_System_reducedOn(self):      def test_setCoefficient_q_System_reducedOn(self):
1317          d=self.domain.getDim()          d=self.domain.getDim()
1318          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numEquations=3,debug=self.DEBUG)
1319          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
1320          mypde.setValue(q=numpy.ones((self.N,)))          mypde.setValue(q=numpy.ones((self.N,)))
1321          coeff=mypde.getCoefficient("q")          coeff=mypde.getCoefficient("q")
1322          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((self.N,),ReducedSolution(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((self.N,),ReducedSolution(self.domain),self.N))
1323    
1324      def test_setCoefficient_A_reduced_System_using_A(self):      def test_setCoefficient_A_reduced_System_using_A(self):
1325          d=self.domain.getDim()          d=self.domain.getDim()
1326          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1327          mypde.setValue(A=Data(numpy.ones((self.N,d,self.N,d)),ReducedFunction(self.domain)))          mypde.setValue(A=Data(numpy.ones((self.N,d,self.N,d)),ReducedFunction(self.domain)))
1328          coeff=mypde.getCoefficient("A_reduced")          coeff=mypde.getCoefficient("A_reduced")
1329          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N,d),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N,d),ReducedFunction(self.domain),self.N,self.N))
1330      def test_setCoefficient_B_reduced_System_using_B(self):      def test_setCoefficient_B_reduced_System_using_B(self):
1331          d=self.domain.getDim()          d=self.domain.getDim()
1332          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1333          mypde.setValue(B=Data(numpy.ones((self.N,d,self.N)),ReducedFunction(self.domain)))          mypde.setValue(B=Data(numpy.ones((self.N,d,self.N)),ReducedFunction(self.domain)))
1334          coeff=mypde.getCoefficient("B_reduced")          coeff=mypde.getCoefficient("B_reduced")
1335          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N),ReducedFunction(self.domain),self.N,self.N))
1336      def test_setCoefficient_C_reduced_System_using_C(self):      def test_setCoefficient_C_reduced_System_using_C(self):
1337          d=self.domain.getDim()          d=self.domain.getDim()
1338          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1339          mypde.setValue(C=Data(numpy.ones((self.N,self.N,d)),ReducedFunction(self.domain)))          mypde.setValue(C=Data(numpy.ones((self.N,self.N,d)),ReducedFunction(self.domain)))
1340          coeff=mypde.getCoefficient("C_reduced")          coeff=mypde.getCoefficient("C_reduced")
1341          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N,d),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N,d),ReducedFunction(self.domain),self.N,self.N))
1342      def test_setCoefficient_D_System_reduced_using_D(self):      def test_setCoefficient_D_System_reduced_using_D(self):
1343          d=self.domain.getDim()          d=self.domain.getDim()
1344          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1345          mypde.setValue(D=Data(numpy.ones((self.N,self.N)),ReducedFunction(self.domain)))          mypde.setValue(D=Data(numpy.ones((self.N,self.N)),ReducedFunction(self.domain)))
1346          coeff=mypde.getCoefficient("D_reduced")          coeff=mypde.getCoefficient("D_reduced")
1347          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))
1348      def test_setCoefficient_X_System_reduced_using_X(self):      def test_setCoefficient_X_System_reduced_using_X(self):
1349          d=self.domain.getDim()          d=self.domain.getDim()
1350          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1351          mypde.setValue(X=Data(numpy.ones((self.N,d)),ReducedFunction(self.domain)))          mypde.setValue(X=Data(numpy.ones((self.N,d)),ReducedFunction(self.domain)))
1352          coeff=mypde.getCoefficient("X_reduced")          coeff=mypde.getCoefficient("X_reduced")
1353          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,d),ReducedFunction(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,d),ReducedFunction(self.domain),self.N))
1354      def test_setCoefficient_Y_System_reduced_using_Y(self):      def test_setCoefficient_Y_System_reduced_using_Y(self):
1355          d=self.domain.getDim()          d=self.domain.getDim()
1356          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1357          mypde.setValue(Y=Data(numpy.ones((self.N,)),ReducedFunction(self.domain)))          mypde.setValue(Y=Data(numpy.ones((self.N,)),ReducedFunction(self.domain)))
1358          coeff=mypde.getCoefficient("Y_reduced")          coeff=mypde.getCoefficient("Y_reduced")
1359          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunction(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunction(self.domain),self.N))
1360      def test_setCoefficient_y_reduced_System_using_y(self):      def test_setCoefficient_y_reduced_System_using_y(self):
1361          d=self.domain.getDim()          d=self.domain.getDim()
1362          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1363          mypde.setValue(y=Data(numpy.ones((self.N,)),ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(y=Data(numpy.ones((self.N,)),ReducedFunctionOnBoundary(self.domain)))
1364          coeff=mypde.getCoefficient("y_reduced")          coeff=mypde.getCoefficient("y_reduced")
1365          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunctionOnBoundary(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunctionOnBoundary(self.domain),self.N))
1366      def test_setCoefficient_d_reduced_System_using_d(self):      def test_setCoefficient_d_reduced_System_using_d(self):
1367          d=self.domain.getDim()          d=self.domain.getDim()
1368          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1369          mypde.setValue(d=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(d=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnBoundary(self.domain)))
1370          coeff=mypde.getCoefficient("d_reduced")          coeff=mypde.getCoefficient("d_reduced")
1371          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))
1372      def test_setCoefficient_d_contact_reduced_System_using_d_contact(self):      def test_setCoefficient_d_contact_reduced_System_using_d_contact(self):
1373          d=self.domain.getDim()          d=self.domain.getDim()
1374          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1375          mypde.setValue(d_contact=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnContactZero(self.domain)))          mypde.setValue(d_contact=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnContactZero(self.domain)))
1376          coeff=mypde.getCoefficient("d_contact_reduced")          coeff=mypde.getCoefficient("d_contact_reduced")
1377          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnContactZero(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnContactZero(self.domain),self.N,self.N))
1378      def test_setCoefficient_y_contact_reduced_System_using_y_contact(self):      def test_setCoefficient_y_contact_reduced_System_using_y_contact(self):
1379          d=self.domain.getDim()          d=self.domain.getDim()
1380          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
1381          mypde.setValue(y_contact=Data(numpy.ones((self.N,)),ReducedFunctionOnContactZero(self.domain)))          mypde.setValue(y_contact=Data(numpy.ones((self.N,)),ReducedFunctionOnContactZero(self.domain)))
1382          coeff=mypde.getCoefficient("y_contact_reduced")          coeff=mypde.getCoefficient("y_contact_reduced")
1383          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunctionOnContactZero(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunctionOnContactZero(self.domain),self.N))
1384      def test_resetCoefficient_HomogeneousConstraint(self):      def test_resetCoefficient_HomogeneousConstraint(self):
1385          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1386          x=self.domain.getX()          x=self.domain.getX()
# Line 1383  class Test_LinearPDE_noLumping(Test_line Line 1393  class Test_LinearPDE_noLumping(Test_line
1393      def test_resetCoefficient_InHomogeneousConstraint(self):      def test_resetCoefficient_InHomogeneousConstraint(self):
1394          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1395          mypde.setSymmetryOn()          mypde.setSymmetryOn()
1396        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1397          x=self.domain.getX()          x=self.domain.getX()
1398          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.,r=1,q=whereZero(x[0]))          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.,r=1,q=whereZero(x[0]))
1399          u1=mypde.getSolution(verbose=self.VERBOSE)          u1=mypde.getSolution()
1400          mypde.setValue(Y=2.,D=2)          mypde.setValue(Y=2.,D=2)
1401          u2=mypde.getSolution(verbose=self.VERBOSE)          u2=mypde.getSolution()
1402          self.failUnless(self.check(u2,u1),'first solution is wrong.')          self.failUnless(self.check(u2,u1),'first solution is wrong.')
1403          u2=mypde.getSolution(verbose=self.VERBOSE)          u2=mypde.getSolution()
1404          self.failUnless(self.check(u2,u1),'first solution is wrong.')          self.failUnless(self.check(u2,u1),'first solution is wrong.')
1405          mypde.setValue(r=2,Y=4.)          mypde.setValue(r=2,Y=4.)
1406          u2=mypde.getSolution(verbose=self.VERBOSE)          u2=mypde.getSolution()
1407          self.failUnless(self.check(u2,2*u1),'second solution is wrong.')          self.failUnless(self.check(u2,2*u1),'second solution is wrong.')
1408    
1409      def test_symmetryCheckTrue_System(self):      def test_symmetryCheckTrue_System(self):
# Line 1529  class Test_LinearPDE_noLumping(Test_line Line 1540  class Test_LinearPDE_noLumping(Test_line
1540      def test_symmetryOnIterative(self):      def test_symmetryOnIterative(self):
1541          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1542          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1543          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1544            u=mypde.getSolution()
1545          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1546      def test_symmetryOnDirect(self):      def test_symmetryOnDirect(self):
1547          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1548          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1549          mypde.setSolverMethod(mypde.DIRECT)          mypde.getSolverOptions().setSolverMethod(SolverOptions.DIRECT)
1550          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1551            u=mypde.getSolution()
1552          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1553      def test_PCG_JACOBI(self):      def test_PCG_JACOBI(self):
1554          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1555          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1556          mypde.setSolverMethod(mypde.PCG,mypde.JACOBI)          mypde.getSolverOptions().setSolverMethod(SolverOptions.PCG)
1557          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1558        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1559            u=mypde.getSolution()
1560          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1561      def test_PCG_ILU0(self):      def test_PCG_ILU0(self):
1562          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1563          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1564          mypde.setSolverMethod(mypde.PCG,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.PCG)
1565          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1566        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1567            u=mypde.getSolution()
1568          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1569      def test_PCG_RILU(self):      def test_PCG_RILU(self):
1570          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1571          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1572          mypde.setSolverMethod(mypde.PCG,mypde.RILU)      mypde.getSolverOptions().setSolverMethod(SolverOptions.PCG)
1573          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.RILU)
1574        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1575            u=mypde.getSolution()
1576            self.failUnless(self.check(u,1.),'solution is wrong.')
1577        def test_PCG_REC_ILU(self):
1578            mypde=LinearPDE(self.domain,debug=self.DEBUG)
1579            mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1580        mypde.getSolverOptions().setSolverMethod(SolverOptions.PCG)
1581        mypde.getSolverOptions().setPreconditioner(SolverOptions.REC_ILU)
1582        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1583            u=mypde.getSolution()
1584          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1585      def test_DIRECT(self):      def test_DIRECT(self):
1586          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1587          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1588          mypde.setSolverMethod(mypde.DIRECT)          mypde.getSolverOptions().setSolverMethod(SolverOptions.DIRECT)
1589          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1590            u=mypde.getSolution()
1591          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1592      def test_BICGSTAB_JACOBI(self):      def test_BICGSTAB_JACOBI(self):
1593          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1594      mypde.setSolverMethod(mypde.BICGSTAB,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.BICGSTAB)
1595        mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1596          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1597          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1598            u=mypde.getSolution()
1599          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1600      def test_BICGSTAB_ILU0(self):      def test_BICGSTAB_ILU0(self):
1601          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1602          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1603      mypde.setSolverMethod(mypde.BICGSTAB,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.BICGSTAB)
1604          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1605            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1606            u=mypde.getSolution()
1607          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1608      def test_BICGSTAB_RILU(self):      def test_BICGSTAB_RILU(self):
1609          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1610          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1611      mypde.setSolverMethod(mypde.BICGSTAB,mypde.RILU)      mypde.getSolverOptions().setSolverMethod(SolverOptions.BICGSTAB)
1612          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.RILU)
1613            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1614            u=mypde.getSolution()
1615            self.failUnless(self.check(u,1.),'solution is wrong.')
1616        def test_BICGSTAB_REC_ILU(self):
1617            mypde=LinearPDE(self.domain,debug=self.DEBUG)
1618            mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1619        mypde.getSolverOptions().setSolverMethod(SolverOptions.BICGSTAB)
1620        mypde.getSolverOptions().setPreconditioner(SolverOptions.REC_ILU)
1621            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1622            u=mypde.getSolution()
1623          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1624      def test_MINRES_JACOBI(self):      def test_MINRES_JACOBI(self):
1625          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1626      mypde.setSolverMethod(mypde.MINRES,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.MINRES)
1627        mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1628          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1629          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1630            u=mypde.getSolution()
1631          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1632      def test_MINRES_ILU0(self):      def test_MINRES_ILU0(self):
1633          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1634          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1635      mypde.setSolverMethod(mypde.MINRES,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.MINRES)
1636          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1637            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1638            u=mypde.getSolution()
1639          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1640      def test_MINRES_RILU(self):      def test_MINRES_RILU(self):
1641          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1642          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1643      mypde.setSolverMethod(mypde.MINRES,mypde.RILU)      mypde.getSolverOptions().setSolverMethod(SolverOptions.MINRES)
1644          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.RILU)
1645            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1646            u=mypde.getSolution()
1647            self.failUnless(self.check(u,1.),'solution is wrong.')
1648        def test_MINRES_REC_ILU(self):
1649            mypde=LinearPDE(self.domain,debug=self.DEBUG)
1650            mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1651        mypde.getSolverOptions().setSolverMethod(SolverOptions.MINRES)
1652        mypde.getSolverOptions().setPreconditioner(SolverOptions.REC_ILU)
1653            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1654            u=mypde.getSolution()
1655          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1656      def test_TFQMR_JACOBI(self):      def test_TFQMR_JACOBI(self):
1657          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1658      mypde.setSolverMethod(mypde.TFQMR,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.TFQMR)
1659        mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1660          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1661          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1662            u=mypde.getSolution()
1663          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1664      def test_TFQMR_ILU0(self):      def test_TFQMR_ILU0(self):
1665          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1666          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1667      mypde.setSolverMethod(mypde.TFQMR,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.TFQMR)
1668          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1669            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1670            u=mypde.getSolution()
1671          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1672      def test_TFQMR_RILU(self):      def test_TFQMR_RILU(self):
1673          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1674          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1675      mypde.setSolverMethod(mypde.TFQMR,mypde.RILU)      mypde.getSolverOptions().setSolverMethod(SolverOptions.TFQMR)
1676          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.RILU)
1677            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1678            u=mypde.getSolution()
1679            self.failUnless(self.check(u,1.),'solution is wrong.')
1680        def test_TFQMR_REC_ILU(self):
1681            mypde=LinearPDE(self.domain,debug=self.DEBUG)
1682            mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1683        mypde.getSolverOptions().setSolverMethod(SolverOptions.TFQMR)
1684        mypde.getSolverOptions().setPreconditioner(SolverOptions.REC_ILU)
1685            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1686            u=mypde.getSolution()
1687          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1688      def test_PRES20_JACOBI(self):      def test_PRES20_JACOBI(self):
1689          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1690          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1691      mypde.setSolverMethod(mypde.PRES20,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.PRES20)
1692          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1693            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1694            u=mypde.getSolution()
1695          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1696      def test_PRES20_ILU0(self):      def test_PRES20_ILU0(self):
1697          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1698          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1699      mypde.setSolverMethod(mypde.PRES20,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.PRES20)
1700          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1701            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1702            u=mypde.getSolution()
1703          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1704      def test_PRES20_RILU(self):      def test_PRES20_RILU(self):
1705          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1706          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1707      mypde.setSolverMethod(mypde.PRES20,mypde.RILU)      mypde.getSolverOptions().setSolverMethod(SolverOptions.PRES20)
1708          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.RILU)
1709            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1710            u=mypde.getSolution()
1711            self.failUnless(self.check(u,1.),'solution is wrong.')
1712        def test_PRES20_REC_ILU(self):
1713            mypde=LinearPDE(self.domain,debug=self.DEBUG)
1714            mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1715        mypde.getSolverOptions().setSolverMethod(SolverOptions.PRES20)
1716        mypde.getSolverOptions().setPreconditioner(SolverOptions.REC_ILU)
1717            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1718            u=mypde.getSolution()
1719          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1720      def test_GMRESnoRestart_JACOBI(self):      def test_GMRESnoRestart_JACOBI(self):
1721          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1722          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1723      mypde.setSolverMethod(mypde.GMRES,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1724          u=mypde.getSolution(verbose=self.VERBOSE,truncation=50)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1725        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1726        mypde.getSolverOptions().setTruncation(50)
1727            u=mypde.getSolution()
1728          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1729      def test_GMRESnoRestart_ILU0(self):      def test_GMRESnoRestart_ILU0(self):
1730          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1731          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1732      mypde.setSolverMethod(mypde.GMRES,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1733          u=mypde.getSolution(verbose=self.VERBOSE,truncation=50)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1734          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1735        mypde.getSolverOptions().setTruncation(50)                        
1736            u=mypde.getSolution()
1737          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1738      def test_GMRESnoRestart_RILU(self):      def test_GMRESnoRestart_RILU(self):
1739          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1740          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1741      mypde.setSolverMethod(mypde.GMRES,mypde.RILU)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1742          u=mypde.getSolution(verbose=self.VERBOSE,truncation=50)      mypde.getSolverOptions().setPreconditioner(SolverOptions.RILU)
1743          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1744        mypde.getSolverOptions().setTruncation(50)
1745            u=mypde.getSolution()
1746            self.failUnless(self.check(u,1.),'solution is wrong.')
1747        def test_GMRESnoRestart_REC_ILU(self):
1748            mypde=LinearPDE(self.domain,debug=self.DEBUG)
1749            mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1750        mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1751        mypde.getSolverOptions().setPreconditioner(SolverOptions.REC_ILU)
1752        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1753        mypde.getSolverOptions().setTruncation(50)
1754            u=mypde.getSolution()
1755          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1756      def test_GMRES_JACOBI(self):      def test_GMRES_JACOBI(self):
1757          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1758          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1759      mypde.setSolverMethod(mypde.GMRES,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1760          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1761            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1762            u=mypde.getSolution()
1763          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1764      def test_GMRES_ILU0(self):      def test_GMRES_ILU0(self):
1765          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1766          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1767      mypde.setSolverMethod(mypde.GMRES,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1768          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1769            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1770            u=mypde.getSolution()
1771          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1772      def test_GMRES_RILU(self):      def test_GMRES_RILU(self):
1773          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1774          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1775      mypde.setSolverMethod(mypde.GMRES,mypde.RILU)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1776          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.RILU)
1777            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1778            u=mypde.getSolution()
1779            self.failUnless(self.check(u,1.),'solution is wrong.')
1780        def test_GMRES_REC_ILU(self):
1781            mypde=LinearPDE(self.domain,debug=self.DEBUG)
1782            mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1783        mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1784        mypde.getSolverOptions().setPreconditioner(SolverOptions.REC_ILU)
1785            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1786            u=mypde.getSolution()
1787          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1788      def test_GMRES_truncation_restart_JACOBI(self):      def test_GMRES_truncation_restart_JACOBI(self):
1789          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1790          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1791      mypde.setSolverMethod(mypde.GMRES,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1792          u=mypde.getSolution(verbose=self.VERBOSE,truncation=10,restart=20)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1793        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1794        mypde.getSolverOptions().setTruncation(10)
1795        mypde.getSolverOptions().setRestart(20)
1796            u=mypde.getSolution()
1797          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1798      def test_GMRES_truncation_restart_ILU0(self):      def test_GMRES_truncation_restart_ILU0(self):
1799          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1800          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1801      mypde.setSolverMethod(mypde.GMRES,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1802          u=mypde.getSolution(verbose=self.VERBOSE,truncation=10,restart=20)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1803        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1804        mypde.getSolverOptions().setTruncation(10)
1805        mypde.getSolverOptions().setRestart(20)
1806            u=mypde.getSolution()
1807          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1808      def test_GMRES_truncation_restart_RILU(self):      def test_GMRES_truncation_restart_RILU(self):
1809          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1810          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)          mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1811      mypde.setSolverMethod(mypde.GMRES,mypde.RILU)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1812          u=mypde.getSolution(verbose=self.VERBOSE,truncation=10,restart=20)      mypde.getSolverOptions().setPreconditioner(SolverOptions.RILU)
1813        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1814        mypde.getSolverOptions().setTruncation(10)
1815        mypde.getSolverOptions().setRestart(20)
1816            u=mypde.getSolution()
1817            self.failUnless(self.check(u,1.),'solution is wrong.')
1818        def test_GMRES_truncation_restart_REC_ILU(self):
1819            mypde=LinearPDE(self.domain,debug=self.DEBUG)
1820            mypde.setValue(A=kronecker(self.domain),D=1.,Y=1.)
1821        mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1822        mypde.getSolverOptions().setPreconditioner(SolverOptions.REC_ILU)
1823        mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1824        mypde.getSolverOptions().setTruncation(10)
1825        mypde.getSolverOptions().setRestart(20)
1826            u=mypde.getSolution()
1827          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1828      #      #
1829      #   solver checks (PDE system)      #   solver checks (PDE system)
# Line 1702  class Test_LinearPDE_noLumping(Test_line Line 1838  class Test_LinearPDE_noLumping(Test_line
1838              Y[i]+=i              Y[i]+=i
1839          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1840          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1841          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1842            u=mypde.getSolution()
1843          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1844      def test_symmetryOnDirect_System(self):      def test_symmetryOnDirect_System(self):
1845          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1714  class Test_LinearPDE_noLumping(Test_line Line 1851  class Test_LinearPDE_noLumping(Test_line
1851              Y[i]+=i              Y[i]+=i
1852          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1853          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1854          mypde.setSolverMethod(mypde.DIRECT)          mypde.getSolverOptions().setSolverMethod(SolverOptions.DIRECT)
1855          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1856            u=mypde.getSolution()
1857          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1858      def test_PCG_JACOBI_System(self):      def test_PCG_JACOBI_System(self):
1859          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1727  class Test_LinearPDE_noLumping(Test_line Line 1865  class Test_LinearPDE_noLumping(Test_line
1865              Y[i]+=i              Y[i]+=i
1866          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1867          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1868          mypde.setSolverMethod(mypde.PCG,mypde.JACOBI)          mypde.getSolverOptions().setSolverMethod(SolverOptions.PCG)
1869          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1870            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1871            u=mypde.getSolution()
1872          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1873      def test_PCG_ILU0_System(self):      def test_PCG_ILU0_System(self):
1874          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1740  class Test_LinearPDE_noLumping(Test_line Line 1880  class Test_LinearPDE_noLumping(Test_line
1880              Y[i]+=i              Y[i]+=i
1881          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1882          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1883          mypde.setSolverMethod(mypde.PCG,mypde.ILU0)          mypde.getSolverOptions().setSolverMethod(SolverOptions.PCG)
1884          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1885            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1886            u=mypde.getSolution()
1887          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1888      def test_DIRECT_System(self):      def test_DIRECT_System(self):
1889          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1753  class Test_LinearPDE_noLumping(Test_line Line 1895  class Test_LinearPDE_noLumping(Test_line
1895              Y[i]+=i              Y[i]+=i
1896          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1897          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1898          mypde.setSolverMethod(mypde.DIRECT)          mypde.getSolverOptions().setSolverMethod(SolverOptions.DIRECT)
1899          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1900            u=mypde.getSolution()
1901          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1902      def test_BICGSTAB_JACOBI_System(self):      def test_BICGSTAB_JACOBI_System(self):
1903          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1766  class Test_LinearPDE_noLumping(Test_line Line 1909  class Test_LinearPDE_noLumping(Test_line
1909              Y[i]+=i              Y[i]+=i
1910          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1911          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1912      mypde.setSolverMethod(mypde.BICGSTAB,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.BICGSTAB)
1913          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1914            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1915            u=mypde.getSolution()
1916          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1917      def test_BICGSTAB_ILU0_System(self):      def test_BICGSTAB_ILU0_System(self):
1918          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1779  class Test_LinearPDE_noLumping(Test_line Line 1924  class Test_LinearPDE_noLumping(Test_line
1924              Y[i]+=i              Y[i]+=i
1925          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1926          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1927      mypde.setSolverMethod(mypde.BICGSTAB,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.BICGSTAB)
1928          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1929            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1930            u=mypde.getSolution()
1931          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1932      def test_PRES20_JACOBI_System(self):      def test_PRES20_JACOBI_System(self):
1933          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1792  class Test_LinearPDE_noLumping(Test_line Line 1939  class Test_LinearPDE_noLumping(Test_line
1939              Y[i]+=i              Y[i]+=i
1940          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1941          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1942      mypde.setSolverMethod(mypde.PRES20,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.PRES20)
1943          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1944            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1945            u=mypde.getSolution()
1946          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1947      def test_PRES20_ILU0_System(self):      def test_PRES20_ILU0_System(self):
1948          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1805  class Test_LinearPDE_noLumping(Test_line Line 1954  class Test_LinearPDE_noLumping(Test_line
1954              Y[i]+=i              Y[i]+=i
1955          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1956          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1957      mypde.setSolverMethod(mypde.PRES20,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.PRES20)
1958          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1959            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1960            u=mypde.getSolution()
1961          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1962      def test_GMRESnoRestart_JACOBI_System(self):      def test_GMRESnoRestart_JACOBI_System(self):
1963          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1818  class Test_LinearPDE_noLumping(Test_line Line 1969  class Test_LinearPDE_noLumping(Test_line
1969              Y[i]+=i              Y[i]+=i
1970          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1971          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1972      mypde.setSolverMethod(mypde.GMRES,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1973        mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
1974          # u=mypde.getSolution(verbose=self.VERBOSE,truncation=5)          # u=mypde.getSolution(verbose=self.VERBOSE,truncation=5)
1975          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1976            u=mypde.getSolution()
1977          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1978      def test_GMRESnoRestart_ILU0_System(self):      def test_GMRESnoRestart_ILU0_System(self):
1979          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1832  class Test_LinearPDE_noLumping(Test_line Line 1985  class Test_LinearPDE_noLumping(Test_line
1985              Y[i]+=i              Y[i]+=i
1986          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
1987          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
1988      mypde.setSolverMethod(mypde.GMRES,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
1989        mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
1990          # u=mypde.getSolution(verbose=self.VERBOSE,truncation=5)          # u=mypde.getSolution(verbose=self.VERBOSE,truncation=5)
1991          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
1992            u=mypde.getSolution()
1993          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
1994      def test_GMRES_JACOBI_System(self):      def test_GMRES_JACOBI_System(self):
1995          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1846  class Test_LinearPDE_noLumping(Test_line Line 2001  class Test_LinearPDE_noLumping(Test_line
2001              Y[i]+=i              Y[i]+=i
2002          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2003          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
2004      mypde.setSolverMethod(mypde.GMRES,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
2005          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
2006            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2007            u=mypde.getSolution()
2008          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
2009      def test_GMRES_ILU0_System(self):      def test_GMRES_ILU0_System(self):
2010          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1859  class Test_LinearPDE_noLumping(Test_line Line 2016  class Test_LinearPDE_noLumping(Test_line
2016              Y[i]+=i              Y[i]+=i
2017          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2018          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
2019      mypde.setSolverMethod(mypde.GMRES,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
2020          u=mypde.getSolution(verbose=self.VERBOSE)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
2021            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2022            u=mypde.getSolution()
2023          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
2024      def test_GMRES_truncation_restart_JACOBI_System(self):      def test_GMRES_truncation_restart_JACOBI_System(self):
2025          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1872  class Test_LinearPDE_noLumping(Test_line Line 2031  class Test_LinearPDE_noLumping(Test_line
2031              Y[i]+=i              Y[i]+=i
2032          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2033          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
2034      mypde.setSolverMethod(mypde.GMRES,mypde.JACOBI)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
2035          u=mypde.getSolution(verbose=self.VERBOSE,truncation=10,restart=20)      mypde.getSolverOptions().setPreconditioner(SolverOptions.JACOBI)
2036            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2037        mypde.getSolverOptions().setTruncation(10)
2038        mypde.getSolverOptions().setRestart(20)
2039            u=mypde.getSolution()
2040          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
2041      def test_GMRES_truncation_restart_ILU0_System(self):      def test_GMRES_truncation_restart_ILU0_System(self):
2042          A=Tensor4(0.,Function(self.domain))          A=Tensor4(0.,Function(self.domain))
# Line 1885  class Test_LinearPDE_noLumping(Test_line Line 2048  class Test_LinearPDE_noLumping(Test_line
2048              Y[i]+=i              Y[i]+=i
2049          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2050          mypde.setValue(A=A,D=D,Y=Y)          mypde.setValue(A=A,D=D,Y=Y)
2051      mypde.setSolverMethod(mypde.GMRES,mypde.ILU0)      mypde.getSolverOptions().setSolverMethod(SolverOptions.GMRES)
2052          u=mypde.getSolution(verbose=self.VERBOSE,truncation=10,restart=20)      mypde.getSolverOptions().setPreconditioner(SolverOptions.ILU0)
2053            mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2054        mypde.getSolverOptions().setTruncation(10)
2055        mypde.getSolverOptions().setRestart(20)
2056            u=mypde.getSolution()
2057          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
2058    
2059  class Test_LinearPDE(Test_LinearPDE_noLumping):  class Test_LinearPDE(Test_LinearPDE_noLumping):
# Line 1894  class Test_LinearPDE(Test_LinearPDE_noLu Line 2061  class Test_LinearPDE(Test_LinearPDE_noLu
2061          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2062          try:          try:
2063             success=True             success=True
2064         mypde.setSolverMethod(mypde.LUMPING)         mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2065             mypde.setValue(A=kronecker(self.domain))             mypde.setValue(A=kronecker(self.domain))
2066             u=mypde.getSolution(verbose=self.VERBOSE)             mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2067               u=mypde.getSolution()    
2068          except ValueError:          except ValueError:
2069             success=False             success=False
2070          self.failUnless(not success,'error should be issued')          self.failUnless(not success,'error should be issued')
# Line 1904  class Test_LinearPDE(Test_LinearPDE_noLu Line 2072  class Test_LinearPDE(Test_LinearPDE_noLu
2072          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2073          try:          try:
2074             success=True             success=True
2075         mypde.setSolverMethod(mypde.LUMPING)         mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2076             mypde.setValue(B=kronecker(self.domain)[0])             mypde.setValue(B=kronecker(self.domain)[0])
2077             u=mypde.getSolution(verbose=self.VERBOSE)             mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2078               u=mypde.getSolution()
2079          except ValueError:          except ValueError:
2080             success=False             success=False
2081          self.failUnless(not success,'error should be issued')          self.failUnless(not success,'error should be issued')
# Line 1914  class Test_LinearPDE(Test_LinearPDE_noLu Line 2083  class Test_LinearPDE(Test_LinearPDE_noLu
2083          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2084          try:          try:
2085             success=True             success=True
2086         mypde.setSolverMethod(mypde.LUMPING)         mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2087             mypde.setValue(C=kronecker(self.domain)[0])             mypde.setValue(C=kronecker(self.domain)[0])
2088             u=mypde.getSolution(verbose=self.VERBOSE)             mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2089               u=mypde.getSolution()
2090          except ValueError:          except ValueError:
2091             success=False             success=False
2092          self.failUnless(not success,'error should be issued')          self.failUnless(not success,'error should be issued')
# Line 1925  class Test_LinearPDE(Test_LinearPDE_noLu Line 2095  class Test_LinearPDE(Test_LinearPDE_noLu
2095          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2096          try:          try:
2097             success=True             success=True
2098         mypde.setSolverMethod(mypde.LUMPING)         mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2099             mypde.setValue(A_reduced=kronecker(self.domain))             mypde.setValue(A_reduced=kronecker(self.domain))
2100             u=mypde.getSolution(verbose=self.VERBOSE)             mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2101               u=mypde.getSolution()
2102          except ValueError:          except ValueError:
2103             success=False             success=False
2104          self.failUnless(not success,'error should be issued')          self.failUnless(not success,'error should be issued')
# Line 1935  class Test_LinearPDE(Test_LinearPDE_noLu Line 2106  class Test_LinearPDE(Test_LinearPDE_noLu
2106          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2107          try:          try:
2108             success=True             success=True
2109         mypde.setSolverMethod(mypde.LUMPING)         mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2110             mypde.setValue(B_reduced=kronecker(self.domain)[0])             mypde.setValue(B_reduced=kronecker(self.domain)[0])
2111             u=mypde.getSolution(verbose=self.VERBOSE)             mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2112               u=mypde.getSolution()
2113          except ValueError:          except ValueError:
2114             success=False             success=False
2115          self.failUnless(not success,'error should be issued')          self.failUnless(not success,'error should be issued')
# Line 1945  class Test_LinearPDE(Test_LinearPDE_noLu Line 2117  class Test_LinearPDE(Test_LinearPDE_noLu
2117          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2118          try:          try:
2119             success=True             success=True
2120         mypde.setSolverMethod(mypde.LUMPING)         mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2121             mypde.setValue(C_reduced=kronecker(self.domain)[0])             mypde.setValue(C_reduced=kronecker(self.domain)[0])
2122             u=mypde.getSolution(verbose=self.VERBOSE)             mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2123               u=mypde.getSolution()
2124          except ValueError:          except ValueError:
2125             success=False             success=False
2126          self.failUnless(not success,'error should be issued')          self.failUnless(not success,'error should be issued')
2127                    
2128      def test_Lumping(self):      def test_Lumping(self):
2129          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2130      mypde.setSolverMethod(mypde.LUMPING)      mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2131          mypde.setValue(D=1.,Y=1.)          mypde.setValue(D=1.,Y=1.)
2132          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2133            u=mypde.getSolution()
2134          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
2135      def test_Constrained_Lumping(self):      def test_Constrained_Lumping(self):
2136          x=self.domain.getX()          x=self.domain.getX()
2137          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2138      mypde.setSolverMethod(mypde.LUMPING)      mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2139          mypde.setValue(D=1.,Y=1.,q=whereZero(x[0]),r=1.)          mypde.setValue(D=1.,Y=1.,q=whereZero(x[0]),r=1.)
2140          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2141            u=mypde.getSolution()
2142          self.failUnless(self.check(u,1.),'solution is wrong.')          self.failUnless(self.check(u,1.),'solution is wrong.')
2143    
2144      def test_Lumping_System(self):      def test_Lumping_System(self):
2145          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2146      mypde.setSolverMethod(mypde.LUMPING)      mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2147          mypde.setValue(D=numpy.array([[1.,0.],[0.,2.]]),Y=numpy.array([1.,2.]))          mypde.setValue(D=numpy.array([[1.,0.],[0.,2.]]),Y=numpy.array([1.,2.]))
2148          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2149            u=mypde.getSolution()
2150          self.failUnless(self.check(u,numpy.ones((2,))),'solution is wrong.')          self.failUnless(self.check(u,numpy.ones((2,))),'solution is wrong.')
2151      def test_Constrained_Lumping_System(self):      def test_Constrained_Lumping_System(self):
2152          x=self.domain.getX()          x=self.domain.getX()
2153          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2154      mypde.setSolverMethod(mypde.LUMPING)      mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2155          mypde.setValue(D=numpy.array([[1.,0.],[0.,2.]]),Y=numpy.array([1.,2.]), \          mypde.setValue(D=numpy.array([[1.,0.],[0.,2.]]),Y=numpy.array([1.,2.]), \
2156                         q=whereZero(x[0])*[0.,1],r=[0.,1.])                         q=whereZero(x[0])*[0.,1],r=[0.,1.])
2157          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2158            u=mypde.getSolution()
2159          self.failUnless(self.check(u,numpy.ones((2,))),'solution is wrong.')          self.failUnless(self.check(u,numpy.ones((2,))),'solution is wrong.')
2160    
2161      def test_Lumping_updateRHS(self):      def test_Lumping_updateRHS(self):
2162          x=self.domain.getX()          x=self.domain.getX()
2163          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2164      mypde.setSolverMethod(mypde.LUMPING)      mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2165          mypde.setValue(D=1.,Y=1.)          mypde.setValue(D=1.,Y=1.)
2166          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2167            u=mypde.getSolution()
2168          self.failUnless(self.check(u,1.),'first solution is wrong.')          self.failUnless(self.check(u,1.),'first solution is wrong.')
2169          mypde.setValue(Y=2.,q=whereZero(x[0]),r=2.)          mypde.setValue(Y=2.,q=whereZero(x[0]),r=2.)
2170          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2171            u=mypde.getSolution()
2172          self.failUnless(self.check(u,2.),'second solution is wrong.')          self.failUnless(self.check(u,2.),'second solution is wrong.')
2173      def test_Lumping_updateOperator(self):      def test_Lumping_updateOperator(self):
2174          x=self.domain.getX()          x=self.domain.getX()
2175          mypde=LinearPDE(self.domain,debug=self.DEBUG)          mypde=LinearPDE(self.domain,debug=self.DEBUG)
2176      mypde.setSolverMethod(mypde.LUMPING)      mypde.getSolverOptions().setSolverMethod(SolverOptions.LUMPING)
2177          mypde.setValue(D=1.,Y=1.)          mypde.setValue(D=1.,Y=1.)
2178          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2179            u=mypde.getSolution()
2180          mypde.setValue(D=2.)          mypde.setValue(D=2.)
2181          u=mypde.getSolution(verbose=self.VERBOSE)          mypde.getSolverOptions().setVerbosity(self.VERBOSE)
2182            u=mypde.getSolution()
2183          self.failUnless(self.check(u,0.5),'second solution is wrong.')          self.failUnless(self.check(u,0.5),'second solution is wrong.')
2184    
2185    
# Line 2012  class Test_TransportPDE(Test_linearPDEs) Line 2193  class Test_TransportPDE(Test_linearPDEs)
2193          self.failUnless(mypde.useBackwardEuler()==False,'backward Euler should not be used')          self.failUnless(mypde.useBackwardEuler()==False,'backward Euler should not be used')
2194      def test_setCoefficient_WithWrongName(self):      def test_setCoefficient_WithWrongName(self):
2195          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2196          self.failUnlessRaises(IllegalCoefficient,mypde.setValue, ROMA=Vector(0.,FunctionOnBoundary(self.domain)))          self.failUnlessRaises(IllegalCoefficient)
2197        mypde.getSolverOptions().setSolverMethod(SolverOptions.setValue, ROMA=Vector(0.,FunctionOnBoundary(self.domain)))
2198    
2199      def test_setCoefficient_WithIllegalFunctionSpace(self):      def test_setCoefficient_WithIllegalFunctionSpace(self):
2200          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2201          self.failUnlessRaises(IllegalCoefficientFunctionSpace,mypde.setValue,C=Vector(0.,FunctionOnBoundary(self.domain)))          self.failUnlessRaises(IllegalCoefficientFunctionSpace)
2202        mypde.getSolverOptions().setSolverMethod(SolverOptions.setValue,C=Vector(0.,FunctionOnBoundary(self.domain)))
2203                    
2204      def test_resetCoefficient_WithWrongShape(self):      def test_resetCoefficient_WithWrongShape(self):
2205          mypde=TransportPDE(self.domain,numEquations=2,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=2,debug=self.DEBUG)
# Line 2028  class Test_TransportPDE(Test_linearPDEs) Line 2211  class Test_TransportPDE(Test_linearPDEs)
2211    
2212      def test_setInitialSolution_scalar_negative(self):      def test_setInitialSolution_scalar_negative(self):
2213          mypde=TransportPDE(self.domain,numSolutions=1,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=1,debug=self.DEBUG)
2214          self.failUnlessRaises(RuntimeError,mypde.setInitialSolution,-1.)          self.failUnlessRaises(RuntimeError, mypde.setInitialSolution,-1.)
2215    
2216      def test_setInitialSolution_scalar_WithWrongShape(self):      def test_setInitialSolution_scalar_WithWrongShape(self):
2217          mypde=TransportPDE(self.domain,numSolutions=1,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=1,debug=self.DEBUG)
# Line 2040  class Test_TransportPDE(Test_linearPDEs) Line 2223  class Test_TransportPDE(Test_linearPDEs)
2223    
2224      def test_setInitialSolution_system(self):      def test_setInitialSolution_system(self):
2225          mypde=TransportPDE(self.domain,numSolutions=2,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=2,debug=self.DEBUG)
2226          self.failUnlessRaises(RuntimeError,mypde.setInitialSolution,[-1,2.])          self.failUnlessRaises(RuntimeError, mypde.setInitialSolution,[-1,2.])
2227    
2228      def test_setInitialSolution_system_WithWrongShape(self):      def test_setInitialSolution_system_WithWrongShape(self):
2229          mypde=TransportPDE(self.domain,numSolutions=2,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=2,debug=self.DEBUG)
2230          self.failUnlessRaises(ValueError,mypde.setInitialSolution,1.)          self.failUnlessRaises(ValueError, mypde.setInitialSolution,1.)
2231    
2232    
2233      def test_attemptToChangeOrderAfterDefinedCoefficient(self):      def test_attemptToChangeOrderAfterDefinedCoefficient(self):
# Line 2055  class Test_TransportPDE(Test_linearPDEs) Line 2238  class Test_TransportPDE(Test_linearPDEs)
2238      def test_reducedOnConfig(self):      def test_reducedOnConfig(self):
2239          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2240          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
2241          self.failUnlessEqual((mypde.getFunctionSpaceForSolution(),mypde.getFunctionSpaceForEquation()),(ReducedSolution(self.domain),ReducedSolution(self.domain)),"reduced function spaces expected.")          self.failUnlessEqual((mypde.getFunctionSpaceForSolution(), mypde.getFunctionSpaceForEquation()),(ReducedSolution(self.domain),ReducedSolution(self.domain)),"reduced function spaces expected.")
2242      #      #
2243      #  set coefficients for scalars:      #  set coefficients for scalars:
2244      #      #
# Line 2064  class Test_TransportPDE(Test_linearPDEs) Line 2247  class Test_TransportPDE(Test_linearPDEs)
2247          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2248          mypde.setValue(M=1.)          mypde.setValue(M=1.)
2249          coeff=mypde.getCoefficient("M")          coeff=mypde.getCoefficient("M")
2250          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),Function(self.domain),1,1))
2251      def test_setCoefficient_A_Scalar(self):      def test_setCoefficient_A_Scalar(self):
2252          d=self.domain.getDim()          d=self.domain.getDim()
2253          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2254          mypde.setValue(A=numpy.ones((d,d)))          mypde.setValue(A=numpy.ones((d,d)))
2255          coeff=mypde.getCoefficient("A")          coeff=mypde.getCoefficient("A")
2256          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,d),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,d),Function(self.domain),1,1))
2257      def test_setCoefficient_B_Scalar(self):      def test_setCoefficient_B_Scalar(self):
2258          d=self.domain.getDim()          d=self.domain.getDim()
2259          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2260          mypde.setValue(B=numpy.ones((d,)))          mypde.setValue(B=numpy.ones((d,)))
2261          coeff=mypde.getCoefficient("B")          coeff=mypde.getCoefficient("B")
2262          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),Function(self.domain),1,1))
2263      def test_setCoefficient_C_Scalar(self):      def test_setCoefficient_C_Scalar(self):
2264          d=self.domain.getDim()          d=self.domain.getDim()
2265          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2266          mypde.setValue(C=numpy.ones((d,)))          mypde.setValue(C=numpy.ones((d,)))
2267          coeff=mypde.getCoefficient("C")          coeff=mypde.getCoefficient("C")
2268          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),Function(self.domain),1,1))
2269      def test_setCoefficient_D_Scalar(self):      def test_setCoefficient_D_Scalar(self):
2270          d=self.domain.getDim()          d=self.domain.getDim()
2271          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2272          mypde.setValue(D=1.)          mypde.setValue(D=1.)
2273          coeff=mypde.getCoefficient("D")          coeff=mypde.getCoefficient("D")
2274          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),Function(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),Function(self.domain),1,1))
2275      def test_setCoefficient_X_Scalar(self):      def test_setCoefficient_X_Scalar(self):
2276          d=self.domain.getDim()          d=self.domain.getDim()
2277          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2278          mypde.setValue(X=numpy.ones((d,)))          mypde.setValue(X=numpy.ones((d,)))
2279          coeff=mypde.getCoefficient("X")          coeff=mypde.getCoefficient("X")
2280          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((d,),Function(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((d,),Function(self.domain),1))
2281      def test_setCoefficient_Y_Scalar(self):      def test_setCoefficient_Y_Scalar(self):
2282          d=self.domain.getDim()          d=self.domain.getDim()
2283          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2284          mypde.setValue(Y=1.)          mypde.setValue(Y=1.)
2285          coeff=mypde.getCoefficient("Y")          coeff=mypde.getCoefficient("Y")
2286          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),Function(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),Function(self.domain),1))
2287      def test_setCoefficient_y_Scalar(self):      def test_setCoefficient_y_Scalar(self):
2288          d=self.domain.getDim()          d=self.domain.getDim()
2289          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2290          mypde.setValue(y=1.)          mypde.setValue(y=1.)
2291          coeff=mypde.getCoefficient("y")          coeff=mypde.getCoefficient("y")
2292          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1))
2293      def test_setCoefficient_d_Scalar(self):      def test_setCoefficient_d_Scalar(self):
2294          d=self.domain.getDim()          d=self.domain.getDim()
2295          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2296          mypde.setValue(d=1.)          mypde.setValue(d=1.)
2297          coeff=mypde.getCoefficient("d")          coeff=mypde.getCoefficient("d")
2298          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1,1))
2299      def test_setCoefficient_m_Scalar(self):      def test_setCoefficient_m_Scalar(self):
2300          d=self.domain.getDim()          d=self.domain.getDim()
2301          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2302          mypde.setValue(m=1.)          mypde.setValue(m=1.)
2303          coeff=mypde.getCoefficient("m")          coeff=mypde.getCoefficient("m")
2304          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),FunctionOnBoundary(self.domain),1,1))
2305      def test_setCoefficient_d_contact_Scalar(self):      def test_setCoefficient_d_contact_Scalar(self):
2306          d=self.domain.getDim()          d=self.domain.getDim()
2307          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2308          mypde.setValue(d_contact=1.)          mypde.setValue(d_contact=1.)
2309          coeff=mypde.getCoefficient("d_contact")          coeff=mypde.getCoefficient("d_contact")
2310          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),FunctionOnContactZero(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),FunctionOnContactZero(self.domain),1,1))
2311      def test_setCoefficient_y_contact_Scalar(self):      def test_setCoefficient_y_contact_Scalar(self):
2312          d=self.domain.getDim()          d=self.domain.getDim()
2313          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2314          mypde.setValue(y_contact=1.)          mypde.setValue(y_contact=1.)
2315          coeff=mypde.getCoefficient("y_contact")          coeff=mypde.getCoefficient("y_contact")
2316          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),FunctionOnContactZero(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),FunctionOnContactZero(self.domain),1))
2317    
2318      def test_setCoefficient_M_reduced_Scalar(self):      def test_setCoefficient_M_reduced_Scalar(self):
2319          d=self.domain.getDim()          d=self.domain.getDim()
2320          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2321          mypde.setValue(M_reduced=1.)          mypde.setValue(M_reduced=1.)
2322          coeff=mypde.getCoefficient("M_reduced")          coeff=mypde.getCoefficient("M_reduced")
2323          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))
2324      def test_setCoefficient_A_reduced_Scalar(self):      def test_setCoefficient_A_reduced_Scalar(self):
2325          d=self.domain.getDim()          d=self.domain.getDim()
2326          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2327          mypde.setValue(A_reduced=numpy.ones((d,d)))          mypde.setValue(A_reduced=numpy.ones((d,d)))
2328          coeff=mypde.getCoefficient("A_reduced")          coeff=mypde.getCoefficient("A_reduced")
2329          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,d),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,d),ReducedFunction(self.domain),1,1))
2330      def test_setCoefficient_B_reduced_Scalar(self):      def test_setCoefficient_B_reduced_Scalar(self):
2331          d=self.domain.getDim()          d=self.domain.getDim()
2332          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2333          mypde.setValue(B_reduced=numpy.ones((d,)))          mypde.setValue(B_reduced=numpy.ones((d,)))
2334          coeff=mypde.getCoefficient("B_reduced")          coeff=mypde.getCoefficient("B_reduced")
2335          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))
2336      def test_setCoefficient_C_reduced_Scalar(self):      def test_setCoefficient_C_reduced_Scalar(self):
2337          d=self.domain.getDim()          d=self.domain.getDim()
2338          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2339          mypde.setValue(C_reduced=numpy.ones((d,)))          mypde.setValue(C_reduced=numpy.ones((d,)))
2340          coeff=mypde.getCoefficient("C_reduced")          coeff=mypde.getCoefficient("C_reduced")
2341          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))
2342      def test_setCoefficient_D_reduced_Scalar(self):      def test_setCoefficient_D_reduced_Scalar(self):
2343          d=self.domain.getDim()          d=self.domain.getDim()
2344          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2345          mypde.setValue(D_reduced=1.)          mypde.setValue(D_reduced=1.)
2346          coeff=mypde.getCoefficient("D_reduced")          coeff=mypde.getCoefficient("D_reduced")
2347          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))
2348      def test_setCoefficient_X_reduced_Scalar(self):      def test_setCoefficient_X_reduced_Scalar(self):
2349          d=self.domain.getDim()          d=self.domain.getDim()
2350          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2351          mypde.setValue(X_reduced=numpy.ones((d,)))          mypde.setValue(X_reduced=numpy.ones((d,)))
2352          coeff=mypde.getCoefficient("X_reduced")          coeff=mypde.getCoefficient("X_reduced")
2353          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1))
2354      def test_setCoefficient_Y_reduced_Scalar(self):      def test_setCoefficient_Y_reduced_Scalar(self):
2355          d=self.domain.getDim()          d=self.domain.getDim()
2356          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2357          mypde.setValue(Y_reduced=1.)          mypde.setValue(Y_reduced=1.)
2358          coeff=mypde.getCoefficient("Y_reduced")          coeff=mypde.getCoefficient("Y_reduced")
2359          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1))
2360      def test_setCoefficient_y_reduced_Scalar(self):      def test_setCoefficient_y_reduced_Scalar(self):
2361          d=self.domain.getDim()          d=self.domain.getDim()
2362          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2363          mypde.setValue(y_reduced=1.)          mypde.setValue(y_reduced=1.)
2364          coeff=mypde.getCoefficient("y_reduced")          coeff=mypde.getCoefficient("y_reduced")
2365          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))
2366      def test_setCoefficient_m_reduced_Scalar(self):      def test_setCoefficient_m_reduced_Scalar(self):
2367          d=self.domain.getDim()          d=self.domain.getDim()
2368          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2369          mypde.setValue(m_reduced=1.)          mypde.setValue(m_reduced=1.)
2370          coeff=mypde.getCoefficient("m_reduced")          coeff=mypde.getCoefficient("m_reduced")
2371          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))
2372      def test_setCoefficient_d_reduced_Scalar(self):      def test_setCoefficient_d_reduced_Scalar(self):
2373          d=self.domain.getDim()          d=self.domain.getDim()
2374          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2375          mypde.setValue(d_reduced=1.)          mypde.setValue(d_reduced=1.)
2376          coeff=mypde.getCoefficient("d_reduced")          coeff=mypde.getCoefficient("d_reduced")
2377          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))
2378      def test_setCoefficient_d_contact_reduced_Scalar(self):      def test_setCoefficient_d_contact_reduced_Scalar(self):
2379          d=self.domain.getDim()          d=self.domain.getDim()
2380          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2381          mypde.setValue(d_contact_reduced=1.)          mypde.setValue(d_contact_reduced=1.)
2382          coeff=mypde.getCoefficient("d_contact_reduced")          coeff=mypde.getCoefficient("d_contact_reduced")
2383          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1,1))
2384      def test_setCoefficient_y_contact_reduced_Scalar(self):      def test_setCoefficient_y_contact_reduced_Scalar(self):
2385          d=self.domain.getDim()          d=self.domain.getDim()
2386          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2387          mypde.setValue(y_contact_reduced=1.)          mypde.setValue(y_contact_reduced=1.)
2388          coeff=mypde.getCoefficient("y_contact_reduced")          coeff=mypde.getCoefficient("y_contact_reduced")
2389          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1))
2390      def test_setCoefficient_r_Scalar(self):      def test_setCoefficient_r_Scalar(self):
2391          d=self.domain.getDim()          d=self.domain.getDim()
2392          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)
2393          mypde.setValue(r=1.)          mypde.setValue(r=1.)
2394          coeff=mypde.getCoefficient("r")          coeff=mypde.getCoefficient("r")
2395          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((),Solution(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((),Solution(self.domain),1))
2396      def test_setCoefficient_q_Scalar(self):      def test_setCoefficient_q_Scalar(self):
2397          d=self.domain.getDim()          d=self.domain.getDim()
2398          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)
2399          mypde.setValue(q=1.)          mypde.setValue(q=1.)
2400          coeff=mypde.getCoefficient("q")          coeff=mypde.getCoefficient("q")
2401          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((),Solution(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((),Solution(self.domain),1))
2402      def test_setCoefficient_r_Scalar_reducedOn(self):      def test_setCoefficient_r_Scalar_reducedOn(self):
2403          d=self.domain.getDim()          d=self.domain.getDim()
2404          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)
2405          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
2406          mypde.setValue(r=1.)          mypde.setValue(r=1.)
2407          coeff=mypde.getCoefficient("r")          coeff=mypde.getCoefficient("r")
2408          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((),ReducedSolution(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((),ReducedSolution(self.domain),1))
2409      def test_setCoefficient_q_Scalar_reducedOn(self):      def test_setCoefficient_q_Scalar_reducedOn(self):
2410          d=self.domain.getDim()          d=self.domain.getDim()
2411          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)
2412          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
2413          mypde.setValue(q=1.)          mypde.setValue(q=1.)
2414          coeff=mypde.getCoefficient("q")          coeff=mypde.getCoefficient("q")
2415          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((),ReducedSolution(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((),ReducedSolution(self.domain),1))
2416    
2417      def test_setCoefficient_M_reduced_Scalar_usingM(self):      def test_setCoefficient_M_reduced_Scalar_usingM(self):
2418          d=self.domain.getDim()          d=self.domain.getDim()
2419          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2420          mypde.setValue(M=Scalar(1.,ReducedFunction(self.domain)))          mypde.setValue(M=Scalar(1.,ReducedFunction(self.domain)))
2421          coeff=mypde.getCoefficient("M_reduced")          coeff=mypde.getCoefficient("M_reduced")
2422          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))
2423      def test_setCoefficient_A_reduced_Scalar_usingA(self):      def test_setCoefficient_A_reduced_Scalar_usingA(self):
2424          d=self.domain.getDim()          d=self.domain.getDim()
2425          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2426          mypde.setValue(A=Data(numpy.ones((d,d)),ReducedFunction(self.domain)))          mypde.setValue(A=Data(numpy.ones((d,d)),ReducedFunction(self.domain)))
2427          coeff=mypde.getCoefficient("A_reduced")          coeff=mypde.getCoefficient("A_reduced")
2428          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,d),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,d),ReducedFunction(self.domain),1,1))
2429      def test_setCoefficient_B_reduced_Scalar_usingB(self):      def test_setCoefficient_B_reduced_Scalar_usingB(self):
2430          d=self.domain.getDim()          d=self.domain.getDim()
2431          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2432          mypde.setValue(B=Data(numpy.ones((d,)),ReducedFunction(self.domain)))          mypde.setValue(B=Data(numpy.ones((d,)),ReducedFunction(self.domain)))
2433          coeff=mypde.getCoefficient("B_reduced")          coeff=mypde.getCoefficient("B_reduced")
2434          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))
2435      def test_setCoefficient_C_reduced_Scalar_usingC(self):      def test_setCoefficient_C_reduced_Scalar_usingC(self):
2436          d=self.domain.getDim()          d=self.domain.getDim()
2437          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2438          mypde.setValue(C=Data(numpy.ones((d,)),ReducedFunction(self.domain)))          mypde.setValue(C=Data(numpy.ones((d,)),ReducedFunction(self.domain)))
2439          coeff=mypde.getCoefficient("C_reduced")          coeff=mypde.getCoefficient("C_reduced")
2440          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1,1))
2441      def test_setCoefficient_D_reduced_Scalar_usingD(self):      def test_setCoefficient_D_reduced_Scalar_usingD(self):
2442          d=self.domain.getDim()          d=self.domain.getDim()
2443          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2444          mypde.setValue(D=Scalar(1.,ReducedFunction(self.domain)))          mypde.setValue(D=Scalar(1.,ReducedFunction(self.domain)))
2445          coeff=mypde.getCoefficient("D_reduced")          coeff=mypde.getCoefficient("D_reduced")
2446          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1,1))
2447      def test_setCoefficient_X_reduced_Scalar_usingX(self):      def test_setCoefficient_X_reduced_Scalar_usingX(self):
2448          d=self.domain.getDim()          d=self.domain.getDim()
2449          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2450          mypde.setValue(X_reduced=Data(numpy.ones((d,)),ReducedFunction(self.domain)))          mypde.setValue(X_reduced=Data(numpy.ones((d,)),ReducedFunction(self.domain)))
2451          coeff=mypde.getCoefficient("X_reduced")          coeff=mypde.getCoefficient("X_reduced")
2452          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((d,),ReducedFunction(self.domain),1))
2453      def test_setCoefficient_Y_reduced_Scalar_usingY(self):      def test_setCoefficient_Y_reduced_Scalar_usingY(self):
2454          d=self.domain.getDim()          d=self.domain.getDim()
2455          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2456          mypde.setValue(Y=Scalar(1.,ReducedFunction(self.domain)))          mypde.setValue(Y=Scalar(1.,ReducedFunction(self.domain)))
2457          coeff=mypde.getCoefficient("Y_reduced")          coeff=mypde.getCoefficient("Y_reduced")
2458          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunction(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunction(self.domain),1))
2459      def test_setCoefficient_y_reduced_Scalar_using_y(self):      def test_setCoefficient_y_reduced_Scalar_using_y(self):
2460          d=self.domain.getDim()          d=self.domain.getDim()
2461          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2462          mypde.setValue(y=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(y=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))
2463          coeff=mypde.getCoefficient("y_reduced")          coeff=mypde.getCoefficient("y_reduced")
2464          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))
2465      def test_setCoefficient_m_reduced_Scalar_using_m(self):      def test_setCoefficient_m_reduced_Scalar_using_m(self):
2466          d=self.domain.getDim()          d=self.domain.getDim()
2467          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2468          mypde.setValue(d=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(d=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))
2469          coeff=mypde.getCoefficient("d_reduced")          coeff=mypde.getCoefficient("d_reduced")
2470          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))
2471      def test_setCoefficient_d_reduced_Scalar_using_d(self):      def test_setCoefficient_d_reduced_Scalar_using_d(self):
2472          d=self.domain.getDim()          d=self.domain.getDim()
2473          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2474          mypde.setValue(m=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(m=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))
2475          coeff=mypde.getCoefficient("m_reduced")          coeff=mypde.getCoefficient("m_reduced")
2476          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1,1))
2477      def test_setCoefficient_d_contact_reduced_Scalar_using_d_contact(self):      def test_setCoefficient_d_contact_reduced_Scalar_using_d_contact(self):
2478          d=self.domain.getDim()          d=self.domain.getDim()
2479          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2480          mypde.setValue(d_contact=Scalar(1.,ReducedFunctionOnContactZero(self.domain)))          mypde.setValue(d_contact=Scalar(1.,ReducedFunctionOnContactZero(self.domain)))
2481          coeff=mypde.getCoefficient("d_contact_reduced")          coeff=mypde.getCoefficient("d_contact_reduced")
2482          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1,1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1,1))
2483      def test_setCoefficient_y_contact_reduced_Scalar_using_y_contact(self):      def test_setCoefficient_y_contact_reduced_Scalar_using_y_contact(self):
2484          d=self.domain.getDim()          d=self.domain.getDim()
2485          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2486          mypde.setValue(y_contact=Scalar(1.,ReducedFunctionOnContactZero(self.domain)))          mypde.setValue(y_contact=Scalar(1.,ReducedFunctionOnContactZero(self.domain)))
2487          coeff=mypde.getCoefficient("y_contact_reduced")          coeff=mypde.getCoefficient("y_contact_reduced")
2488          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((),ReducedFunctionOnContactZero(self.domain),1))
2489      #      #
2490      #  set coefficients for systems:      #  set coefficients for systems:
2491      #      #
# Line 2311  class Test_TransportPDE(Test_linearPDEs) Line 2494  class Test_TransportPDE(Test_linearPDEs)
2494          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2495          mypde.setValue(M=numpy.ones((self.N,self.N)))          mypde.setValue(M=numpy.ones((self.N,self.N)))
2496          coeff=mypde.getCoefficient("M")          coeff=mypde.getCoefficient("M")
2497          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),Function(self.domain),self.N,self.N))
2498      def test_setCoefficient_A_System(self):      def test_setCoefficient_A_System(self):
2499          d=self.domain.getDim()          d=self.domain.getDim()
2500          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2501          mypde.setValue(A=numpy.ones((self.N,d,self.N,d)))          mypde.setValue(A=numpy.ones((self.N,d,self.N,d)))
2502          coeff=mypde.getCoefficient("A")          coeff=mypde.getCoefficient("A")
2503          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N,d),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N,d),Function(self.domain),self.N,self.N))
2504      def test_setCoefficient_B_System(self):      def test_setCoefficient_B_System(self):
2505          d=self.domain.getDim()          d=self.domain.getDim()
2506          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2507          mypde.setValue(B=numpy.ones((self.N,d,self.N)))          mypde.setValue(B=numpy.ones((self.N,d,self.N)))
2508          coeff=mypde.getCoefficient("B")          coeff=mypde.getCoefficient("B")
2509          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N),Function(self.domain),self.N,self.N))
2510      def test_setCoefficient_C_System(self):      def test_setCoefficient_C_System(self):
2511          d=self.domain.getDim()          d=self.domain.getDim()
2512          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2513          mypde.setValue(C=numpy.ones((self.N,self.N,d)))          mypde.setValue(C=numpy.ones((self.N,self.N,d)))
2514          coeff=mypde.getCoefficient("C")          coeff=mypde.getCoefficient("C")
2515          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N,d),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N,d),Function(self.domain),self.N,self.N))
2516      def test_setCoefficient_D_System(self):      def test_setCoefficient_D_System(self):
2517          d=self.domain.getDim()          d=self.domain.getDim()
2518          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2519          mypde.setValue(D=numpy.ones((self.N,self.N)))          mypde.setValue(D=numpy.ones((self.N,self.N)))
2520          coeff=mypde.getCoefficient("D")          coeff=mypde.getCoefficient("D")
2521          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),Function(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),Function(self.domain),self.N,self.N))
2522      def test_setCoefficient_X_System(self):      def test_setCoefficient_X_System(self):
2523          d=self.domain.getDim()          d=self.domain.getDim()
2524          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2525          mypde.setValue(X=numpy.ones((self.N,d)))          mypde.setValue(X=numpy.ones((self.N,d)))
2526          coeff=mypde.getCoefficient("X")          coeff=mypde.getCoefficient("X")
2527          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,d),Function(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,d),Function(self.domain),self.N))
2528      def test_setCoefficient_Y_System(self):      def test_setCoefficient_Y_System(self):
2529          d=self.domain.getDim()          d=self.domain.getDim()
2530          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2531          mypde.setValue(Y=numpy.ones((self.N,)))          mypde.setValue(Y=numpy.ones((self.N,)))
2532          coeff=mypde.getCoefficient("Y")          coeff=mypde.getCoefficient("Y")
2533          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),Function(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),Function(self.domain),self.N))
2534      def test_setCoefficient_y_System(self):      def test_setCoefficient_y_System(self):
2535          d=self.domain.getDim()          d=self.domain.getDim()
2536          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2537          mypde.setValue(y=numpy.ones((self.N,)))          mypde.setValue(y=numpy.ones((self.N,)))
2538          coeff=mypde.getCoefficient("y")          coeff=mypde.getCoefficient("y")
2539          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),FunctionOnBoundary(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),FunctionOnBoundary(self.domain),self.N))
2540      def test_setCoefficient_m_System(self):      def test_setCoefficient_m_System(self):
2541          d=self.domain.getDim()          d=self.domain.getDim()
2542          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2543          mypde.setValue(m=numpy.ones((self.N,self.N)))          mypde.setValue(m=numpy.ones((self.N,self.N)))
2544          coeff=mypde.getCoefficient("m")          coeff=mypde.getCoefficient("m")
2545          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),FunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),FunctionOnBoundary(self.domain),self.N,self.N))
2546      def test_setCoefficient_d_System(self):      def test_setCoefficient_d_System(self):
2547          d=self.domain.getDim()          d=self.domain.getDim()
2548          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2549          mypde.setValue(d=numpy.ones((self.N,self.N)))          mypde.setValue(d=numpy.ones((self.N,self.N)))
2550          coeff=mypde.getCoefficient("d")          coeff=mypde.getCoefficient("d")
2551          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),FunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),FunctionOnBoundary(self.domain),self.N,self.N))
2552      def test_setCoefficient_d_contact_System(self):      def test_setCoefficient_d_contact_System(self):
2553          d=self.domain.getDim()          d=self.domain.getDim()
2554          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2555          mypde.setValue(d_contact=numpy.ones((self.N,self.N)))          mypde.setValue(d_contact=numpy.ones((self.N,self.N)))
2556          coeff=mypde.getCoefficient("d_contact")          coeff=mypde.getCoefficient("d_contact")
2557          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),FunctionOnContactZero(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),FunctionOnContactZero(self.domain),self.N,self.N))
2558      def test_setCoefficient_y_contact_System(self):      def test_setCoefficient_y_contact_System(self):
2559          d=self.domain.getDim()          d=self.domain.getDim()
2560          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2561          mypde.setValue(y_contact=numpy.ones((self.N,)))          mypde.setValue(y_contact=numpy.ones((self.N,)))
2562          coeff=mypde.getCoefficient("y_contact")          coeff=mypde.getCoefficient("y_contact")
2563          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),FunctionOnContactZero(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),FunctionOnContactZero(self.domain),self.N))
2564      def test_setCoefficient_M_System_reduced(self):      def test_setCoefficient_M_System_reduced(self):
2565          d=self.domain.getDim()          d=self.domain.getDim()
2566          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2567          mypde.setValue(M_reduced=numpy.ones((self.N,self.N)))          mypde.setValue(M_reduced=numpy.ones((self.N,self.N)))
2568          coeff=mypde.getCoefficient("M_reduced")          coeff=mypde.getCoefficient("M_reduced")
2569          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))
2570      def test_setCoefficient_A_reduced_System(self):      def test_setCoefficient_A_reduced_System(self):
2571          d=self.domain.getDim()          d=self.domain.getDim()
2572          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2573          mypde.setValue(A_reduced=numpy.ones((self.N,d,self.N,d)))          mypde.setValue(A_reduced=numpy.ones((self.N,d,self.N,d)))
2574          coeff=mypde.getCoefficient("A_reduced")          coeff=mypde.getCoefficient("A_reduced")
2575          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N,d),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N,d),ReducedFunction(self.domain),self.N,self.N))
2576      def test_setCoefficient_B_reduced_System(self):      def test_setCoefficient_B_reduced_System(self):
2577          d=self.domain.getDim()          d=self.domain.getDim()
2578          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2579          mypde.setValue(B_reduced=numpy.ones((self.N,d,self.N)))          mypde.setValue(B_reduced=numpy.ones((self.N,d,self.N)))
2580          coeff=mypde.getCoefficient("B_reduced")          coeff=mypde.getCoefficient("B_reduced")
2581          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N),ReducedFunction(self.domain),self.N,self.N))
2582      def test_setCoefficient_C_reduced_System(self):      def test_setCoefficient_C_reduced_System(self):
2583          d=self.domain.getDim()          d=self.domain.getDim()
2584          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2585          mypde.setValue(C_reduced=numpy.ones((self.N,self.N,d)))          mypde.setValue(C_reduced=numpy.ones((self.N,self.N,d)))
2586          coeff=mypde.getCoefficient("C_reduced")          coeff=mypde.getCoefficient("C_reduced")
2587          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N,d),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N,d),ReducedFunction(self.domain),self.N,self.N))
2588      def test_setCoefficient_D_System_reduced(self):      def test_setCoefficient_D_System_reduced(self):
2589          d=self.domain.getDim()          d=self.domain.getDim()
2590          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2591          mypde.setValue(D_reduced=numpy.ones((self.N,self.N)))          mypde.setValue(D_reduced=numpy.ones((self.N,self.N)))
2592          coeff=mypde.getCoefficient("D_reduced")          coeff=mypde.getCoefficient("D_reduced")
2593          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))
2594      def test_setCoefficient_X_System_reduced(self):      def test_setCoefficient_X_System_reduced(self):
2595          d=self.domain.getDim()          d=self.domain.getDim()
2596          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2597          mypde.setValue(X_reduced=numpy.ones((self.N,d)))          mypde.setValue(X_reduced=numpy.ones((self.N,d)))
2598          coeff=mypde.getCoefficient("X_reduced")          coeff=mypde.getCoefficient("X_reduced")
2599          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,d),ReducedFunction(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,d),ReducedFunction(self.domain),self.N))
2600      def test_setCoefficient_Y_System_reduced(self):      def test_setCoefficient_Y_System_reduced(self):
2601          d=self.domain.getDim()          d=self.domain.getDim()
2602          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2603          mypde.setValue(Y_reduced=numpy.ones((self.N,)))          mypde.setValue(Y_reduced=numpy.ones((self.N,)))
2604          coeff=mypde.getCoefficient("Y_reduced")          coeff=mypde.getCoefficient("Y_reduced")
2605          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunction(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunction(self.domain),self.N))
2606      def test_setCoefficient_y_System_reduced(self):      def test_setCoefficient_y_System_reduced(self):
2607          d=self.domain.getDim()          d=self.domain.getDim()
2608          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2609          mypde.setValue(y_reduced=numpy.ones((self.N,)))          mypde.setValue(y_reduced=numpy.ones((self.N,)))
2610          coeff=mypde.getCoefficient("y_reduced")          coeff=mypde.getCoefficient("y_reduced")
2611          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunctionOnBoundary(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunctionOnBoundary(self.domain),self.N))
2612      def test_setCoefficient_m_reduced_System(self):      def test_setCoefficient_m_reduced_System(self):
2613          d=self.domain.getDim()          d=self.domain.getDim()
2614          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2615          mypde.setValue(m_reduced=numpy.ones((self.N,self.N)))          mypde.setValue(m_reduced=numpy.ones((self.N,self.N)))
2616          coeff=mypde.getCoefficient("m_reduced")          coeff=mypde.getCoefficient("m_reduced")
2617          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))
2618      def test_setCoefficient_d_reduced_System(self):      def test_setCoefficient_d_reduced_System(self):
2619          d=self.domain.getDim()          d=self.domain.getDim()
2620          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2621          mypde.setValue(d_reduced=numpy.ones((self.N,self.N)))          mypde.setValue(d_reduced=numpy.ones((self.N,self.N)))
2622          coeff=mypde.getCoefficient("d_reduced")          coeff=mypde.getCoefficient("d_reduced")
2623          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))
2624      def test_setCoefficient_d_contact_reduced_System(self):      def test_setCoefficient_d_contact_reduced_System(self):
2625          d=self.domain.getDim()          d=self.domain.getDim()
2626          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2627          mypde.setValue(d_contact_reduced=numpy.ones((self.N,self.N)))          mypde.setValue(d_contact_reduced=numpy.ones((self.N,self.N)))
2628          coeff=mypde.getCoefficient("d_contact_reduced")          coeff=mypde.getCoefficient("d_contact_reduced")
2629          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnContactZero(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnContactZero(self.domain),self.N,self.N))
2630      def test_setCoefficient_y_contact_reduced_System(self):      def test_setCoefficient_y_contact_reduced_System(self):
2631          d=self.domain.getDim()          d=self.domain.getDim()
2632          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2633          mypde.setValue(y_contact_reduced=numpy.ones((self.N,)))          mypde.setValue(y_contact_reduced=numpy.ones((self.N,)))
2634          coeff=mypde.getCoefficient("y_contact_reduced")          coeff=mypde.getCoefficient("y_contact_reduced")
2635          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunctionOnContactZero(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunctionOnContactZero(self.domain),self.N))
2636      def test_setCoefficient_r_System(self):      def test_setCoefficient_r_System(self):
2637          d=self.domain.getDim()          d=self.domain.getDim()
2638          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)
2639          mypde.setValue(r=numpy.ones((self.N,)))          mypde.setValue(r=numpy.ones((self.N,)))
2640          coeff=mypde.getCoefficient("r")          coeff=mypde.getCoefficient("r")
2641          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((self.N,),Solution(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((self.N,),Solution(self.domain),self.N))
2642      def test_setCoefficient_q_System(self):      def test_setCoefficient_q_System(self):
2643          d=self.domain.getDim()          d=self.domain.getDim()
2644          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)
2645          mypde.setValue(q=numpy.ones((self.N,)))          mypde.setValue(q=numpy.ones((self.N,)))
2646          coeff=mypde.getCoefficient("q")          coeff=mypde.getCoefficient("q")
2647          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((self.N,),Solution(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((self.N,),Solution(self.domain),self.N))
2648      def test_setCoefficient_r_System_reducedOn(self):      def test_setCoefficient_r_System_reducedOn(self):
2649          d=self.domain.getDim()          d=self.domain.getDim()
2650          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)
2651          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
2652          mypde.setValue(r=numpy.ones((self.N,)))          mypde.setValue(r=numpy.ones((self.N,)))
2653          coeff=mypde.getCoefficient("r")          coeff=mypde.getCoefficient("r")
2654          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((self.N,),ReducedSolution(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((self.N,),ReducedSolution(self.domain),self.N))
2655      def test_setCoefficient_q_System_reducedOn(self):      def test_setCoefficient_q_System_reducedOn(self):
2656          d=self.domain.getDim()          d=self.domain.getDim()
2657          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numEquations=3,debug=self.DEBUG)
2658          mypde.setReducedOrderOn()          mypde.setReducedOrderOn()
2659          mypde.setValue(q=numpy.ones((self.N,)))          mypde.setValue(q=numpy.ones((self.N,)))
2660          coeff=mypde.getCoefficient("q")          coeff=mypde.getCoefficient("q")
2661          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions()),((self.N,),ReducedSolution(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions()),((self.N,),ReducedSolution(self.domain),self.N))
2662    
2663      def test_setCoefficient_M_System_reduced_using_D(self):      def test_setCoefficient_M_System_reduced_using_D(self):
2664          d=self.domain.getDim()          d=self.domain.getDim()
2665          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2666          mypde.setValue(M=Data(numpy.ones((self.N,self.N)),ReducedFunction(self.domain)))          mypde.setValue(M=Data(numpy.ones((self.N,self.N)),ReducedFunction(self.domain)))
2667          coeff=mypde.getCoefficient("M_reduced")          coeff=mypde.getCoefficient("M_reduced")
2668          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))
2669      def test_setCoefficient_A_reduced_System_using_A(self):      def test_setCoefficient_A_reduced_System_using_A(self):
2670          d=self.domain.getDim()          d=self.domain.getDim()
2671          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2672          mypde.setValue(A=Data(numpy.ones((self.N,d,self.N,d)),ReducedFunction(self.domain)))          mypde.setValue(A=Data(numpy.ones((self.N,d,self.N,d)),ReducedFunction(self.domain)))
2673          coeff=mypde.getCoefficient("A_reduced")          coeff=mypde.getCoefficient("A_reduced")
2674          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N,d),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N,d),ReducedFunction(self.domain),self.N,self.N))
2675      def test_setCoefficient_B_reduced_System_using_B(self):      def test_setCoefficient_B_reduced_System_using_B(self):
2676          d=self.domain.getDim()          d=self.domain.getDim()
2677          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2678          mypde.setValue(B=Data(numpy.ones((self.N,d,self.N)),ReducedFunction(self.domain)))          mypde.setValue(B=Data(numpy.ones((self.N,d,self.N)),ReducedFunction(self.domain)))
2679          coeff=mypde.getCoefficient("B_reduced")          coeff=mypde.getCoefficient("B_reduced")
2680          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,d,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,d,self.N),ReducedFunction(self.domain),self.N,self.N))
2681      def test_setCoefficient_C_reduced_System_using_C(self):      def test_setCoefficient_C_reduced_System_using_C(self):
2682          d=self.domain.getDim()          d=self.domain.getDim()
2683          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2684          mypde.setValue(C=Data(numpy.ones((self.N,self.N,d)),ReducedFunction(self.domain)))          mypde.setValue(C=Data(numpy.ones((self.N,self.N,d)),ReducedFunction(self.domain)))
2685          coeff=mypde.getCoefficient("C_reduced")          coeff=mypde.getCoefficient("C_reduced")
2686          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N,d),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N,d),ReducedFunction(self.domain),self.N,self.N))
2687      def test_setCoefficient_D_System_reduced_using_D(self):      def test_setCoefficient_D_System_reduced_using_D(self):
2688          d=self.domain.getDim()          d=self.domain.getDim()
2689          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2690          mypde.setValue(D=Data(numpy.ones((self.N,self.N)),ReducedFunction(self.domain)))          mypde.setValue(D=Data(numpy.ones((self.N,self.N)),ReducedFunction(self.domain)))
2691          coeff=mypde.getCoefficient("D_reduced")          coeff=mypde.getCoefficient("D_reduced")
2692          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunction(self.domain),self.N,self.N))
2693      def test_setCoefficient_X_System_reduced_using_X(self):      def test_setCoefficient_X_System_reduced_using_X(self):
2694          d=self.domain.getDim()          d=self.domain.getDim()
2695          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2696          mypde.setValue(X=Data(numpy.ones((self.N,d)),ReducedFunction(self.domain)))          mypde.setValue(X=Data(numpy.ones((self.N,d)),ReducedFunction(self.domain)))
2697          coeff=mypde.getCoefficient("X_reduced")          coeff=mypde.getCoefficient("X_reduced")
2698          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,d),ReducedFunction(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,d),ReducedFunction(self.domain),self.N))
2699      def test_setCoefficient_Y_System_reduced_using_Y(self):      def test_setCoefficient_Y_System_reduced_using_Y(self):
2700          d=self.domain.getDim()          d=self.domain.getDim()
2701          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2702          mypde.setValue(Y=Data(numpy.ones((self.N,)),ReducedFunction(self.domain)))          mypde.setValue(Y=Data(numpy.ones((self.N,)),ReducedFunction(self.domain)))
2703          coeff=mypde.getCoefficient("Y_reduced")          coeff=mypde.getCoefficient("Y_reduced")
2704          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunction(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunction(self.domain),self.N))
2705      def test_setCoefficient_y_reduced_System_using_y(self):      def test_setCoefficient_y_reduced_System_using_y(self):
2706          d=self.domain.getDim()          d=self.domain.getDim()
2707          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2708          mypde.setValue(y=Data(numpy.ones((self.N,)),ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(y=Data(numpy.ones((self.N,)),ReducedFunctionOnBoundary(self.domain)))
2709          coeff=mypde.getCoefficient("y_reduced")          coeff=mypde.getCoefficient("y_reduced")
2710          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunctionOnBoundary(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunctionOnBoundary(self.domain),self.N))
2711      def test_setCoefficient_m_reduced_System_using_m(self):      def test_setCoefficient_m_reduced_System_using_m(self):
2712          d=self.domain.getDim()          d=self.domain.getDim()
2713          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2714          mypde.setValue(m=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(m=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnBoundary(self.domain)))
2715          coeff=mypde.getCoefficient("m_reduced")          coeff=mypde.getCoefficient("m_reduced")
2716          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))
2717      def test_setCoefficient_d_reduced_System_using_d(self):      def test_setCoefficient_d_reduced_System_using_d(self):
2718          d=self.domain.getDim()          d=self.domain.getDim()
2719          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2720          mypde.setValue(d=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnBoundary(self.domain)))          mypde.setValue(d=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnBoundary(self.domain)))
2721          coeff=mypde.getCoefficient("d_reduced")          coeff=mypde.getCoefficient("d_reduced")
2722          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnBoundary(self.domain),self.N,self.N))
2723      def test_setCoefficient_d_contact_reduced_System_using_d_contact(self):      def test_setCoefficient_d_contact_reduced_System_using_d_contact(self):
2724          d=self.domain.getDim()          d=self.domain.getDim()
2725          mypde=TransportPDE(self.domain,debug=self.DEBUG)          mypde=TransportPDE(self.domain,debug=self.DEBUG)
2726          mypde.setValue(d_contact=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnContactZero(self.domain)))          mypde.setValue(d_contact=Data(numpy.ones((self.N,self.N)),ReducedFunctionOnContactZero(self.domain)))
2727          coeff=mypde.getCoefficient("d_contact_reduced")          coeff=mypde.getCoefficient("d_contact_reduced")
2728          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumSolutions(),mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnContactZero(self.domain),self.N,self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumSolutions(), mypde.getNumEquations()),((self.N,self.N),ReducedFunctionOnContactZero(self.domain),self.N,self.N))
2729      def test_setCoefficient_y_contact_reduced_System_using_y_contact(self):      def test_setCoefficient_y_contact_reduced_System_using_y_contact(self):
2730          d=self.domain.getDim()          d=self.domain.getDim()
2731          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)          mypde=TransportPDE(self.domain,numSolutions=3,debug=self.DEBUG)
2732          mypde.setValue(y_contact=Data(numpy.ones((self.N,)),ReducedFunctionOnContactZero(self.domain)))          mypde.setValue(y_contact=Data(numpy.ones((self.N,)),ReducedFunctionOnContactZero(self.domain)))
2733          coeff=mypde.getCoefficient("y_contact_reduced")          coeff=mypde.getCoefficient("y_contact_reduced")
2734          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((self.N,),ReducedFunctionOnContactZero(self.domain),self.N))          self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(), mypde.getNumEquations()),((self.N,),ReducedFunctionOnContactZero(self.domain),self.N))
2735    
2736      def test_symmetryCheckTrue_System(self):      def test_symmetryCheckTrue_System(self):
2737          d=self.domain.getDim()          d=self.domain.getDim()

Legend:
Removed from v.2470  
changed lines
  Added in v.2474

  ViewVC Help
Powered by ViewVC 1.1.26