Parent Directory
|
Revision Log
|
Patch
revision 798 by gross, Fri Aug 4 01:05:36 2006 UTC | revision 1072 by gross, Thu Mar 29 06:44:30 2007 UTC | |
---|---|---|
# | Line 8022 class Test_assemblage_2Do1(unittest.Test | Line 8022 class Test_assemblage_2Do1(unittest.Test |
8022 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8023 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
8024 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") |
class Test_assemblage_2Do1_Reduced(unittest.TestCase): | ||
8025 | #================================================== | #================================================== |
8026 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp00(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp00(self): |
8027 | x=self.domain.getX() | x=self.domain.getX() |
8028 | u=(-5)-9*x[1]-5*x[0] | u=(-1)+2*x[1]+6*x[0] |
8029 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8030 | A_test[0,0]=6 | A_test[0,0]=5 |
8031 | Y_test=0 | Y_test=0 |
8032 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8033 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8034 | y_test=n[0]*((-30)) | y_test=n[0]*(30) |
8035 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8036 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8037 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8038 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8039 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8043 class Test_assemblage_2Do1_Reduced(unitt | Line 8041 class Test_assemblage_2Do1_Reduced(unitt |
8041 | #================================================== | #================================================== |
8042 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp01(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp01(self): |
8043 | x=self.domain.getX() | x=self.domain.getX() |
8044 | u=6+5*x[1]-1*x[0] | u=7-1*x[1]-8*x[0] |
8045 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8046 | A_test[0,1]=1 | A_test[0,1]=6 |
8047 | Y_test=0 | Y_test=0 |
8048 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8049 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8050 | y_test=n[0]*(5) | y_test=n[0]*((-6)) |
8051 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8052 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8053 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8054 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8055 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8059 class Test_assemblage_2Do1_Reduced(unitt | Line 8057 class Test_assemblage_2Do1_Reduced(unitt |
8057 | #================================================== | #================================================== |
8058 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp10(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp10(self): |
8059 | x=self.domain.getX() | x=self.domain.getX() |
8060 | u=2-6*x[1]-9*x[0] | u=(-7)+3*x[1]+3*x[0] |
8061 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8062 | A_test[1,0]=2 | A_test[1,0]=5 |
8063 | Y_test=0 | Y_test=0 |
8064 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8065 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8066 | y_test=n[1]*((-18)) | y_test=n[1]*(15) |
8067 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8068 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8069 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8070 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8071 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8075 class Test_assemblage_2Do1_Reduced(unitt | Line 8073 class Test_assemblage_2Do1_Reduced(unitt |
8073 | #================================================== | #================================================== |
8074 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp11(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeStrong_comp11(self): |
8075 | x=self.domain.getX() | x=self.domain.getX() |
8076 | u=7+3*x[1]+8*x[0] | u=(-8)+7*x[1]+3*x[0] |
8077 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8078 | A_test[1,1]=1 | A_test[1,1]=2 |
8079 | Y_test=0 | Y_test=0 |
8080 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8081 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8082 | y_test=n[1]*(3) | y_test=n[1]*(14) |
8083 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8084 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8085 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8086 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8087 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8091 class Test_assemblage_2Do1_Reduced(unitt | Line 8089 class Test_assemblage_2Do1_Reduced(unitt |
8089 | #================================================== | #================================================== |
8090 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp0(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp0(self): |
8091 | x=self.domain.getX() | x=self.domain.getX() |
8092 | u=(-1)+6*x[1]+7*x[0] | u=(-5) |
8093 | B_test=Data(0.,(2,),ReducedFunction(self.domain)) | B_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8094 | B_test[0]=8 | B_test[0]=1 |
8095 | Y_test=(-56) | Y_test=0 |
8096 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8097 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8098 | y_test=n[0]*((-8)+48*x[1]+56*x[0]) | y_test=n[0]*((-5)) |
8099 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8100 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8101 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8102 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8103 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8107 class Test_assemblage_2Do1_Reduced(unitt | Line 8105 class Test_assemblage_2Do1_Reduced(unitt |
8105 | #================================================== | #================================================== |
8106 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp1(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeStrong_comp1(self): |
8107 | x=self.domain.getX() | x=self.domain.getX() |
8108 | u=8-2*x[1]-4*x[0] | u=(-7) |
8109 | B_test=Data(0.,(2,),ReducedFunction(self.domain)) | B_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8110 | B_test[1]=1 | B_test[1]=7 |
8111 | Y_test=2 | Y_test=0 |
8112 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8113 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8114 | y_test=n[1]*(8-2*x[1]-4*x[0]) | y_test=n[1]*((-49)) |
8115 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8116 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8117 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8118 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8119 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8123 class Test_assemblage_2Do1_Reduced(unitt | Line 8121 class Test_assemblage_2Do1_Reduced(unitt |
8121 | #================================================== | #================================================== |
8122 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp0(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp0(self): |
8123 | x=self.domain.getX() | x=self.domain.getX() |
8124 | u=(-8)+5*x[1]+8*x[0] | u=(-2)-4*x[1]+2*x[0] |
8125 | C_test=Data(0.,(2,),ReducedFunction(self.domain)) | C_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8126 | C_test[0]=2 | C_test[0]=3 |
8127 | Y_test=16 | Y_test=6 |
8128 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8129 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
8130 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8131 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8132 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8136 class Test_assemblage_2Do1_Reduced(unitt | Line 8134 class Test_assemblage_2Do1_Reduced(unitt |
8134 | #================================================== | #================================================== |
8135 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp1(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Const_typeStrong_comp1(self): |
8136 | x=self.domain.getX() | x=self.domain.getX() |
8137 | u=(-2)-3*x[1]-2*x[0] | u=(-6)+4*x[1]-2*x[0] |
8138 | C_test=Data(0.,(2,),ReducedFunction(self.domain)) | C_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8139 | C_test[1]=3 | C_test[1]=2 |
8140 | Y_test=(-9) | Y_test=8 |
8141 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8142 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
8143 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8144 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8145 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8149 class Test_assemblage_2Do1_Reduced(unitt | Line 8147 class Test_assemblage_2Do1_Reduced(unitt |
8147 | #================================================== | #================================================== |
8148 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_D_Const_typeStrong(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_D_Const_typeStrong(self): |
8149 | x=self.domain.getX() | x=self.domain.getX() |
8150 | u=(-4)+4*x[1]-4*x[0] | u=(-8)-7*x[1]+4*x[0] |
8151 | D_test=Data(2,(),ReducedFunction(self.domain)) | D_test=Data(5,(),ReducedFunction(self.domain)) |
8152 | Y_test=(-8)+8*x[1]-8*x[0] | Y_test=(-40)-35*x[1]+20*x[0] |
8153 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8154 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
8155 | r=pde.getResidual(u) | |
8156 | rhs=pde.getRightHandSide() | |
8157 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
8158 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
8159 | #================================================== | |
8160 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_d_Const_typeStrong(self): | |
8161 | x=self.domain.getX() | |
8162 | u=4+7*x[1]+3*x[0] | |
8163 | d_test=Data(8,(),ReducedFunctionOnBoundary(self.domain)) | |
8164 | y_test=32+56*x[1]+24*x[0] | |
8165 | pde=LinearPDE(self.domain) | |
8166 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
8167 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8168 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8169 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8161 class Test_assemblage_2Do1_Reduced(unitt | Line 8171 class Test_assemblage_2Do1_Reduced(unitt |
8171 | #================================================== | #================================================== |
8172 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp00(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp00(self): |
8173 | x=self.domain.getX() | x=self.domain.getX() |
8174 | u=1-7*x[1]-7*x[0] | u=(-5)+5*x[1]-1*x[0] |
8175 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8176 | A_test[0,0]=x[0] | A_test[0,0]=x[0] |
8177 | Y_test=7 | Y_test=1 |
8178 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8179 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8180 | y_test=n[0]*((-7)*x[0]) | y_test=n[0]*((-1)*x[0]) |
8181 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8182 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8183 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8184 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8185 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8177 class Test_assemblage_2Do1_Reduced(unitt | Line 8187 class Test_assemblage_2Do1_Reduced(unitt |
8187 | #================================================== | #================================================== |
8188 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp01(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp01(self): |
8189 | x=self.domain.getX() | x=self.domain.getX() |
8190 | u=2+4*x[1]-7*x[0] | u=2-7*x[1]+2*x[0] |
8191 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8192 | A_test[0,1]=x[0] | A_test[0,1]=x[0] |
8193 | Y_test=(-4) | Y_test=7 |
8194 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8195 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8196 | y_test=n[0]*(4*x[0]) | y_test=n[0]*((-7)*x[0]) |
8197 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8198 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8199 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8200 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8201 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8193 class Test_assemblage_2Do1_Reduced(unitt | Line 8203 class Test_assemblage_2Do1_Reduced(unitt |
8203 | #================================================== | #================================================== |
8204 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp10(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp10(self): |
8205 | x=self.domain.getX() | x=self.domain.getX() |
8206 | u=7-5*x[1]-2*x[0] | u=8-4*x[1]-1*x[0] |
8207 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8208 | A_test[1,0]=x[1] | A_test[1,0]=x[1] |
8209 | Y_test=2 | Y_test=1 |
8210 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8211 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8212 | y_test=n[1]*((-2)*x[1]) | y_test=n[1]*((-1)*x[1]) |
8213 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8214 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8215 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8216 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8217 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8209 class Test_assemblage_2Do1_Reduced(unitt | Line 8219 class Test_assemblage_2Do1_Reduced(unitt |
8219 | #================================================== | #================================================== |
8220 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp11(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeStrong_comp11(self): |
8221 | x=self.domain.getX() | x=self.domain.getX() |
8222 | u=(-4)-9*x[1]+7*x[0] | u=(-6)+8*x[1]-2*x[0] |
8223 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8224 | A_test[1,1]=x[1] | A_test[1,1]=x[1] |
8225 | Y_test=9 | Y_test=(-8) |
8226 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8227 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8228 | y_test=n[1]*((-9)*x[1]) | y_test=n[1]*(8*x[1]) |
8229 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8230 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8231 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8232 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8233 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8225 class Test_assemblage_2Do1_Reduced(unitt | Line 8235 class Test_assemblage_2Do1_Reduced(unitt |
8235 | #================================================== | #================================================== |
8236 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp0(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp0(self): |
8237 | x=self.domain.getX() | x=self.domain.getX() |
8238 | u=(-2)+2*x[1]+5*x[0] | u=(-7) |
8239 | B_test=Data(0.,(2,),ReducedFunction(self.domain)) | B_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8240 | B_test[0]=x[0] | B_test[0]=x[0] |
8241 | Y_test=2-2*x[1]-10*x[0] | Y_test=7 |
8242 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8243 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8244 | y_test=n[0]*((-2)*x[0]+2*x[0]*x[1]+5*x[0]**2) | y_test=n[0]*((-7)*x[0]) |
8245 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8246 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8247 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8248 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8249 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8241 class Test_assemblage_2Do1_Reduced(unitt | Line 8251 class Test_assemblage_2Do1_Reduced(unitt |
8251 | #================================================== | #================================================== |
8252 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp1(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeStrong_comp1(self): |
8253 | x=self.domain.getX() | x=self.domain.getX() |
8254 | u=(-9)+5*x[1]-7*x[0] | u=(-7) |
8255 | B_test=Data(0.,(2,),ReducedFunction(self.domain)) | B_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8256 | B_test[1]=x[1] | B_test[1]=x[1] |
8257 | Y_test=9-10*x[1]+7*x[0] | Y_test=7 |
8258 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8259 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8260 | y_test=n[1]*((-9)*x[1]+5*x[1]**2-7*x[0]*x[1]) | y_test=n[1]*((-7)*x[1]) |
8261 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8262 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8263 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8264 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8265 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8257 class Test_assemblage_2Do1_Reduced(unitt | Line 8267 class Test_assemblage_2Do1_Reduced(unitt |
8267 | #================================================== | #================================================== |
8268 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp0(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp0(self): |
8269 | x=self.domain.getX() | x=self.domain.getX() |
8270 | u=(-9)-9*x[1]-1*x[0] | u=5-7*x[1]-8*x[0] |
8271 | C_test=Data(0.,(2,),ReducedFunction(self.domain)) | C_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8272 | C_test[0]=x[0] | C_test[0]=x[0] |
8273 | Y_test=(-1)*x[0] | Y_test=(-8)*x[0] |
8274 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8275 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
8276 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8277 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8278 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8270 class Test_assemblage_2Do1_Reduced(unitt | Line 8280 class Test_assemblage_2Do1_Reduced(unitt |
8280 | #================================================== | #================================================== |
8281 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp1(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_C_Vario_typeStrong_comp1(self): |
8282 | x=self.domain.getX() | x=self.domain.getX() |
8283 | u=2-7*x[1]-6*x[0] | u=8-2*x[1]+2*x[0] |
8284 | C_test=Data(0.,(2,),ReducedFunction(self.domain)) | C_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8285 | C_test[1]=x[1] | C_test[1]=x[1] |
8286 | Y_test=(-7)*x[1] | Y_test=(-2)*x[1] |
8287 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8288 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
8289 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8290 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8291 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8283 class Test_assemblage_2Do1_Reduced(unitt | Line 8293 class Test_assemblage_2Do1_Reduced(unitt |
8293 | #================================================== | #================================================== |
8294 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_D_Vario_typeStrong(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_D_Vario_typeStrong(self): |
8295 | x=self.domain.getX() | x=self.domain.getX() |
8296 | u=(-3) | u=(-8) |
8297 | D_test=ReducedFunction(self.domain).getX()[0] | D_test=ReducedFunction(self.domain).getX()[0] |
8298 | Y_test=(-3)*x[0] | Y_test=(-8)*x[0] |
8299 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8300 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
8301 | r=pde.getResidual(u) | |
8302 | rhs=pde.getRightHandSide() | |
8303 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
8304 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
8305 | #================================================== | |
8306 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_d_Vario_typeStrong(self): | |
8307 | x=self.domain.getX() | |
8308 | u=3 | |
8309 | d_test=interpolate(x[0],ReducedFunctionOnBoundary(self.domain)) | |
8310 | y_test=3*x[0] | |
8311 | pde=LinearPDE(self.domain) | |
8312 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
8313 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8314 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8315 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8295 class Test_assemblage_2Do1_Reduced(unitt | Line 8317 class Test_assemblage_2Do1_Reduced(unitt |
8317 | #================================================== | #================================================== |
8318 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp00(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp00(self): |
8319 | x=self.domain.getX() | x=self.domain.getX() |
8320 | u=(-1)+3*x[1]+6*x[0] | u=8-1*x[1]-6*x[0] |
8321 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8322 | A_test[0,0]=8 | A_test[0,0]=1 |
8323 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8324 | X_test[0]=48 | X_test[0]=(-6) |
8325 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8326 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
8327 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8328 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8329 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8309 class Test_assemblage_2Do1_Reduced(unitt | Line 8331 class Test_assemblage_2Do1_Reduced(unitt |
8331 | #================================================== | #================================================== |
8332 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp01(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp01(self): |
8333 | x=self.domain.getX() | x=self.domain.getX() |
8334 | u=(-9)-4*x[1]+4*x[0] | u=(-1)+5*x[1]-3*x[0] |
8335 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8336 | A_test[0,1]=4 | A_test[0,1]=4 |
8337 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8338 | X_test[0]=(-16) | X_test[0]=20 |
8339 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8340 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
8341 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8342 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8343 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8323 class Test_assemblage_2Do1_Reduced(unitt | Line 8345 class Test_assemblage_2Do1_Reduced(unitt |
8345 | #================================================== | #================================================== |
8346 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp10(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp10(self): |
8347 | x=self.domain.getX() | x=self.domain.getX() |
8348 | u=7-4*x[1]-7*x[0] | u=6+3*x[1]-2*x[0] |
8349 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8350 | A_test[1,0]=5 | A_test[1,0]=7 |
8351 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8352 | X_test[1]=(-35) | X_test[1]=(-14) |
8353 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8354 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
8355 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8356 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8357 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8337 class Test_assemblage_2Do1_Reduced(unitt | Line 8359 class Test_assemblage_2Do1_Reduced(unitt |
8359 | #================================================== | #================================================== |
8360 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp11(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Const_typeWeak_comp11(self): |
8361 | x=self.domain.getX() | x=self.domain.getX() |
8362 | u=6+2*x[1]-6*x[0] | u=7-9*x[1]-2*x[0] |
8363 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8364 | A_test[1,1]=7 | A_test[1,1]=7 |
8365 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8366 | X_test[1]=14 | X_test[1]=(-63) |
8367 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8368 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
8369 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8370 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8371 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8351 class Test_assemblage_2Do1_Reduced(unitt | Line 8373 class Test_assemblage_2Do1_Reduced(unitt |
8373 | #================================================== | #================================================== |
8374 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp0(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp0(self): |
8375 | x=self.domain.getX() | x=self.domain.getX() |
8376 | u=(-1)-2*x[1]+4*x[0] | u=6 |
8377 | B_test=Data(0.,(2,),ReducedFunction(self.domain)) | B_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8378 | B_test[0]=2 | B_test[0]=1 |
8379 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8380 | X_test[0]=(-2)-4*x[1]+8*x[0] | X_test[0]=6 |
8381 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8382 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
8383 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8384 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8385 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8365 class Test_assemblage_2Do1_Reduced(unitt | Line 8387 class Test_assemblage_2Do1_Reduced(unitt |
8387 | #================================================== | #================================================== |
8388 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp1(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Const_typeWeak_comp1(self): |
8389 | x=self.domain.getX() | x=self.domain.getX() |
8390 | u=4-9*x[1]-1*x[0] | u=(-6) |
8391 | B_test=Data(0.,(2,),ReducedFunction(self.domain)) | B_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8392 | B_test[1]=1 | B_test[1]=2 |
8393 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8394 | X_test[1]=4-9*x[1]-1*x[0] | X_test[1]=(-12) |
8395 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8396 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
8397 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8398 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8399 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8379 class Test_assemblage_2Do1_Reduced(unitt | Line 8401 class Test_assemblage_2Do1_Reduced(unitt |
8401 | #================================================== | #================================================== |
8402 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp00(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp00(self): |
8403 | x=self.domain.getX() | x=self.domain.getX() |
8404 | u=(-9)+7*x[1]-4*x[0] | u=6-8*x[1]-9*x[0] |
8405 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8406 | A_test[0,0]=x[0] | A_test[0,0]=x[0] |
8407 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8408 | X_test[0]=(-4)*x[0] | X_test[0]=(-9)*x[0] |
8409 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8410 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
8411 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8412 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8413 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8393 class Test_assemblage_2Do1_Reduced(unitt | Line 8415 class Test_assemblage_2Do1_Reduced(unitt |
8415 | #================================================== | #================================================== |
8416 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp01(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp01(self): |
8417 | x=self.domain.getX() | x=self.domain.getX() |
8418 | u=(-9)-3*x[1]+6*x[0] | u=7-5*x[1]-1*x[0] |
8419 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8420 | A_test[0,1]=x[0] | A_test[0,1]=x[0] |
8421 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8422 | X_test[0]=(-3)*x[0] | X_test[0]=(-5)*x[0] |
8423 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8424 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
8425 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8426 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8427 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8407 class Test_assemblage_2Do1_Reduced(unitt | Line 8429 class Test_assemblage_2Do1_Reduced(unitt |
8429 | #================================================== | #================================================== |
8430 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp10(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp10(self): |
8431 | x=self.domain.getX() | x=self.domain.getX() |
8432 | u=(-6)-7*x[1]-3*x[0] | u=7-5*x[1]+2*x[0] |
8433 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8434 | A_test[1,0]=x[1] | A_test[1,0]=x[1] |
8435 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8436 | X_test[1]=(-3)*x[1] | X_test[1]=2*x[1] |
8437 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8438 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
8439 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8440 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8441 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8421 class Test_assemblage_2Do1_Reduced(unitt | Line 8443 class Test_assemblage_2Do1_Reduced(unitt |
8443 | #================================================== | #================================================== |
8444 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp11(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_A_Vario_typeWeak_comp11(self): |
8445 | x=self.domain.getX() | x=self.domain.getX() |
8446 | u=(-6)+x[1]-5*x[0] | u=6-8*x[1]+x[0] |
8447 | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
8448 | A_test[1,1]=x[1] | A_test[1,1]=x[1] |
8449 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8450 | X_test[1]=x[1] | X_test[1]=(-8)*x[1] |
8451 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8452 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
8453 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8454 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8455 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8435 class Test_assemblage_2Do1_Reduced(unitt | Line 8457 class Test_assemblage_2Do1_Reduced(unitt |
8457 | #================================================== | #================================================== |
8458 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp0(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp0(self): |
8459 | x=self.domain.getX() | x=self.domain.getX() |
8460 | u=4 | u=(-4) |
8461 | B_test=Data(0.,(2,),ReducedFunction(self.domain)) | B_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8462 | B_test[0]=x[0] | B_test[0]=x[0] |
8463 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8464 | X_test[0]=4*x[0] | X_test[0]=(-4)*x[0] |
8465 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8466 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
8467 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8468 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8469 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8449 class Test_assemblage_2Do1_Reduced(unitt | Line 8471 class Test_assemblage_2Do1_Reduced(unitt |
8471 | #================================================== | #================================================== |
8472 | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp1(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu1_B_Vario_typeWeak_comp1(self): |
8473 | x=self.domain.getX() | x=self.domain.getX() |
8474 | u=(-6) | u=4 |
8475 | B_test=Data(0.,(2,),ReducedFunction(self.domain)) | B_test=Data(0.,(2,),ReducedFunction(self.domain)) |
8476 | B_test[1]=x[1] | B_test[1]=x[1] |
8477 | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) | X_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8478 | X_test[1]=(-6)*x[1] | X_test[1]=4*x[1] |
8479 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8480 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
8481 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8482 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8483 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8464 class Test_assemblage_2Do1_Reduced(unitt | Line 8486 class Test_assemblage_2Do1_Reduced(unitt |
8486 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0000(self): |
8487 | x=self.domain.getX() | x=self.domain.getX() |
8488 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8489 | u[0]=(-5)-7*x[1]-1*x[0] | u[0]=(-5)-4*x[1]+8*x[0] |
8490 | u[1]=(-6)-1*x[1]-2*x[0] | u[1]=1+5*x[1]+4*x[0] |
8491 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8492 | A_test[0,0,0,0]=2 | A_test[0,0,0,0]=6 |
8493 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8494 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8495 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8496 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8497 | y_test[0]=n[0]*((-2)) | y_test[0]=n[0]*(48) |
8498 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8499 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8500 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8501 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8502 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8483 class Test_assemblage_2Do1_Reduced(unitt | Line 8505 class Test_assemblage_2Do1_Reduced(unitt |
8505 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0001(self): |
8506 | x=self.domain.getX() | x=self.domain.getX() |
8507 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8508 | u[0]=(-4)+4*x[1]+8*x[0] | u[0]=2-5*x[1]-1*x[0] |
8509 | u[1]=2+5*x[1]-2*x[0] | u[1]=(-5)-5*x[1]+4*x[0] |
8510 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8511 | A_test[0,0,0,1]=3 | A_test[0,0,0,1]=8 |
8512 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8513 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8514 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8515 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8516 | y_test[0]=n[0]*(12) | y_test[0]=n[0]*((-40)) |
8517 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8518 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8519 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8520 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8521 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8502 class Test_assemblage_2Do1_Reduced(unitt | Line 8524 class Test_assemblage_2Do1_Reduced(unitt |
8524 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0010(self): |
8525 | x=self.domain.getX() | x=self.domain.getX() |
8526 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8527 | u[0]=1-2*x[1]+5*x[0] | u[0]=(-7)-1*x[1]+8*x[0] |
8528 | u[1]=(-7)+x[1]+3*x[0] | u[1]=(-2)-2*x[1]+4*x[0] |
8529 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8530 | A_test[0,0,1,0]=2 | A_test[0,0,1,0]=5 |
8531 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8532 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8533 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8534 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8535 | y_test[0]=n[0]*(6) | y_test[0]=n[0]*(20) |
8536 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8537 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8538 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8539 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8540 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8521 class Test_assemblage_2Do1_Reduced(unitt | Line 8543 class Test_assemblage_2Do1_Reduced(unitt |
8543 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0011(self): |
8544 | x=self.domain.getX() | x=self.domain.getX() |
8545 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8546 | u[0]=(-5)-8*x[1]+6*x[0] | u[0]=(-1)-8*x[1]-8*x[0] |
8547 | u[1]=(-6)+2*x[1]-1*x[0] | u[1]=(-3)-6*x[1]+6*x[0] |
8548 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8549 | A_test[0,0,1,1]=7 | A_test[0,0,1,1]=1 |
8550 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8551 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8552 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8553 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8554 | y_test[0]=n[0]*(14) | y_test[0]=n[0]*((-6)) |
8555 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8556 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8557 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8558 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8559 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8540 class Test_assemblage_2Do1_Reduced(unitt | Line 8562 class Test_assemblage_2Do1_Reduced(unitt |
8562 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0100(self): |
8563 | x=self.domain.getX() | x=self.domain.getX() |
8564 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8565 | u[0]=(-5)-4*x[1]+4*x[0] | u[0]=8+3*x[1]+7*x[0] |
8566 | u[1]=2-8*x[1]-3*x[0] | u[1]=(-8)+2*x[1]-3*x[0] |
8567 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8568 | A_test[0,1,0,0]=4 | A_test[0,1,0,0]=4 |
8569 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8570 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8571 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8572 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8573 | y_test[0]=n[1]*(16) | y_test[0]=n[1]*(28) |
8574 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8575 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8576 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8577 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8578 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8559 class Test_assemblage_2Do1_Reduced(unitt | Line 8581 class Test_assemblage_2Do1_Reduced(unitt |
8581 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0101(self): |
8582 | x=self.domain.getX() | x=self.domain.getX() |
8583 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8584 | u[0]=(-3)+6*x[1]-3*x[0] | u[0]=(-7)-9*x[1]-8*x[0] |
8585 | u[1]=4+8*x[1]-6*x[0] | u[1]=7-7*x[1]+8*x[0] |
8586 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8587 | A_test[0,1,0,1]=2 | A_test[0,1,0,1]=1 |
8588 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8589 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8590 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8591 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8592 | y_test[0]=n[1]*(12) | y_test[0]=n[1]*((-9)) |
8593 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8594 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8595 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8596 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8597 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8578 class Test_assemblage_2Do1_Reduced(unitt | Line 8600 class Test_assemblage_2Do1_Reduced(unitt |
8600 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0110(self): |
8601 | x=self.domain.getX() | x=self.domain.getX() |
8602 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8603 | u[0]=5+5*x[1]+4*x[0] | u[0]=1-8*x[1]+4*x[0] |
8604 | u[1]=(-2)+4*x[1]+6*x[0] | u[1]=6-6*x[1]-2*x[0] |
8605 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8606 | A_test[0,1,1,0]=2 | A_test[0,1,1,0]=5 |
8607 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8608 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8609 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8610 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8611 | y_test[0]=n[1]*(12) | y_test[0]=n[1]*((-10)) |
8612 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8613 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8614 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8615 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8616 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8597 class Test_assemblage_2Do1_Reduced(unitt | Line 8619 class Test_assemblage_2Do1_Reduced(unitt |
8619 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp0111(self): |
8620 | x=self.domain.getX() | x=self.domain.getX() |
8621 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8622 | u[0]=(-2)+5*x[1]-2*x[0] | u[0]=3+5*x[1]+8*x[0] |
8623 | u[1]=8+x[1]-2*x[0] | u[1]=(-3)+3*x[1]-4*x[0] |
8624 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8625 | A_test[0,1,1,1]=8 | A_test[0,1,1,1]=1 |
8626 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8627 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8628 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8629 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8630 | y_test[0]=n[1]*(8) | y_test[0]=n[1]*(3) |
8631 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8632 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8633 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8634 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8635 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8616 class Test_assemblage_2Do1_Reduced(unitt | Line 8638 class Test_assemblage_2Do1_Reduced(unitt |
8638 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1000(self): |
8639 | x=self.domain.getX() | x=self.domain.getX() |
8640 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8641 | u[0]=6-1*x[1]+3*x[0] | u[0]=1-1*x[1]-5*x[0] |
8642 | u[1]=(-6)-6*x[1]-7*x[0] | u[1]=4+2*x[1]-9*x[0] |
8643 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8644 | A_test[1,0,0,0]=5 | A_test[1,0,0,0]=2 |
8645 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8646 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8647 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8648 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8649 | y_test[1]=n[0]*(15) | y_test[1]=n[0]*((-10)) |
8650 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8651 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8652 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8653 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8654 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8635 class Test_assemblage_2Do1_Reduced(unitt | Line 8657 class Test_assemblage_2Do1_Reduced(unitt |
8657 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1001(self): |
8658 | x=self.domain.getX() | x=self.domain.getX() |
8659 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8660 | u[0]=(-7)+6*x[1]-6*x[0] | u[0]=(-7)+6*x[1]-7*x[0] |
8661 | u[1]=(-8)-4*x[1]+7*x[0] | u[1]=8+8*x[1]-9*x[0] |
8662 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8663 | A_test[1,0,0,1]=6 | A_test[1,0,0,1]=6 |
8664 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8665 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8666 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8667 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8668 | y_test[1]=n[0]*(36) | y_test[1]=n[0]*(36) |
8669 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8670 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8671 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8672 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8673 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8654 class Test_assemblage_2Do1_Reduced(unitt | Line 8676 class Test_assemblage_2Do1_Reduced(unitt |
8676 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1010(self): |
8677 | x=self.domain.getX() | x=self.domain.getX() |
8678 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8679 | u[0]=4-4*x[1]+4*x[0] | u[0]=(-5)+6*x[1]+x[0] |
8680 | u[1]=(-9)+7*x[1]-8*x[0] | u[1]=(-7)-9*x[1]-4*x[0] |
8681 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8682 | A_test[1,0,1,0]=3 | A_test[1,0,1,0]=8 |
8683 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8684 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8685 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8686 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8687 | y_test[1]=n[0]*((-24)) | y_test[1]=n[0]*((-32)) |
8688 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8689 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8690 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8691 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8692 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8673 class Test_assemblage_2Do1_Reduced(unitt | Line 8695 class Test_assemblage_2Do1_Reduced(unitt |
8695 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1011(self): |
8696 | x=self.domain.getX() | x=self.domain.getX() |
8697 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8698 | u[0]=3+7*x[1]-1*x[0] | u[0]=(-3)+x[1]-4*x[0] |
8699 | u[1]=8-8*x[1]-3*x[0] | u[1]=5-1*x[1]+5*x[0] |
8700 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8701 | A_test[1,0,1,1]=6 | A_test[1,0,1,1]=4 |
8702 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8703 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8704 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8705 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8706 | y_test[1]=n[0]*((-48)) | y_test[1]=n[0]*((-4)) |
8707 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8708 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8709 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8710 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8711 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8692 class Test_assemblage_2Do1_Reduced(unitt | Line 8714 class Test_assemblage_2Do1_Reduced(unitt |
8714 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1100(self): |
8715 | x=self.domain.getX() | x=self.domain.getX() |
8716 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8717 | u[0]=1-1*x[1]+4*x[0] | u[0]=(-6)+4*x[1]+5*x[0] |
8718 | u[1]=7+2*x[1]+5*x[0] | u[1]=2+8*x[1]+4*x[0] |
8719 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8720 | A_test[1,1,0,0]=6 | A_test[1,1,0,0]=1 |
8721 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8722 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8723 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8724 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8725 | y_test[1]=n[1]*(24) | y_test[1]=n[1]*(5) |
8726 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8727 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8728 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8729 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8730 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8711 class Test_assemblage_2Do1_Reduced(unitt | Line 8733 class Test_assemblage_2Do1_Reduced(unitt |
8733 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1101(self): |
8734 | x=self.domain.getX() | x=self.domain.getX() |
8735 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8736 | u[0]=8+3*x[1]-4*x[0] | u[0]=7-5*x[1]+6*x[0] |
8737 | u[1]=3-4*x[1]+x[0] | u[1]=4+4*x[1]+4*x[0] |
8738 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8739 | A_test[1,1,0,1]=2 | A_test[1,1,0,1]=4 |
8740 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8741 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8742 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8743 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8744 | y_test[1]=n[1]*(6) | y_test[1]=n[1]*((-20)) |
8745 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8746 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8747 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8748 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8749 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8730 class Test_assemblage_2Do1_Reduced(unitt | Line 8752 class Test_assemblage_2Do1_Reduced(unitt |
8752 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1110(self): |
8753 | x=self.domain.getX() | x=self.domain.getX() |
8754 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8755 | u[0]=(-7)+7*x[1]+x[0] | u[0]=(-1)+3*x[1]+x[0] |
8756 | u[1]=3+5*x[1]+7*x[0] | u[1]=1-8*x[1]-1*x[0] |
8757 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8758 | A_test[1,1,1,0]=8 | A_test[1,1,1,0]=3 |
8759 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8760 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8761 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8762 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8763 | y_test[1]=n[1]*(56) | y_test[1]=n[1]*((-3)) |
8764 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8765 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8766 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8767 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8768 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8749 class Test_assemblage_2Do1_Reduced(unitt | Line 8771 class Test_assemblage_2Do1_Reduced(unitt |
8771 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeStrong_comp1111(self): |
8772 | x=self.domain.getX() | x=self.domain.getX() |
8773 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8774 | u[0]=(-2)-6*x[1]-6*x[0] | u[0]=7-1*x[1]+5*x[0] |
8775 | u[1]=5-9*x[1]-8*x[0] | u[1]=6+6*x[1]+x[0] |
8776 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
8777 | A_test[1,1,1,1]=1 | A_test[1,1,1,1]=7 |
8778 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8779 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
8780 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8781 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8782 | y_test[1]=n[1]*((-9)) | y_test[1]=n[1]*(42) |
8783 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8784 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
8785 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8786 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8787 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8768 class Test_assemblage_2Do1_Reduced(unitt | Line 8790 class Test_assemblage_2Do1_Reduced(unitt |
8790 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp000(self): |
8791 | x=self.domain.getX() | x=self.domain.getX() |
8792 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8793 | u[0]=(-7)-4*x[1]+6*x[0] | u[0]=6 |
8794 | u[1]=(-7)-1*x[1]-8*x[0] | u[1]=2 |
8795 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8796 | B_test[0,0,0]=5 | B_test[0,0,0]=8 |
8797 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8798 | Y_test[0]=(-30) | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
x_boundary=FunctionOnBoundary(self.domain).getX() | ||
8799 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8800 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8801 | y_test[0]=n[0]*((-35)-20*x[1]+30*x[0]) | y_test[0]=n[0]*(48) |
8802 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8803 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8804 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8805 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8806 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8788 class Test_assemblage_2Do1_Reduced(unitt | Line 8809 class Test_assemblage_2Do1_Reduced(unitt |
8809 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp001(self): |
8810 | x=self.domain.getX() | x=self.domain.getX() |
8811 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8812 | u[0]=(-7)-7*x[1]+8*x[0] | u[0]=3 |
8813 | u[1]=(-3)-3*x[1]+6*x[0] | u[1]=(-5) |
8814 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8815 | B_test[0,0,1]=6 | B_test[0,0,1]=7 |
8816 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8817 | Y_test[0]=(-36) | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
x_boundary=FunctionOnBoundary(self.domain).getX() | ||
8818 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8819 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8820 | y_test[0]=n[0]*((-18)-18*x[1]+36*x[0]) | y_test[0]=n[0]*((-35)) |
8821 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8822 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8823 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8824 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8825 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8808 class Test_assemblage_2Do1_Reduced(unitt | Line 8828 class Test_assemblage_2Do1_Reduced(unitt |
8828 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp010(self): |
8829 | x=self.domain.getX() | x=self.domain.getX() |
8830 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8831 | u[0]=(-6)-6*x[1]-9*x[0] | u[0]=(-9) |
8832 | u[1]=1-4*x[1]+5*x[0] | u[1]=(-2) |
8833 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8834 | B_test[0,1,0]=2 | B_test[0,1,0]=6 |
8835 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8836 | Y_test[0]=12 | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
x_boundary=FunctionOnBoundary(self.domain).getX() | ||
8837 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8838 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8839 | y_test[0]=n[1]*((-12)-12*x[1]-18*x[0]) | y_test[0]=n[1]*((-54)) |
8840 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8841 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8842 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8843 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8844 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8828 class Test_assemblage_2Do1_Reduced(unitt | Line 8847 class Test_assemblage_2Do1_Reduced(unitt |
8847 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp011(self): |
8848 | x=self.domain.getX() | x=self.domain.getX() |
8849 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8850 | u[0]=1+5*x[1]+6*x[0] | u[0]=(-8) |
8851 | u[1]=(-8)-5*x[1]-1*x[0] | u[1]=5 |
8852 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8853 | B_test[0,1,1]=5 | B_test[0,1,1]=6 |
8854 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8855 | Y_test[0]=25 | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
x_boundary=FunctionOnBoundary(self.domain).getX() | ||
8856 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8857 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8858 | y_test[0]=n[1]*((-40)-25*x[1]-5*x[0]) | y_test[0]=n[1]*(30) |
8859 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8860 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8861 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8862 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8863 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8848 class Test_assemblage_2Do1_Reduced(unitt | Line 8866 class Test_assemblage_2Do1_Reduced(unitt |
8866 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp100(self): |
8867 | x=self.domain.getX() | x=self.domain.getX() |
8868 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8869 | u[0]=3+7*x[1]-9*x[0] | u[0]=(-6) |
8870 | u[1]=(-6)-9*x[1]+6*x[0] | u[1]=(-6) |
8871 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8872 | B_test[1,0,0]=2 | B_test[1,0,0]=2 |
8873 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8874 | Y_test[1]=18 | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
x_boundary=FunctionOnBoundary(self.domain).getX() | ||
8875 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8876 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8877 | y_test[1]=n[0]*(6+14*x[1]-18*x[0]) | y_test[1]=n[0]*((-12)) |
8878 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8879 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8880 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8881 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8882 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8868 class Test_assemblage_2Do1_Reduced(unitt | Line 8885 class Test_assemblage_2Do1_Reduced(unitt |
8885 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp101(self): |
8886 | x=self.domain.getX() | x=self.domain.getX() |
8887 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8888 | u[0]=(-9)+3*x[1]-7*x[0] | u[0]=6 |
8889 | u[1]=(-8)-4*x[1]-9*x[0] | u[1]=(-7) |
8890 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8891 | B_test[1,0,1]=4 | B_test[1,0,1]=3 |
8892 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8893 | Y_test[1]=36 | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
x_boundary=FunctionOnBoundary(self.domain).getX() | ||
8894 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8895 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8896 | y_test[1]=n[0]*((-32)-16*x[1]-36*x[0]) | y_test[1]=n[0]*((-21)) |
8897 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8898 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8899 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8900 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8901 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8888 class Test_assemblage_2Do1_Reduced(unitt | Line 8904 class Test_assemblage_2Do1_Reduced(unitt |
8904 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp110(self): |
8905 | x=self.domain.getX() | x=self.domain.getX() |
8906 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8907 | u[0]=(-1)-2*x[1]+3*x[0] | u[0]=(-8) |
8908 | u[1]=5-1*x[1]+7*x[0] | u[1]=7 |
8909 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8910 | B_test[1,1,0]=5 | B_test[1,1,0]=4 |
8911 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8912 | Y_test[1]=10 | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
x_boundary=FunctionOnBoundary(self.domain).getX() | ||
8913 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8914 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8915 | y_test[1]=n[1]*((-5)-10*x[1]+15*x[0]) | y_test[1]=n[1]*((-32)) |
8916 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8917 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8918 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8919 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8920 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8908 class Test_assemblage_2Do1_Reduced(unitt | Line 8923 class Test_assemblage_2Do1_Reduced(unitt |
8923 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeStrong_comp111(self): |
8924 | x=self.domain.getX() | x=self.domain.getX() |
8925 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8926 | u[0]=7+3*x[1]-2*x[0] | u[0]=(-8) |
8927 | u[1]=2+x[1]-1*x[0] | u[1]=(-4) |
8928 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8929 | B_test[1,1,1]=3 | B_test[1,1,1]=4 |
8930 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8931 | Y_test[1]=(-3) | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
x_boundary=FunctionOnBoundary(self.domain).getX() | ||
8932 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
8933 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
8934 | y_test[1]=n[1]*(6+3*x[1]-3*x[0]) | y_test[1]=n[1]*((-16)) |
8935 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8936 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
8937 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8938 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8939 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8928 class Test_assemblage_2Do1_Reduced(unitt | Line 8942 class Test_assemblage_2Do1_Reduced(unitt |
8942 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp000(self): |
8943 | x=self.domain.getX() | x=self.domain.getX() |
8944 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8945 | u[0]=(-3)+6*x[1]-8*x[0] | u[0]=(-7)-1*x[1]-4*x[0] |
8946 | u[1]=2-8*x[1]-1*x[0] | u[1]=(-5)+x[1]+8*x[0] |
8947 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8948 | C_test[0,0,0]=8 | C_test[0,0,0]=2 |
8949 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8950 | Y_test[0]=(-64) | Y_test[0]=(-8) |
8951 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8952 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
8953 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8954 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8955 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8944 class Test_assemblage_2Do1_Reduced(unitt | Line 8958 class Test_assemblage_2Do1_Reduced(unitt |
8958 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp001(self): |
8959 | x=self.domain.getX() | x=self.domain.getX() |
8960 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8961 | u[0]=4+2*x[1]+3*x[0] | u[0]=(-7)+3*x[1]-5*x[0] |
8962 | u[1]=(-5)-9*x[1]-1*x[0] | u[1]=4-3*x[1]+4*x[0] |
8963 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8964 | C_test[0,0,1]=7 | C_test[0,0,1]=7 |
8965 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8966 | Y_test[0]=14 | Y_test[0]=21 |
8967 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8968 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
8969 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8970 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8971 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8960 class Test_assemblage_2Do1_Reduced(unitt | Line 8974 class Test_assemblage_2Do1_Reduced(unitt |
8974 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp010(self): |
8975 | x=self.domain.getX() | x=self.domain.getX() |
8976 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8977 | u[0]=(-6)-3*x[1]-9*x[0] | u[0]=(-7)+4*x[1]+8*x[0] |
8978 | u[1]=(-5)+5*x[1]-2*x[0] | u[1]=1+8*x[1]-1*x[0] |
8979 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8980 | C_test[0,1,0]=1 | C_test[0,1,0]=7 |
8981 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8982 | Y_test[0]=(-2) | Y_test[0]=(-7) |
8983 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
8984 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
8985 | r=pde.getResidual(u) | r=pde.getResidual(u) |
8986 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
8987 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8976 class Test_assemblage_2Do1_Reduced(unitt | Line 8990 class Test_assemblage_2Do1_Reduced(unitt |
8990 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp011(self): |
8991 | x=self.domain.getX() | x=self.domain.getX() |
8992 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
8993 | u[0]=1-4*x[1]-8*x[0] | u[0]=1-1*x[1]+3*x[0] |
8994 | u[1]=(-7)-4*x[1]+8*x[0] | u[1]=6+4*x[1]-6*x[0] |
8995 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
8996 | C_test[0,1,1]=1 | C_test[0,1,1]=2 |
8997 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
8998 | Y_test[0]=(-4) | Y_test[0]=8 |
8999 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9000 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9001 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9002 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9003 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 8992 class Test_assemblage_2Do1_Reduced(unitt | Line 9006 class Test_assemblage_2Do1_Reduced(unitt |
9006 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp100(self): |
9007 | x=self.domain.getX() | x=self.domain.getX() |
9008 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9009 | u[0]=(-1)+8*x[1]+3*x[0] | u[0]=5-3*x[1]+6*x[0] |
9010 | u[1]=1-9*x[1]+5*x[0] | u[1]=(-7)-3*x[1]-9*x[0] |
9011 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9012 | C_test[1,0,0]=6 | C_test[1,0,0]=6 |
9013 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9014 | Y_test[1]=18 | Y_test[1]=36 |
9015 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9016 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9017 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9018 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9019 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9008 class Test_assemblage_2Do1_Reduced(unitt | Line 9022 class Test_assemblage_2Do1_Reduced(unitt |
9022 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp101(self): |
9023 | x=self.domain.getX() | x=self.domain.getX() |
9024 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9025 | u[0]=(-2)+6*x[1]+6*x[0] | u[0]=(-5)-2*x[1]-2*x[0] |
9026 | u[1]=(-1)-8*x[1]-5*x[0] | u[1]=(-1)-2*x[1]+8*x[0] |
9027 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9028 | C_test[1,0,1]=6 | C_test[1,0,1]=3 |
9029 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9030 | Y_test[1]=36 | Y_test[1]=(-6) |
9031 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9032 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9033 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9034 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9035 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9024 class Test_assemblage_2Do1_Reduced(unitt | Line 9038 class Test_assemblage_2Do1_Reduced(unitt |
9038 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp110(self): |
9039 | x=self.domain.getX() | x=self.domain.getX() |
9040 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9041 | u[0]=(-5)-5*x[1]+3*x[0] | u[0]=(-2)-8*x[1]+2*x[0] |
9042 | u[1]=(-8)-2*x[1]-3*x[0] | u[1]=3+7*x[1]-6*x[0] |
9043 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9044 | C_test[1,1,0]=2 | C_test[1,1,0]=6 |
9045 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9046 | Y_test[1]=(-6) | Y_test[1]=(-36) |
9047 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9048 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9049 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9050 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9051 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9040 class Test_assemblage_2Do1_Reduced(unitt | Line 9054 class Test_assemblage_2Do1_Reduced(unitt |
9054 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Const_typeStrong_comp111(self): |
9055 | x=self.domain.getX() | x=self.domain.getX() |
9056 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9057 | u[0]=(-2)+4*x[1]+5*x[0] | u[0]=7+4*x[1]+4*x[0] |
9058 | u[1]=(-4)+5*x[1]+x[0] | u[1]=(-8)+8*x[1]+8*x[0] |
9059 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9060 | C_test[1,1,1]=4 | C_test[1,1,1]=4 |
9061 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9062 | Y_test[1]=20 | Y_test[1]=32 |
9063 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9064 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9065 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9066 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9067 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9056 class Test_assemblage_2Do1_Reduced(unitt | Line 9070 class Test_assemblage_2Do1_Reduced(unitt |
9070 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp00(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp00(self): |
9071 | x=self.domain.getX() | x=self.domain.getX() |
9072 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9073 | u[0]=8-8*x[1]+x[0] | u[0]=3-9*x[1]+6*x[0] |
9074 | u[1]=(-8)+2*x[1]-6*x[0] | u[1]=(-3)+6*x[1]-3*x[0] |
9075 | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
9076 | D_test[0,0]=4 | D_test[0,0]=3 |
9077 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9078 | Y_test[0]=32-32*x[1]+4*x[0] | Y_test[0]=9-27*x[1]+18*x[0] |
9079 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9080 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
9081 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9082 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9083 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9072 class Test_assemblage_2Do1_Reduced(unitt | Line 9086 class Test_assemblage_2Do1_Reduced(unitt |
9086 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp01(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp01(self): |
9087 | x=self.domain.getX() | x=self.domain.getX() |
9088 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9089 | u[0]=(-1)+4*x[1]-7*x[0] | u[0]=(-5)+2*x[1]-5*x[0] |
9090 | u[1]=7-3*x[1]-6*x[0] | u[1]=(-5)-8*x[1]-2*x[0] |
9091 | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
9092 | D_test[0,1]=8 | D_test[0,1]=2 |
9093 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9094 | Y_test[0]=56-24*x[1]-48*x[0] | Y_test[0]=(-10)-16*x[1]-4*x[0] |
9095 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9096 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
9097 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9098 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9099 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9088 class Test_assemblage_2Do1_Reduced(unitt | Line 9102 class Test_assemblage_2Do1_Reduced(unitt |
9102 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp10(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp10(self): |
9103 | x=self.domain.getX() | x=self.domain.getX() |
9104 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9105 | u[0]=(-5)+6*x[1]+3*x[0] | u[0]=(-3)+5*x[1]+x[0] |
9106 | u[1]=(-3)-9*x[1]-8*x[0] | u[1]=(-5)+x[1]+3*x[0] |
9107 | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
9108 | D_test[1,0]=1 | D_test[1,0]=3 |
9109 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9110 | Y_test[1]=(-5)+6*x[1]+3*x[0] | Y_test[1]=(-9)+15*x[1]+3*x[0] |
9111 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9112 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
9113 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9114 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9115 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9104 class Test_assemblage_2Do1_Reduced(unitt | Line 9118 class Test_assemblage_2Do1_Reduced(unitt |
9118 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp11(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Const_typeStrong_comp11(self): |
9119 | x=self.domain.getX() | x=self.domain.getX() |
9120 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9121 | u[0]=(-8)-3*x[1]-3*x[0] | u[0]=(-2)+4*x[1]-8*x[0] |
9122 | u[1]=(-3)-1*x[1]-9*x[0] | u[1]=(-7)-7*x[1]+4*x[0] |
9123 | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
9124 | D_test[1,1]=3 | D_test[1,1]=4 |
9125 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9126 | Y_test[1]=(-9)-3*x[1]-27*x[0] | Y_test[1]=(-28)-28*x[1]+16*x[0] |
9127 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9128 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
9129 | r=pde.getResidual(u) | |
9130 | rhs=pde.getRightHandSide() | |
9131 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
9132 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
9133 | #================================================== | |
9134 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp00(self): | |
9135 | x=self.domain.getX() | |
9136 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9137 | u[0]=1-8*x[1]-1*x[0] | |
9138 | u[1]=6-1*x[1]+2*x[0] | |
9139 | d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain)) | |
9140 | d_test[0,0]=3 | |
9141 | y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9142 | y_test[0]=3-24*x[1]-3*x[0] | |
9143 | pde=LinearPDE(self.domain) | |
9144 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
9145 | r=pde.getResidual(u) | |
9146 | rhs=pde.getRightHandSide() | |
9147 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
9148 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
9149 | #================================================== | |
9150 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp01(self): | |
9151 | x=self.domain.getX() | |
9152 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9153 | u[0]=(-2)-3*x[1]+8*x[0] | |
9154 | u[1]=(-3)+7*x[1]-5*x[0] | |
9155 | d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain)) | |
9156 | d_test[0,1]=2 | |
9157 | y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9158 | y_test[0]=(-6)+14*x[1]-10*x[0] | |
9159 | pde=LinearPDE(self.domain) | |
9160 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
9161 | r=pde.getResidual(u) | |
9162 | rhs=pde.getRightHandSide() | |
9163 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
9164 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
9165 | #================================================== | |
9166 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp10(self): | |
9167 | x=self.domain.getX() | |
9168 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9169 | u[0]=(-8)-6*x[1]-7*x[0] | |
9170 | u[1]=(-2)+6*x[1]+8*x[0] | |
9171 | d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain)) | |
9172 | d_test[1,0]=3 | |
9173 | y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9174 | y_test[1]=(-24)-18*x[1]-21*x[0] | |
9175 | pde=LinearPDE(self.domain) | |
9176 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
9177 | r=pde.getResidual(u) | |
9178 | rhs=pde.getRightHandSide() | |
9179 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
9180 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
9181 | #================================================== | |
9182 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Const_typeStrong_comp11(self): | |
9183 | x=self.domain.getX() | |
9184 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9185 | u[0]=(-7)+8*x[1]-4*x[0] | |
9186 | u[1]=6+7*x[1]+6*x[0] | |
9187 | d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain)) | |
9188 | d_test[1,1]=7 | |
9189 | y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9190 | y_test[1]=42+49*x[1]+42*x[0] | |
9191 | pde=LinearPDE(self.domain) | |
9192 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
9193 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9194 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9195 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9120 class Test_assemblage_2Do1_Reduced(unitt | Line 9198 class Test_assemblage_2Do1_Reduced(unitt |
9198 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0000(self): |
9199 | x=self.domain.getX() | x=self.domain.getX() |
9200 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9201 | u[0]=2+7*x[1]-5*x[0] | u[0]=(-8)-9*x[1]+3*x[0] |
9202 | u[1]=6+7*x[1]-2*x[0] | u[1]=(-5)-7*x[1]-3*x[0] |
9203 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9204 | A_test[0,0,0,0]=x[0] | A_test[0,0,0,0]=x[0] |
9205 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9206 | Y_test[0]=5 | Y_test[0]=(-3) |
9207 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9208 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9209 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9210 | y_test[0]=n[0]*((-5)*x[0]) | y_test[0]=n[0]*(3*x[0]) |
9211 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9212 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9213 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9214 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9215 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9140 class Test_assemblage_2Do1_Reduced(unitt | Line 9218 class Test_assemblage_2Do1_Reduced(unitt |
9218 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0001(self): |
9219 | x=self.domain.getX() | x=self.domain.getX() |
9220 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9221 | u[0]=8+4*x[1]+4*x[0] | u[0]=6+7*x[1]+7*x[0] |
9222 | u[1]=(-3)+6*x[1]-7*x[0] | u[1]=(-1)+x[1]+3*x[0] |
9223 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9224 | A_test[0,0,0,1]=x[0] | A_test[0,0,0,1]=x[0] |
9225 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9226 | Y_test[0]=(-4) | Y_test[0]=(-7) |
9227 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9228 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9229 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9230 | y_test[0]=n[0]*(4*x[0]) | y_test[0]=n[0]*(7*x[0]) |
9231 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9232 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9233 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9234 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9235 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9160 class Test_assemblage_2Do1_Reduced(unitt | Line 9238 class Test_assemblage_2Do1_Reduced(unitt |
9238 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0010(self): |
9239 | x=self.domain.getX() | x=self.domain.getX() |
9240 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9241 | u[0]=(-2)-5*x[1]-3*x[0] | u[0]=8+x[1]+6*x[0] |
9242 | u[1]=(-9)+4*x[1]+3*x[0] | u[1]=(-3)+3*x[1]+2*x[0] |
9243 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9244 | A_test[0,0,1,0]=x[0] | A_test[0,0,1,0]=x[0] |
9245 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9246 | Y_test[0]=(-3) | Y_test[0]=(-2) |
9247 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9248 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9249 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9250 | y_test[0]=n[0]*(3*x[0]) | y_test[0]=n[0]*(2*x[0]) |
9251 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9252 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9253 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9254 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9255 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9180 class Test_assemblage_2Do1_Reduced(unitt | Line 9258 class Test_assemblage_2Do1_Reduced(unitt |
9258 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0011(self): |
9259 | x=self.domain.getX() | x=self.domain.getX() |
9260 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9261 | u[0]=2+4*x[1]+x[0] | u[0]=(-3)+x[1]-2*x[0] |
9262 | u[1]=7-5*x[1]-1*x[0] | u[1]=(-8)-6*x[1]-2*x[0] |
9263 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9264 | A_test[0,0,1,1]=x[0] | A_test[0,0,1,1]=x[0] |
9265 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9266 | Y_test[0]=5 | Y_test[0]=6 |
9267 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9268 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9269 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9270 | y_test[0]=n[0]*((-5)*x[0]) | y_test[0]=n[0]*((-6)*x[0]) |
9271 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9272 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9273 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9274 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9275 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9200 class Test_assemblage_2Do1_Reduced(unitt | Line 9278 class Test_assemblage_2Do1_Reduced(unitt |
9278 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0100(self): |
9279 | x=self.domain.getX() | x=self.domain.getX() |
9280 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9281 | u[0]=2+7*x[1]-3*x[0] | u[0]=(-8)-5*x[1]-8*x[0] |
9282 | u[1]=(-6)-6*x[1]+7*x[0] | u[1]=5-1*x[1]-5*x[0] |
9283 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9284 | A_test[0,1,0,0]=x[1] | A_test[0,1,0,0]=x[1] |
9285 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9286 | Y_test[0]=3 | Y_test[0]=8 |
9287 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9288 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9289 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9290 | y_test[0]=n[1]*((-3)*x[1]) | y_test[0]=n[1]*((-8)*x[1]) |
9291 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9292 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9293 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9294 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9295 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9220 class Test_assemblage_2Do1_Reduced(unitt | Line 9298 class Test_assemblage_2Do1_Reduced(unitt |
9298 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0101(self): |
9299 | x=self.domain.getX() | x=self.domain.getX() |
9300 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9301 | u[0]=2+6*x[1]+6*x[0] | u[0]=4-1*x[1]+8*x[0] |
9302 | u[1]=4+7*x[1]-2*x[0] | u[1]=5-4*x[1]-2*x[0] |
9303 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9304 | A_test[0,1,0,1]=x[1] | A_test[0,1,0,1]=x[1] |
9305 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9306 | Y_test[0]=(-6) | Y_test[0]=1 |
9307 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9308 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9309 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9310 | y_test[0]=n[1]*(6*x[1]) | y_test[0]=n[1]*((-1)*x[1]) |
9311 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9312 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9313 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9314 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9315 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9240 class Test_assemblage_2Do1_Reduced(unitt | Line 9318 class Test_assemblage_2Do1_Reduced(unitt |
9318 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0110(self): |
9319 | x=self.domain.getX() | x=self.domain.getX() |
9320 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9321 | u[0]=6-4*x[1]-6*x[0] | u[0]=(-9)-5*x[1]-1*x[0] |
9322 | u[1]=(-9)-3*x[1]-2*x[0] | u[1]=(-6)-7*x[1]-7*x[0] |
9323 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9324 | A_test[0,1,1,0]=x[1] | A_test[0,1,1,0]=x[1] |
9325 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9326 | Y_test[0]=2 | Y_test[0]=7 |
9327 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9328 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9329 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9330 | y_test[0]=n[1]*((-2)*x[1]) | y_test[0]=n[1]*((-7)*x[1]) |
9331 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9332 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9333 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9334 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9335 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9260 class Test_assemblage_2Do1_Reduced(unitt | Line 9338 class Test_assemblage_2Do1_Reduced(unitt |
9338 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp0111(self): |
9339 | x=self.domain.getX() | x=self.domain.getX() |
9340 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9341 | u[0]=(-5)-8*x[1]+5*x[0] | u[0]=4-2*x[1]-1*x[0] |
9342 | u[1]=3-5*x[1]-1*x[0] | u[1]=8-2*x[1]-8*x[0] |
9343 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9344 | A_test[0,1,1,1]=x[1] | A_test[0,1,1,1]=x[1] |
9345 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9346 | Y_test[0]=5 | Y_test[0]=2 |
9347 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9348 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9349 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9350 | y_test[0]=n[1]*((-5)*x[1]) | y_test[0]=n[1]*((-2)*x[1]) |
9351 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9352 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9353 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9354 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9355 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9280 class Test_assemblage_2Do1_Reduced(unitt | Line 9358 class Test_assemblage_2Do1_Reduced(unitt |
9358 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1000(self): |
9359 | x=self.domain.getX() | x=self.domain.getX() |
9360 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9361 | u[0]=(-1)-4*x[1]+5*x[0] | u[0]=(-1)+2*x[1]-5*x[0] |
9362 | u[1]=1-3*x[1]-9*x[0] | u[1]=(-8)-4*x[1]-4*x[0] |
9363 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9364 | A_test[1,0,0,0]=x[0] | A_test[1,0,0,0]=x[0] |
9365 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9366 | Y_test[1]=(-5) | Y_test[1]=5 |
9367 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9368 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9369 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9370 | y_test[1]=n[0]*(5*x[0]) | y_test[1]=n[0]*((-5)*x[0]) |
9371 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9372 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9373 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9374 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9375 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9300 class Test_assemblage_2Do1_Reduced(unitt | Line 9378 class Test_assemblage_2Do1_Reduced(unitt |
9378 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1001(self): |
9379 | x=self.domain.getX() | x=self.domain.getX() |
9380 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9381 | u[0]=(-6)-9*x[1]+8*x[0] | u[0]=(-7)+7*x[1]-6*x[0] |
9382 | u[1]=(-3)-3*x[1]-3*x[0] | u[1]=(-6)-5*x[1]-9*x[0] |
9383 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9384 | A_test[1,0,0,1]=x[0] | A_test[1,0,0,1]=x[0] |
9385 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9386 | Y_test[1]=9 | Y_test[1]=(-7) |
9387 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9388 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9389 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9390 | y_test[1]=n[0]*((-9)*x[0]) | y_test[1]=n[0]*(7*x[0]) |
9391 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9392 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9393 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9394 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9395 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9320 class Test_assemblage_2Do1_Reduced(unitt | Line 9398 class Test_assemblage_2Do1_Reduced(unitt |
9398 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1010(self): |
9399 | x=self.domain.getX() | x=self.domain.getX() |
9400 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9401 | u[0]=(-5)-2*x[1]-1*x[0] | u[0]=(-1)-5*x[1]+7*x[0] |
9402 | u[1]=(-6)+x[1]-6*x[0] | u[1]=(-8)-3*x[1]-6*x[0] |
9403 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9404 | A_test[1,0,1,0]=x[0] | A_test[1,0,1,0]=x[0] |
9405 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9406 | Y_test[1]=6 | Y_test[1]=6 |
9407 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9408 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9409 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9410 | y_test[1]=n[0]*((-6)*x[0]) | y_test[1]=n[0]*((-6)*x[0]) |
9411 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9412 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9413 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9414 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9415 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9340 class Test_assemblage_2Do1_Reduced(unitt | Line 9418 class Test_assemblage_2Do1_Reduced(unitt |
9418 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1011(self): |
9419 | x=self.domain.getX() | x=self.domain.getX() |
9420 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9421 | u[0]=(-5)+8*x[1]+4*x[0] | u[0]=8+2*x[1]+7*x[0] |
9422 | u[1]=4-9*x[1]+8*x[0] | u[1]=8+8*x[1]-4*x[0] |
9423 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9424 | A_test[1,0,1,1]=x[0] | A_test[1,0,1,1]=x[0] |
9425 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9426 | Y_test[1]=9 | Y_test[1]=(-8) |
9427 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9428 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9429 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9430 | y_test[1]=n[0]*((-9)*x[0]) | y_test[1]=n[0]*(8*x[0]) |
9431 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9432 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9433 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9434 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9435 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9360 class Test_assemblage_2Do1_Reduced(unitt | Line 9438 class Test_assemblage_2Do1_Reduced(unitt |
9438 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1100(self): |
9439 | x=self.domain.getX() | x=self.domain.getX() |
9440 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9441 | u[0]=(-7)-6*x[1]+8*x[0] | u[0]=(-7)-8*x[1]-1*x[0] |
9442 | u[1]=(-6)-2*x[1]-5*x[0] | u[1]=(-1)-4*x[1]-5*x[0] |
9443 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9444 | A_test[1,1,0,0]=x[1] | A_test[1,1,0,0]=x[1] |
9445 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9446 | Y_test[1]=(-8) | Y_test[1]=1 |
9447 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9448 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9449 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9450 | y_test[1]=n[1]*(8*x[1]) | y_test[1]=n[1]*((-1)*x[1]) |
9451 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9452 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9453 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9454 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9455 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9380 class Test_assemblage_2Do1_Reduced(unitt | Line 9458 class Test_assemblage_2Do1_Reduced(unitt |
9458 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1101(self): |
9459 | x=self.domain.getX() | x=self.domain.getX() |
9460 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9461 | u[0]=(-5)+6*x[1]-8*x[0] | u[0]=(-3)-2*x[1]+x[0] |
9462 | u[1]=(-5)-2*x[1]-3*x[0] | u[1]=3+4*x[1]-3*x[0] |
9463 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9464 | A_test[1,1,0,1]=x[1] | A_test[1,1,0,1]=x[1] |
9465 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9466 | Y_test[1]=(-6) | Y_test[1]=2 |
9467 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9468 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9469 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9470 | y_test[1]=n[1]*(6*x[1]) | y_test[1]=n[1]*((-2)*x[1]) |
9471 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9472 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9473 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9474 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9475 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9400 class Test_assemblage_2Do1_Reduced(unitt | Line 9478 class Test_assemblage_2Do1_Reduced(unitt |
9478 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1110(self): |
9479 | x=self.domain.getX() | x=self.domain.getX() |
9480 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9481 | u[0]=(-6)+4*x[1]-2*x[0] | u[0]=(-8)-4*x[1]-6*x[0] |
9482 | u[1]=(-4)-3*x[1]-7*x[0] | u[1]=8-8*x[1]-9*x[0] |
9483 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9484 | A_test[1,1,1,0]=x[1] | A_test[1,1,1,0]=x[1] |
9485 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9486 | Y_test[1]=7 | Y_test[1]=9 |
9487 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9488 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9489 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9490 | y_test[1]=n[1]*((-7)*x[1]) | y_test[1]=n[1]*((-9)*x[1]) |
9491 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9492 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9493 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9494 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9495 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9420 class Test_assemblage_2Do1_Reduced(unitt | Line 9498 class Test_assemblage_2Do1_Reduced(unitt |
9498 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeStrong_comp1111(self): |
9499 | x=self.domain.getX() | x=self.domain.getX() |
9500 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9501 | u[0]=(-4)+6*x[1]+6*x[0] | u[0]=4-8*x[1]+x[0] |
9502 | u[1]=2-1*x[1]-4*x[0] | u[1]=(-6)-4*x[1]-3*x[0] |
9503 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9504 | A_test[1,1,1,1]=x[1] | A_test[1,1,1,1]=x[1] |
9505 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9506 | Y_test[1]=1 | Y_test[1]=4 |
9507 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9508 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9509 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9510 | y_test[1]=n[1]*((-1)*x[1]) | y_test[1]=n[1]*((-4)*x[1]) |
9511 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9512 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
9513 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9514 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9515 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9440 class Test_assemblage_2Do1_Reduced(unitt | Line 9518 class Test_assemblage_2Do1_Reduced(unitt |
9518 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp000(self): |
9519 | x=self.domain.getX() | x=self.domain.getX() |
9520 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9521 | u[0]=3+2*x[1]+2*x[0] | u[0]=1 |
9522 | u[1]=(-1)+2*x[1]+8*x[0] | u[1]=(-7) |
9523 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9524 | B_test[0,0,0]=x[0] | B_test[0,0,0]=x[0] |
9525 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9526 | Y_test[0]=(-3)-2*x[1]-4*x[0] | Y_test[0]=(-1) |
9527 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9528 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9529 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9530 | y_test[0]=n[0]*(3*x[0]+2*x[0]*x[1]+2*x[0]**2) | y_test[0]=n[0]*(x[0]) |
9531 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9532 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
9533 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9534 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9535 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9460 class Test_assemblage_2Do1_Reduced(unitt | Line 9538 class Test_assemblage_2Do1_Reduced(unitt |
9538 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp001(self): |
9539 | x=self.domain.getX() | x=self.domain.getX() |
9540 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9541 | u[0]=(-9)+6*x[1]-2*x[0] | u[0]=(-8) |
9542 | u[1]=4+3*x[1]-2*x[0] | u[1]=(-6) |
9543 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9544 | B_test[0,0,1]=x[0] | B_test[0,0,1]=x[0] |
9545 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9546 | Y_test[0]=(-4)-3*x[1]+4*x[0] | Y_test[0]=6 |
9547 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9548 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9549 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9550 | y_test[0]=n[0]*(4*x[0]+3*x[0]*x[1]-2*x[0]**2) | y_test[0]=n[0]*((-6)*x[0]) |
9551 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9552 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
9553 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9554 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9555 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9480 class Test_assemblage_2Do1_Reduced(unitt | Line 9558 class Test_assemblage_2Do1_Reduced(unitt |
9558 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp010(self): |
9559 | x=self.domain.getX() | x=self.domain.getX() |
9560 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9561 | u[0]=(-3)+5*x[1]+x[0] | u[0]=(-5) |
9562 | u[1]=7-3*x[1]+3*x[0] | u[1]=(-9) |
9563 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9564 | B_test[0,1,0]=x[1] | B_test[0,1,0]=x[1] |
9565 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9566 | Y_test[0]=3-10*x[1]-1*x[0] | Y_test[0]=5 |
9567 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9568 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9569 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9570 | y_test[0]=n[1]*((-3)*x[1]+5*x[1]**2+x[0]*x[1]) | y_test[0]=n[1]*((-5)*x[1]) |
9571 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9572 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
9573 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9574 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9575 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9500 class Test_assemblage_2Do1_Reduced(unitt | Line 9578 class Test_assemblage_2Do1_Reduced(unitt |
9578 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp011(self): |
9579 | x=self.domain.getX() | x=self.domain.getX() |
9580 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9581 | u[0]=(-5)-5*x[1]-4*x[0] | u[0]=4 |
9582 | u[1]=1-9*x[1]-9*x[0] | u[1]=3 |
9583 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9584 | B_test[0,1,1]=x[1] | B_test[0,1,1]=x[1] |
9585 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9586 | Y_test[0]=(-1)+18*x[1]+9*x[0] | Y_test[0]=(-3) |
9587 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9588 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9589 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9590 | y_test[0]=n[1]*(x[1]-9*x[1]**2-9*x[0]*x[1]) | y_test[0]=n[1]*(3*x[1]) |
9591 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9592 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
9593 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9594 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9595 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9520 class Test_assemblage_2Do1_Reduced(unitt | Line 9598 class Test_assemblage_2Do1_Reduced(unitt |
9598 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp100(self): |
9599 | x=self.domain.getX() | x=self.domain.getX() |
9600 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9601 | u[0]=(-4)+7*x[1]-4*x[0] | u[0]=8 |
9602 | u[1]=2+7*x[1]+7*x[0] | u[1]=(-8) |
9603 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9604 | B_test[1,0,0]=x[0] | B_test[1,0,0]=x[0] |
9605 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9606 | Y_test[1]=4-7*x[1]+8*x[0] | Y_test[1]=(-8) |
9607 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9608 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9609 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9610 | y_test[1]=n[0]*((-4)*x[0]+7*x[0]*x[1]-4*x[0]**2) | y_test[1]=n[0]*(8*x[0]) |
9611 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9612 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
9613 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9614 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9615 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9540 class Test_assemblage_2Do1_Reduced(unitt | Line 9618 class Test_assemblage_2Do1_Reduced(unitt |
9618 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp101(self): |
9619 | x=self.domain.getX() | x=self.domain.getX() |
9620 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9621 | u[0]=3+x[1]-6*x[0] | u[0]=(-1) |
9622 | u[1]=(-4)-8*x[1]-5*x[0] | u[1]=(-3) |
9623 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9624 | B_test[1,0,1]=x[0] | B_test[1,0,1]=x[0] |
9625 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9626 | Y_test[1]=4+8*x[1]+10*x[0] | Y_test[1]=3 |
9627 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9628 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9629 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9630 | y_test[1]=n[0]*((-4)*x[0]-8*x[0]*x[1]-5*x[0]**2) | y_test[1]=n[0]*((-3)*x[0]) |
9631 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9632 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
9633 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9634 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9635 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9560 class Test_assemblage_2Do1_Reduced(unitt | Line 9638 class Test_assemblage_2Do1_Reduced(unitt |
9638 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp110(self): |
9639 | x=self.domain.getX() | x=self.domain.getX() |
9640 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9641 | u[0]=(-1)+4*x[1]-9*x[0] | u[0]=1 |
9642 | u[1]=(-8)-3*x[1]-7*x[0] | u[1]=(-1) |
9643 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9644 | B_test[1,1,0]=x[1] | B_test[1,1,0]=x[1] |
9645 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9646 | Y_test[1]=1-8*x[1]+9*x[0] | Y_test[1]=(-1) |
9647 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9648 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9649 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9650 | y_test[1]=n[1]*((-1)*x[1]+4*x[1]**2-9*x[0]*x[1]) | y_test[1]=n[1]*(x[1]) |
9651 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9652 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
9653 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9654 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9655 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9580 class Test_assemblage_2Do1_Reduced(unitt | Line 9658 class Test_assemblage_2Do1_Reduced(unitt |
9658 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeStrong_comp111(self): |
9659 | x=self.domain.getX() | x=self.domain.getX() |
9660 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9661 | u[0]=(-7)-6*x[1]-6*x[0] | u[0]=2 |
9662 | u[1]=6+x[1]+2*x[0] | u[1]=(-4) |
9663 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9664 | B_test[1,1,1]=x[1] | B_test[1,1,1]=x[1] |
9665 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9666 | Y_test[1]=(-6)-2*x[1]-2*x[0] | Y_test[1]=4 |
9667 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
9668 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
9669 | y_test=Data(0.,(2,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(2,),ReducedFunctionOnBoundary(self.domain)) |
9670 | y_test[1]=n[1]*(6*x[1]+x[1]**2+2*x[0]*x[1]) | y_test[1]=n[1]*((-4)*x[1]) |
9671 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9672 | pde.setValue(B=B_test, Y=Y_test, y=y_test) | pde.setValue(B_reduced=B_test, Y_reduced=Y_test, y_reduced=y_test) |
9673 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9674 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9675 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9600 class Test_assemblage_2Do1_Reduced(unitt | Line 9678 class Test_assemblage_2Do1_Reduced(unitt |
9678 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp000(self): |
9679 | x=self.domain.getX() | x=self.domain.getX() |
9680 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9681 | u[0]=(-2)+7*x[1]-1*x[0] | u[0]=(-9)+4*x[1]-2*x[0] |
9682 | u[1]=(-4)-8*x[1]-4*x[0] | u[1]=(-3)-8*x[1]+x[0] |
9683 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9684 | C_test[0,0,0]=x[0] | C_test[0,0,0]=x[0] |
9685 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9686 | Y_test[0]=(-1)*x[0] | Y_test[0]=(-2)*x[0] |
9687 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9688 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9689 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9690 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9691 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9616 class Test_assemblage_2Do1_Reduced(unitt | Line 9694 class Test_assemblage_2Do1_Reduced(unitt |
9694 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp001(self): |
9695 | x=self.domain.getX() | x=self.domain.getX() |
9696 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9697 | u[0]=6+x[1]-3*x[0] | u[0]=4+8*x[1]-5*x[0] |
9698 | u[1]=(-7)-2*x[1]-9*x[0] | u[1]=(-1)+4*x[1]+4*x[0] |
9699 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9700 | C_test[0,0,1]=x[1] | C_test[0,0,1]=x[1] |
9701 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9702 | Y_test[0]=x[1] | Y_test[0]=8*x[1] |
9703 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9704 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9705 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9706 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9707 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9632 class Test_assemblage_2Do1_Reduced(unitt | Line 9710 class Test_assemblage_2Do1_Reduced(unitt |
9710 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp010(self): |
9711 | x=self.domain.getX() | x=self.domain.getX() |
9712 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9713 | u[0]=(-7)-8*x[1]-7*x[0] | u[0]=(-2)-2*x[1]+x[0] |
9714 | u[1]=8-8*x[1]-9*x[0] | u[1]=(-3)+3*x[1]-4*x[0] |
9715 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9716 | C_test[0,1,0]=x[0] | C_test[0,1,0]=x[0] |
9717 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9718 | Y_test[0]=(-9)*x[0] | Y_test[0]=(-4)*x[0] |
9719 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9720 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9721 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9722 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9723 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9648 class Test_assemblage_2Do1_Reduced(unitt | Line 9726 class Test_assemblage_2Do1_Reduced(unitt |
9726 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp011(self): |
9727 | x=self.domain.getX() | x=self.domain.getX() |
9728 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9729 | u[0]=(-6)-9*x[1]+8*x[0] | u[0]=1-8*x[1]-1*x[0] |
9730 | u[1]=(-7)-6*x[1]-6*x[0] | u[1]=(-9)+7*x[1]-8*x[0] |
9731 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9732 | C_test[0,1,1]=x[1] | C_test[0,1,1]=x[1] |
9733 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9734 | Y_test[0]=(-6)*x[1] | Y_test[0]=7*x[1] |
9735 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9736 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9737 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9738 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9739 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9664 class Test_assemblage_2Do1_Reduced(unitt | Line 9742 class Test_assemblage_2Do1_Reduced(unitt |
9742 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp100(self): |
9743 | x=self.domain.getX() | x=self.domain.getX() |
9744 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9745 | u[0]=(-3)+2*x[1]-9*x[0] | u[0]=(-3)-7*x[1]-9*x[0] |
9746 | u[1]=(-2)-1*x[1]-1*x[0] | u[1]=(-4)-9*x[1]-2*x[0] |
9747 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9748 | C_test[1,0,0]=x[0] | C_test[1,0,0]=x[0] |
9749 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9750 | Y_test[1]=(-9)*x[0] | Y_test[1]=(-9)*x[0] |
9751 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9752 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9753 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9754 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9755 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9680 class Test_assemblage_2Do1_Reduced(unitt | Line 9758 class Test_assemblage_2Do1_Reduced(unitt |
9758 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp101(self): |
9759 | x=self.domain.getX() | x=self.domain.getX() |
9760 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9761 | u[0]=(-9)-9*x[1]+7*x[0] | u[0]=2+3*x[1]-5*x[0] |
9762 | u[1]=(-9)+2*x[1]+x[0] | u[1]=6+5*x[1]+4*x[0] |
9763 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9764 | C_test[1,0,1]=x[1] | C_test[1,0,1]=x[1] |
9765 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9766 | Y_test[1]=(-9)*x[1] | Y_test[1]=3*x[1] |
9767 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9768 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9769 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9770 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9771 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9696 class Test_assemblage_2Do1_Reduced(unitt | Line 9774 class Test_assemblage_2Do1_Reduced(unitt |
9774 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp110(self): |
9775 | x=self.domain.getX() | x=self.domain.getX() |
9776 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9777 | u[0]=(-2)-5*x[1]+8*x[0] | u[0]=2+3*x[1]-2*x[0] |
9778 | u[1]=(-9)-7*x[1]+7*x[0] | u[1]=4-7*x[1]-7*x[0] |
9779 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9780 | C_test[1,1,0]=x[0] | C_test[1,1,0]=x[0] |
9781 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9782 | Y_test[1]=7*x[0] | Y_test[1]=(-7)*x[0] |
9783 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9784 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9785 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9786 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9787 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9712 class Test_assemblage_2Do1_Reduced(unitt | Line 9790 class Test_assemblage_2Do1_Reduced(unitt |
9790 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_C_Vario_typeStrong_comp111(self): |
9791 | x=self.domain.getX() | x=self.domain.getX() |
9792 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9793 | u[0]=(-8)+7*x[1]+4*x[0] | u[0]=3+4*x[1]-2*x[0] |
9794 | u[1]=(-8)-8*x[1]-8*x[0] | u[1]=2-5*x[1]-8*x[0] |
9795 | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | C_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
9796 | C_test[1,1,1]=x[1] | C_test[1,1,1]=x[1] |
9797 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9798 | Y_test[1]=(-8)*x[1] | Y_test[1]=(-5)*x[1] |
9799 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9800 | pde.setValue(C=C_test, Y=Y_test) | pde.setValue(C_reduced=C_test, Y_reduced=Y_test) |
9801 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9802 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9803 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9728 class Test_assemblage_2Do1_Reduced(unitt | Line 9806 class Test_assemblage_2Do1_Reduced(unitt |
9806 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp00(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp00(self): |
9807 | x=self.domain.getX() | x=self.domain.getX() |
9808 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9809 | u[0]=(-9) | u[0]=3 |
9810 | u[1]=(-2) | u[1]=3 |
9811 | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
9812 | D_test[0,0]=x[0] | D_test[0,0]=x[0] |
9813 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9814 | Y_test[0]=(-9)*x[0] | Y_test[0]=3*x[0] |
9815 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9816 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
9817 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9818 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9819 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9744 class Test_assemblage_2Do1_Reduced(unitt | Line 9822 class Test_assemblage_2Do1_Reduced(unitt |
9822 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp01(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp01(self): |
9823 | x=self.domain.getX() | x=self.domain.getX() |
9824 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9825 | u[0]=7 | u[0]=(-7) |
9826 | u[1]=4 | u[1]=4 |
9827 | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
9828 | D_test[0,1]=x[0] | D_test[0,1]=x[0] |
9829 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9830 | Y_test[0]=4*x[0] | Y_test[0]=4*x[0] |
9831 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9832 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
9833 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9834 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9835 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9760 class Test_assemblage_2Do1_Reduced(unitt | Line 9838 class Test_assemblage_2Do1_Reduced(unitt |
9838 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp10(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp10(self): |
9839 | x=self.domain.getX() | x=self.domain.getX() |
9840 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9841 | u[0]=(-9) | u[0]=4 |
9842 | u[1]=(-7) | u[1]=(-7) |
9843 | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
9844 | D_test[1,0]=x[0] | D_test[1,0]=x[0] |
9845 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9846 | Y_test[1]=(-9)*x[0] | Y_test[1]=4*x[0] |
9847 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9848 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
9849 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9850 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9851 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9776 class Test_assemblage_2Do1_Reduced(unitt | Line 9854 class Test_assemblage_2Do1_Reduced(unitt |
9854 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp11(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_D_Vario_typeStrong_comp11(self): |
9855 | x=self.domain.getX() | x=self.domain.getX() |
9856 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9857 | u[0]=3 | u[0]=7 |
9858 | u[1]=1 | u[1]=(-2) |
9859 | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) | D_test=Data(0.,(2,2),ReducedFunction(self.domain)) |
9860 | D_test[1,1]=x[0] | D_test[1,1]=x[0] |
9861 | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(2,),ContinuousFunction(self.domain)) |
9862 | Y_test[1]=x[0] | Y_test[1]=(-2)*x[0] |
9863 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9864 | pde.setValue(D=D_test, Y=Y_test) | pde.setValue(D_reduced=D_test, Y_reduced=Y_test) |
9865 | r=pde.getResidual(u) | |
9866 | rhs=pde.getRightHandSide() | |
9867 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
9868 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
9869 | #================================================== | |
9870 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp00(self): | |
9871 | x=self.domain.getX() | |
9872 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9873 | u[0]=3 | |
9874 | u[1]=4 | |
9875 | d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain)) | |
9876 | d_test[0,0]=x[0] | |
9877 | y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9878 | y_test[0]=3*x[0] | |
9879 | pde=LinearPDE(self.domain) | |
9880 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
9881 | r=pde.getResidual(u) | |
9882 | rhs=pde.getRightHandSide() | |
9883 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
9884 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
9885 | #================================================== | |
9886 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp01(self): | |
9887 | x=self.domain.getX() | |
9888 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9889 | u[0]=(-6) | |
9890 | u[1]=(-3) | |
9891 | d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain)) | |
9892 | d_test[0,1]=x[0] | |
9893 | y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9894 | y_test[0]=(-3)*x[0] | |
9895 | pde=LinearPDE(self.domain) | |
9896 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
9897 | r=pde.getResidual(u) | |
9898 | rhs=pde.getRightHandSide() | |
9899 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
9900 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
9901 | #================================================== | |
9902 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp10(self): | |
9903 | x=self.domain.getX() | |
9904 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9905 | u[0]=(-7) | |
9906 | u[1]=1 | |
9907 | d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain)) | |
9908 | d_test[1,0]=x[0] | |
9909 | y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9910 | y_test[1]=(-7)*x[0] | |
9911 | pde=LinearPDE(self.domain) | |
9912 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
9913 | r=pde.getResidual(u) | |
9914 | rhs=pde.getRightHandSide() | |
9915 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | |
9916 | self.failUnless(Lsup(r)<=self.RES_TOL*Lsup(rhs),"residual is too big") | |
9917 | #================================================== | |
9918 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_d_Vario_typeStrong_comp11(self): | |
9919 | x=self.domain.getX() | |
9920 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9921 | u[0]=3 | |
9922 | u[1]=1 | |
9923 | d_test=Data(0.,(2,2),ReducedFunctionOnBoundary(self.domain)) | |
9924 | d_test[1,1]=x[0] | |
9925 | y_test=Data(0.,(2,),ContinuousFunction(self.domain)) | |
9926 | y_test[1]=x[0] | |
9927 | pde=LinearPDE(self.domain) | |
9928 | pde.setValue(d_reduced=d_test, y_reduced=y_test) | |
9929 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9930 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9931 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9792 class Test_assemblage_2Do1_Reduced(unitt | Line 9934 class Test_assemblage_2Do1_Reduced(unitt |
9934 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0000(self): |
9935 | x=self.domain.getX() | x=self.domain.getX() |
9936 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9937 | u[0]=1-8*x[1]-4*x[0] | u[0]=2+8*x[1]+8*x[0] |
9938 | u[1]=(-2)+2*x[1]-9*x[0] | u[1]=1-9*x[1]-2*x[0] |
9939 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9940 | A_test[0,0,0,0]=8 | A_test[0,0,0,0]=2 |
9941 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
9942 | X_test[0,0]=(-32) | X_test[0,0]=16 |
9943 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9944 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
9945 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9946 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9947 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9808 class Test_assemblage_2Do1_Reduced(unitt | Line 9950 class Test_assemblage_2Do1_Reduced(unitt |
9950 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0001(self): |
9951 | x=self.domain.getX() | x=self.domain.getX() |
9952 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9953 | u[0]=3-1*x[1]+7*x[0] | u[0]=3-8*x[1]+6*x[0] |
9954 | u[1]=4-1*x[1]-2*x[0] | u[1]=(-4)-3*x[1]-8*x[0] |
9955 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9956 | A_test[0,0,0,1]=1 | A_test[0,0,0,1]=5 |
9957 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
9958 | X_test[0,0]=(-1) | X_test[0,0]=(-40) |
9959 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9960 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
9961 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9962 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9963 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9824 class Test_assemblage_2Do1_Reduced(unitt | Line 9966 class Test_assemblage_2Do1_Reduced(unitt |
9966 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0010(self): |
9967 | x=self.domain.getX() | x=self.domain.getX() |
9968 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9969 | u[0]=3-6*x[1]+3*x[0] | u[0]=5-4*x[1]+4*x[0] |
9970 | u[1]=(-3)+3*x[1]+3*x[0] | u[1]=(-6)+3*x[1]+x[0] |
9971 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9972 | A_test[0,0,1,0]=7 | A_test[0,0,1,0]=4 |
9973 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
9974 | X_test[0,0]=21 | X_test[0,0]=4 |
9975 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9976 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
9977 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9978 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9979 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9840 class Test_assemblage_2Do1_Reduced(unitt | Line 9982 class Test_assemblage_2Do1_Reduced(unitt |
9982 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0011(self): |
9983 | x=self.domain.getX() | x=self.domain.getX() |
9984 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
9985 | u[0]=(-4)+7*x[1]-4*x[0] | u[0]=5+3*x[1]-8*x[0] |
9986 | u[1]=(-8)-3*x[1]-7*x[0] | u[1]=(-9)+6*x[1]+6*x[0] |
9987 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
9988 | A_test[0,0,1,1]=7 | A_test[0,0,1,1]=1 |
9989 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
9990 | X_test[0,0]=(-21) | X_test[0,0]=6 |
9991 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
9992 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
9993 | r=pde.getResidual(u) | r=pde.getResidual(u) |
9994 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
9995 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9856 class Test_assemblage_2Do1_Reduced(unitt | Line 9998 class Test_assemblage_2Do1_Reduced(unitt |
9998 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0100(self): |
9999 | x=self.domain.getX() | x=self.domain.getX() |
10000 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10001 | u[0]=4-8*x[1]+8*x[0] | u[0]=1-8*x[1]-7*x[0] |
10002 | u[1]=(-6)-2*x[1]-7*x[0] | u[1]=(-7)-3*x[1]+5*x[0] |
10003 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10004 | A_test[0,1,0,0]=6 | A_test[0,1,0,0]=5 |
10005 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10006 | X_test[0,1]=48 | X_test[0,1]=(-35) |
10007 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10008 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10009 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10010 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10011 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9872 class Test_assemblage_2Do1_Reduced(unitt | Line 10014 class Test_assemblage_2Do1_Reduced(unitt |
10014 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0101(self): |
10015 | x=self.domain.getX() | x=self.domain.getX() |
10016 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10017 | u[0]=(-9)-2*x[1]-2*x[0] | u[0]=7-7*x[1]+8*x[0] |
10018 | u[1]=(-4)-9*x[1]-7*x[0] | u[1]=4-9*x[1]+7*x[0] |
10019 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10020 | A_test[0,1,0,1]=2 | A_test[0,1,0,1]=3 |
10021 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10022 | X_test[0,1]=(-4) | X_test[0,1]=(-21) |
10023 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10024 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10025 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10026 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10027 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9888 class Test_assemblage_2Do1_Reduced(unitt | Line 10030 class Test_assemblage_2Do1_Reduced(unitt |
10030 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0110(self): |
10031 | x=self.domain.getX() | x=self.domain.getX() |
10032 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10033 | u[0]=4-9*x[1]-9*x[0] | u[0]=(-4)-7*x[1]-8*x[0] |
10034 | u[1]=(-8)+3*x[1]-5*x[0] | u[1]=(-7)+x[1]+6*x[0] |
10035 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10036 | A_test[0,1,1,0]=2 | A_test[0,1,1,0]=3 |
10037 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10038 | X_test[0,1]=(-10) | X_test[0,1]=18 |
10039 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10040 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10041 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10042 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10043 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9904 class Test_assemblage_2Do1_Reduced(unitt | Line 10046 class Test_assemblage_2Do1_Reduced(unitt |
10046 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp0111(self): |
10047 | x=self.domain.getX() | x=self.domain.getX() |
10048 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10049 | u[0]=8-4*x[1]-5*x[0] | u[0]=6-6*x[1]+5*x[0] |
10050 | u[1]=(-2)+4*x[1]+2*x[0] | u[1]=8-5*x[1]+x[0] |
10051 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10052 | A_test[0,1,1,1]=6 | A_test[0,1,1,1]=8 |
10053 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10054 | X_test[0,1]=24 | X_test[0,1]=(-40) |
10055 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10056 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10057 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10058 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10059 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9920 class Test_assemblage_2Do1_Reduced(unitt | Line 10062 class Test_assemblage_2Do1_Reduced(unitt |
10062 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1000(self): |
10063 | x=self.domain.getX() | x=self.domain.getX() |
10064 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10065 | u[0]=(-3)+5*x[1]-6*x[0] | u[0]=2-5*x[1]+6*x[0] |
10066 | u[1]=4-6*x[1]+6*x[0] | u[1]=(-2)-9*x[1]+2*x[0] |
10067 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10068 | A_test[1,0,0,0]=7 | A_test[1,0,0,0]=6 |
10069 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10070 | X_test[1,0]=(-42) | X_test[1,0]=36 |
10071 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10072 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10073 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10074 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10075 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9936 class Test_assemblage_2Do1_Reduced(unitt | Line 10078 class Test_assemblage_2Do1_Reduced(unitt |
10078 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1001(self): |
10079 | x=self.domain.getX() | x=self.domain.getX() |
10080 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10081 | u[0]=5+x[1]+8*x[0] | u[0]=(-7)+5*x[1]-5*x[0] |
10082 | u[1]=(-1)-4*x[1]-5*x[0] | u[1]=6-9*x[1]-6*x[0] |
10083 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10084 | A_test[1,0,0,1]=3 | A_test[1,0,0,1]=1 |
10085 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10086 | X_test[1,0]=3 | X_test[1,0]=5 |
10087 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10088 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10089 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10090 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10091 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9952 class Test_assemblage_2Do1_Reduced(unitt | Line 10094 class Test_assemblage_2Do1_Reduced(unitt |
10094 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1010(self): |
10095 | x=self.domain.getX() | x=self.domain.getX() |
10096 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10097 | u[0]=(-7)-5*x[1]+2*x[0] | u[0]=3+6*x[1]+5*x[0] |
10098 | u[1]=6+3*x[1]-4*x[0] | u[1]=(-7)+x[1]+3*x[0] |
10099 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10100 | A_test[1,0,1,0]=8 | A_test[1,0,1,0]=4 |
10101 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10102 | X_test[1,0]=(-32) | X_test[1,0]=12 |
10103 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10104 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10105 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10106 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10107 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9968 class Test_assemblage_2Do1_Reduced(unitt | Line 10110 class Test_assemblage_2Do1_Reduced(unitt |
10110 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1011(self): |
10111 | x=self.domain.getX() | x=self.domain.getX() |
10112 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10113 | u[0]=1-9*x[1]+2*x[0] | u[0]=5+x[1]-1*x[0] |
10114 | u[1]=(-3)-6*x[1]+6*x[0] | u[1]=(-7)-5*x[1]-3*x[0] |
10115 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10116 | A_test[1,0,1,1]=8 | A_test[1,0,1,1]=4 |
10117 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10118 | X_test[1,0]=(-48) | X_test[1,0]=(-20) |
10119 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10120 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10121 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10122 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10123 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 9984 class Test_assemblage_2Do1_Reduced(unitt | Line 10126 class Test_assemblage_2Do1_Reduced(unitt |
10126 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1100(self): |
10127 | x=self.domain.getX() | x=self.domain.getX() |
10128 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10129 | u[0]=8+5*x[1]+6*x[0] | u[0]=(-8)+x[1]+3*x[0] |
10130 | u[1]=(-5)-3*x[1]+6*x[0] | u[1]=1+7*x[1]-2*x[0] |
10131 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10132 | A_test[1,1,0,0]=1 | A_test[1,1,0,0]=5 |
10133 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10134 | X_test[1,1]=6 | X_test[1,1]=15 |
10135 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10136 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10137 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10138 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10139 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10000 class Test_assemblage_2Do1_Reduced(unitt | Line 10142 class Test_assemblage_2Do1_Reduced(unitt |
10142 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1101(self): |
10143 | x=self.domain.getX() | x=self.domain.getX() |
10144 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10145 | u[0]=2+4*x[1]-8*x[0] | u[0]=(-6)-7*x[1]-6*x[0] |
10146 | u[1]=(-9)-2*x[1]+8*x[0] | u[1]=6-8*x[1]+4*x[0] |
10147 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10148 | A_test[1,1,0,1]=5 | A_test[1,1,0,1]=6 |
10149 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10150 | X_test[1,1]=20 | X_test[1,1]=(-42) |
10151 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10152 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10153 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10154 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10155 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10016 class Test_assemblage_2Do1_Reduced(unitt | Line 10158 class Test_assemblage_2Do1_Reduced(unitt |
10158 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1110(self): |
10159 | x=self.domain.getX() | x=self.domain.getX() |
10160 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10161 | u[0]=(-8)+4*x[1]-5*x[0] | u[0]=(-6)+6*x[1]-1*x[0] |
10162 | u[1]=1+x[1]-5*x[0] | u[1]=(-9)-4*x[1]-3*x[0] |
10163 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10164 | A_test[1,1,1,0]=5 | A_test[1,1,1,0]=7 |
10165 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10166 | X_test[1,1]=(-25) | X_test[1,1]=(-21) |
10167 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10168 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10169 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10170 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10171 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10032 class Test_assemblage_2Do1_Reduced(unitt | Line 10174 class Test_assemblage_2Do1_Reduced(unitt |
10174 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Const_typeWeak_comp1111(self): |
10175 | x=self.domain.getX() | x=self.domain.getX() |
10176 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10177 | u[0]=3+2*x[1]+x[0] | u[0]=(-1)-8*x[1]-6*x[0] |
10178 | u[1]=7+8*x[1]-5*x[0] | u[1]=(-9)+8*x[1]-5*x[0] |
10179 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10180 | A_test[1,1,1,1]=3 | A_test[1,1,1,1]=6 |
10181 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10182 | X_test[1,1]=24 | X_test[1,1]=48 |
10183 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10184 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10185 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10186 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10187 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10048 class Test_assemblage_2Do1_Reduced(unitt | Line 10190 class Test_assemblage_2Do1_Reduced(unitt |
10190 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp000(self): |
10191 | x=self.domain.getX() | x=self.domain.getX() |
10192 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10193 | u[0]=7+3*x[1]-5*x[0] | u[0]=(-9) |
10194 | u[1]=6-5*x[1]+5*x[0] | u[1]=(-3) |
10195 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10196 | B_test[0,0,0]=1 | B_test[0,0,0]=1 |
10197 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10198 | X_test[0,0]=7+3*x[1]-5*x[0] | X_test[0,0]=(-9) |
10199 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10200 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10201 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10202 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10203 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10064 class Test_assemblage_2Do1_Reduced(unitt | Line 10206 class Test_assemblage_2Do1_Reduced(unitt |
10206 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp001(self): |
10207 | x=self.domain.getX() | x=self.domain.getX() |
10208 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10209 | u[0]=1+2*x[1]-9*x[0] | u[0]=(-3) |
10210 | u[1]=5-6*x[1]-4*x[0] | u[1]=3 |
10211 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10212 | B_test[0,0,1]=8 | B_test[0,0,1]=6 |
10213 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10214 | X_test[0,0]=40-48*x[1]-32*x[0] | X_test[0,0]=18 |
10215 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10216 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10217 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10218 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10219 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10080 class Test_assemblage_2Do1_Reduced(unitt | Line 10222 class Test_assemblage_2Do1_Reduced(unitt |
10222 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp010(self): |
10223 | x=self.domain.getX() | x=self.domain.getX() |
10224 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10225 | u[0]=7-3*x[1]+2*x[0] | u[0]=5 |
10226 | u[1]=2+3*x[1]-2*x[0] | u[1]=6 |
10227 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10228 | B_test[0,1,0]=1 | B_test[0,1,0]=5 |
10229 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10230 | X_test[0,1]=7-3*x[1]+2*x[0] | X_test[0,1]=25 |
10231 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10232 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10233 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10234 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10235 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10096 class Test_assemblage_2Do1_Reduced(unitt | Line 10238 class Test_assemblage_2Do1_Reduced(unitt |
10238 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp011(self): |
10239 | x=self.domain.getX() | x=self.domain.getX() |
10240 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10241 | u[0]=6+3*x[1]+6*x[0] | u[0]=7 |
10242 | u[1]=2+8*x[1]-9*x[0] | u[1]=1 |
10243 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10244 | B_test[0,1,1]=1 | B_test[0,1,1]=3 |
10245 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10246 | X_test[0,1]=2+8*x[1]-9*x[0] | X_test[0,1]=3 |
10247 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10248 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10249 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10250 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10251 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10112 class Test_assemblage_2Do1_Reduced(unitt | Line 10254 class Test_assemblage_2Do1_Reduced(unitt |
10254 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp100(self): |
10255 | x=self.domain.getX() | x=self.domain.getX() |
10256 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10257 | u[0]=(-4)-6*x[1]+3*x[0] | u[0]=1 |
10258 | u[1]=3+3*x[1]+2*x[0] | u[1]=6 |
10259 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10260 | B_test[1,0,0]=2 | B_test[1,0,0]=6 |
10261 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10262 | X_test[1,0]=(-8)-12*x[1]+6*x[0] | X_test[1,0]=6 |
10263 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10264 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10265 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10266 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10267 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10128 class Test_assemblage_2Do1_Reduced(unitt | Line 10270 class Test_assemblage_2Do1_Reduced(unitt |
10270 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp101(self): |
10271 | x=self.domain.getX() | x=self.domain.getX() |
10272 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10273 | u[0]=6-2*x[1]+4*x[0] | u[0]=3 |
10274 | u[1]=(-3)-2*x[1]-8*x[0] | u[1]=(-4) |
10275 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10276 | B_test[1,0,1]=7 | B_test[1,0,1]=1 |
10277 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10278 | X_test[1,0]=(-21)-14*x[1]-56*x[0] | X_test[1,0]=(-4) |
10279 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10280 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10281 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10282 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10283 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10144 class Test_assemblage_2Do1_Reduced(unitt | Line 10286 class Test_assemblage_2Do1_Reduced(unitt |
10286 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp110(self): |
10287 | x=self.domain.getX() | x=self.domain.getX() |
10288 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10289 | u[0]=(-2)-5*x[1]+2*x[0] | u[0]=(-6) |
10290 | u[1]=1+4*x[1]-7*x[0] | u[1]=8 |
10291 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10292 | B_test[1,1,0]=2 | B_test[1,1,0]=2 |
10293 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10294 | X_test[1,1]=(-4)-10*x[1]+4*x[0] | X_test[1,1]=(-12) |
10295 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10296 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10297 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10298 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10299 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10160 class Test_assemblage_2Do1_Reduced(unitt | Line 10302 class Test_assemblage_2Do1_Reduced(unitt |
10302 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Const_typeWeak_comp111(self): |
10303 | x=self.domain.getX() | x=self.domain.getX() |
10304 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10305 | u[0]=2+3*x[1]-7*x[0] | u[0]=7 |
10306 | u[1]=(-1)+4*x[1]+6*x[0] | u[1]=(-9) |
10307 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10308 | B_test[1,1,1]=2 | B_test[1,1,1]=3 |
10309 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10310 | X_test[1,1]=(-2)+8*x[1]+12*x[0] | X_test[1,1]=(-27) |
10311 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10312 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10313 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10314 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10315 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10176 class Test_assemblage_2Do1_Reduced(unitt | Line 10318 class Test_assemblage_2Do1_Reduced(unitt |
10318 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0000(self): |
10319 | x=self.domain.getX() | x=self.domain.getX() |
10320 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10321 | u[0]=(-8)-6*x[1]+6*x[0] | u[0]=1-1*x[1]+x[0] |
10322 | u[1]=2-5*x[1]+7*x[0] | u[1]=7+4*x[1]+7*x[0] |
10323 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10324 | A_test[0,0,0,0]=x[0] | A_test[0,0,0,0]=x[0] |
10325 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10326 | X_test[0,0]=6*x[0] | X_test[0,0]=x[0] |
10327 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10328 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10329 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10330 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10331 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10192 class Test_assemblage_2Do1_Reduced(unitt | Line 10334 class Test_assemblage_2Do1_Reduced(unitt |
10334 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0001(self): |
10335 | x=self.domain.getX() | x=self.domain.getX() |
10336 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10337 | u[0]=(-3)+3*x[1]-6*x[0] | u[0]=8-3*x[1]-6*x[0] |
10338 | u[1]=(-3)-9*x[1]-2*x[0] | u[1]=3-2*x[1]-9*x[0] |
10339 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10340 | A_test[0,0,0,1]=x[0] | A_test[0,0,0,1]=x[0] |
10341 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10342 | X_test[0,0]=3*x[0] | X_test[0,0]=(-3)*x[0] |
10343 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10344 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10345 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10346 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10347 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10208 class Test_assemblage_2Do1_Reduced(unitt | Line 10350 class Test_assemblage_2Do1_Reduced(unitt |
10350 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0010(self): |
10351 | x=self.domain.getX() | x=self.domain.getX() |
10352 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10353 | u[0]=2+2*x[1]-7*x[0] | u[0]=7+7*x[1]-2*x[0] |
10354 | u[1]=7-6*x[1]-3*x[0] | u[1]=(-1)+5*x[1]-3*x[0] |
10355 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10356 | A_test[0,0,1,0]=x[0] | A_test[0,0,1,0]=x[0] |
10357 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10358 | X_test[0,0]=(-3)*x[0] | X_test[0,0]=(-3)*x[0] |
10359 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10360 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10361 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10362 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10363 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10224 class Test_assemblage_2Do1_Reduced(unitt | Line 10366 class Test_assemblage_2Do1_Reduced(unitt |
10366 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0011(self): |
10367 | x=self.domain.getX() | x=self.domain.getX() |
10368 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10369 | u[0]=3+6*x[1]-3*x[0] | u[0]=3+7*x[1]-9*x[0] |
10370 | u[1]=4+3*x[1]+8*x[0] | u[1]=(-4)-8*x[1]-9*x[0] |
10371 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10372 | A_test[0,0,1,1]=x[0] | A_test[0,0,1,1]=x[0] |
10373 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10374 | X_test[0,0]=3*x[0] | X_test[0,0]=(-8)*x[0] |
10375 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10376 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10377 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10378 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10379 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10240 class Test_assemblage_2Do1_Reduced(unitt | Line 10382 class Test_assemblage_2Do1_Reduced(unitt |
10382 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0100(self): |
10383 | x=self.domain.getX() | x=self.domain.getX() |
10384 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10385 | u[0]=(-4)+5*x[1]+2*x[0] | u[0]=6+5*x[1]-3*x[0] |
10386 | u[1]=(-8)-4*x[1]-3*x[0] | u[1]=(-1)+3*x[1]-4*x[0] |
10387 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10388 | A_test[0,1,0,0]=x[1] | A_test[0,1,0,0]=x[1] |
10389 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10390 | X_test[0,1]=2*x[1] | X_test[0,1]=(-3)*x[1] |
10391 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10392 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10393 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10394 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10395 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10256 class Test_assemblage_2Do1_Reduced(unitt | Line 10398 class Test_assemblage_2Do1_Reduced(unitt |
10398 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0101(self): |
10399 | x=self.domain.getX() | x=self.domain.getX() |
10400 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10401 | u[0]=(-2)+x[1]-8*x[0] | u[0]=(-3)-1*x[1]-9*x[0] |
10402 | u[1]=2-5*x[1]+5*x[0] | u[1]=8+5*x[1]+6*x[0] |
10403 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10404 | A_test[0,1,0,1]=x[1] | A_test[0,1,0,1]=x[1] |
10405 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10406 | X_test[0,1]=x[1] | X_test[0,1]=(-1)*x[1] |
10407 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10408 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10409 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10410 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10411 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10272 class Test_assemblage_2Do1_Reduced(unitt | Line 10414 class Test_assemblage_2Do1_Reduced(unitt |
10414 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0110(self): |
10415 | x=self.domain.getX() | x=self.domain.getX() |
10416 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10417 | u[0]=(-2)+7*x[1]-8*x[0] | u[0]=7-7*x[1]+6*x[0] |
10418 | u[1]=(-8)+2*x[1]+4*x[0] | u[1]=8+2*x[1]-5*x[0] |
10419 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10420 | A_test[0,1,1,0]=x[1] | A_test[0,1,1,0]=x[1] |
10421 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10422 | X_test[0,1]=4*x[1] | X_test[0,1]=(-5)*x[1] |
10423 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10424 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10425 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10426 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10427 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10288 class Test_assemblage_2Do1_Reduced(unitt | Line 10430 class Test_assemblage_2Do1_Reduced(unitt |
10430 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp0111(self): |
10431 | x=self.domain.getX() | x=self.domain.getX() |
10432 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10433 | u[0]=8+4*x[1]-6*x[0] | u[0]=5+4*x[1]+x[0] |
10434 | u[1]=4-2*x[1]+8*x[0] | u[1]=2+4*x[1]-9*x[0] |
10435 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10436 | A_test[0,1,1,1]=x[1] | A_test[0,1,1,1]=x[1] |
10437 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10438 | X_test[0,1]=(-2)*x[1] | X_test[0,1]=4*x[1] |
10439 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10440 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10441 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10442 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10443 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10304 class Test_assemblage_2Do1_Reduced(unitt | Line 10446 class Test_assemblage_2Do1_Reduced(unitt |
10446 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1000(self): |
10447 | x=self.domain.getX() | x=self.domain.getX() |
10448 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10449 | u[0]=(-8)-2*x[1]+4*x[0] | u[0]=(-9)-9*x[1]-3*x[0] |
10450 | u[1]=5+6*x[1]-8*x[0] | u[1]=8-4*x[1]-6*x[0] |
10451 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10452 | A_test[1,0,0,0]=x[0] | A_test[1,0,0,0]=x[0] |
10453 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10454 | X_test[1,0]=4*x[0] | X_test[1,0]=(-3)*x[0] |
10455 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10456 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10457 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10458 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10459 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10320 class Test_assemblage_2Do1_Reduced(unitt | Line 10462 class Test_assemblage_2Do1_Reduced(unitt |
10462 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1001(self): |
10463 | x=self.domain.getX() | x=self.domain.getX() |
10464 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10465 | u[0]=(-4)+x[1]+3*x[0] | u[0]=2-9*x[1]-6*x[0] |
10466 | u[1]=(-4)-6*x[1]+4*x[0] | u[1]=(-9)-6*x[1]-9*x[0] |
10467 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10468 | A_test[1,0,0,1]=x[0] | A_test[1,0,0,1]=x[0] |
10469 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10470 | X_test[1,0]=x[0] | X_test[1,0]=(-9)*x[0] |
10471 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10472 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10473 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10474 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10475 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10336 class Test_assemblage_2Do1_Reduced(unitt | Line 10478 class Test_assemblage_2Do1_Reduced(unitt |
10478 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1010(self): |
10479 | x=self.domain.getX() | x=self.domain.getX() |
10480 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10481 | u[0]=(-8)+3*x[1]-6*x[0] | u[0]=(-8)-3*x[1]-9*x[0] |
10482 | u[1]=6+8*x[1]-8*x[0] | u[1]=(-7)+6*x[1]+6*x[0] |
10483 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10484 | A_test[1,0,1,0]=x[0] | A_test[1,0,1,0]=x[0] |
10485 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10486 | X_test[1,0]=(-8)*x[0] | X_test[1,0]=6*x[0] |
10487 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10488 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10489 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10490 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10491 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10352 class Test_assemblage_2Do1_Reduced(unitt | Line 10494 class Test_assemblage_2Do1_Reduced(unitt |
10494 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1011(self): |
10495 | x=self.domain.getX() | x=self.domain.getX() |
10496 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10497 | u[0]=(-5)-2*x[1]+3*x[0] | u[0]=2-5*x[1]-8*x[0] |
10498 | u[1]=1-8*x[1]+3*x[0] | u[1]=(-9)-5*x[1]+4*x[0] |
10499 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10500 | A_test[1,0,1,1]=x[0] | A_test[1,0,1,1]=x[0] |
10501 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10502 | X_test[1,0]=(-8)*x[0] | X_test[1,0]=(-5)*x[0] |
10503 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10504 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10505 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10506 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10507 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10368 class Test_assemblage_2Do1_Reduced(unitt | Line 10510 class Test_assemblage_2Do1_Reduced(unitt |
10510 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1100(self): |
10511 | x=self.domain.getX() | x=self.domain.getX() |
10512 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10513 | u[0]=(-9)-5*x[1]+4*x[0] | u[0]=7-1*x[1]-9*x[0] |
10514 | u[1]=(-5)-4*x[1]-7*x[0] | u[1]=5+7*x[1]+4*x[0] |
10515 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10516 | A_test[1,1,0,0]=x[1] | A_test[1,1,0,0]=x[1] |
10517 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10518 | X_test[1,1]=4*x[1] | X_test[1,1]=(-9)*x[1] |
10519 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10520 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10521 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10522 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10523 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10384 class Test_assemblage_2Do1_Reduced(unitt | Line 10526 class Test_assemblage_2Do1_Reduced(unitt |
10526 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1101(self): |
10527 | x=self.domain.getX() | x=self.domain.getX() |
10528 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10529 | u[0]=(-2)+5*x[1]-3*x[0] | u[0]=(-6)+4*x[1]-2*x[0] |
10530 | u[1]=4+x[1]+7*x[0] | u[1]=7+4*x[1]-3*x[0] |
10531 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10532 | A_test[1,1,0,1]=x[1] | A_test[1,1,0,1]=x[1] |
10533 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10534 | X_test[1,1]=5*x[1] | X_test[1,1]=4*x[1] |
10535 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10536 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10537 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10538 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10539 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10400 class Test_assemblage_2Do1_Reduced(unitt | Line 10542 class Test_assemblage_2Do1_Reduced(unitt |
10542 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1110(self): |
10543 | x=self.domain.getX() | x=self.domain.getX() |
10544 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10545 | u[0]=(-6)+8*x[1]+x[0] | u[0]=(-2)-5*x[1]+4*x[0] |
10546 | u[1]=(-6)-6*x[1]-8*x[0] | u[1]=3+7*x[1]+5*x[0] |
10547 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10548 | A_test[1,1,1,0]=x[1] | A_test[1,1,1,0]=x[1] |
10549 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10550 | X_test[1,1]=(-8)*x[1] | X_test[1,1]=5*x[1] |
10551 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10552 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10553 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10554 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10555 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10416 class Test_assemblage_2Do1_Reduced(unitt | Line 10558 class Test_assemblage_2Do1_Reduced(unitt |
10558 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_A_Vario_typeWeak_comp1111(self): |
10559 | x=self.domain.getX() | x=self.domain.getX() |
10560 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10561 | u[0]=7+8*x[1]+6*x[0] | u[0]=(-8)+2*x[1]+x[0] |
10562 | u[1]=(-8)-7*x[1]-9*x[0] | u[1]=(-6)-8*x[1]+8*x[0] |
10563 | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) | A_test=Data(0.,(2,2,2,2),ReducedFunction(self.domain)) |
10564 | A_test[1,1,1,1]=x[1] | A_test[1,1,1,1]=x[1] |
10565 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10566 | X_test[1,1]=(-7)*x[1] | X_test[1,1]=(-8)*x[1] |
10567 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10568 | pde.setValue(A=A_test, X=X_test) | pde.setValue(A_reduced=A_test, X_reduced=X_test) |
10569 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10570 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10571 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10432 class Test_assemblage_2Do1_Reduced(unitt | Line 10574 class Test_assemblage_2Do1_Reduced(unitt |
10574 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp000(self): |
10575 | x=self.domain.getX() | x=self.domain.getX() |
10576 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10577 | u[0]=8 | u[0]=(-6) |
10578 | u[1]=3 | u[1]=7 |
10579 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10580 | B_test[0,0,0]=x[0] | B_test[0,0,0]=x[0] |
10581 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10582 | X_test[0,0]=8*x[0] | X_test[0,0]=(-6)*x[0] |
10583 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10584 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10585 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10586 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10587 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10448 class Test_assemblage_2Do1_Reduced(unitt | Line 10590 class Test_assemblage_2Do1_Reduced(unitt |
10590 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp001(self): |
10591 | x=self.domain.getX() | x=self.domain.getX() |
10592 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10593 | u[0]=(-7) | u[0]=7 |
10594 | u[1]=(-4) | u[1]=5 |
10595 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10596 | B_test[0,0,1]=x[0] | B_test[0,0,1]=x[0] |
10597 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10598 | X_test[0,0]=(-4)*x[0] | X_test[0,0]=5*x[0] |
10599 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10600 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10601 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10602 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10603 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10464 class Test_assemblage_2Do1_Reduced(unitt | Line 10606 class Test_assemblage_2Do1_Reduced(unitt |
10606 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp010(self): |
10607 | x=self.domain.getX() | x=self.domain.getX() |
10608 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10609 | u[0]=(-2) | u[0]=6 |
10610 | u[1]=(-3) | u[1]=(-2) |
10611 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10612 | B_test[0,1,0]=x[1] | B_test[0,1,0]=x[1] |
10613 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10614 | X_test[0,1]=(-2)*x[1] | X_test[0,1]=6*x[1] |
10615 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10616 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10617 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10618 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10619 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10480 class Test_assemblage_2Do1_Reduced(unitt | Line 10622 class Test_assemblage_2Do1_Reduced(unitt |
10622 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp011(self): |
10623 | x=self.domain.getX() | x=self.domain.getX() |
10624 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10625 | u[0]=(-2) | u[0]=(-6) |
10626 | u[1]=7 | u[1]=7 |
10627 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10628 | B_test[0,1,1]=x[1] | B_test[0,1,1]=x[1] |
10629 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10630 | X_test[0,1]=7*x[1] | X_test[0,1]=7*x[1] |
10631 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10632 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10633 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10634 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10635 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10496 class Test_assemblage_2Do1_Reduced(unitt | Line 10638 class Test_assemblage_2Do1_Reduced(unitt |
10638 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp100(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp100(self): |
10639 | x=self.domain.getX() | x=self.domain.getX() |
10640 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10641 | u[0]=(-2) | u[0]=(-1) |
10642 | u[1]=(-6) | u[1]=3 |
10643 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10644 | B_test[1,0,0]=x[0] | B_test[1,0,0]=x[0] |
10645 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10646 | X_test[1,0]=(-2)*x[0] | X_test[1,0]=(-1)*x[0] |
10647 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10648 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10649 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10650 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10651 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10512 class Test_assemblage_2Do1_Reduced(unitt | Line 10654 class Test_assemblage_2Do1_Reduced(unitt |
10654 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp101(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp101(self): |
10655 | x=self.domain.getX() | x=self.domain.getX() |
10656 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10657 | u[0]=6 | u[0]=(-6) |
10658 | u[1]=7 | u[1]=(-7) |
10659 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10660 | B_test[1,0,1]=x[0] | B_test[1,0,1]=x[0] |
10661 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10662 | X_test[1,0]=7*x[0] | X_test[1,0]=(-7)*x[0] |
10663 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10664 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10665 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10666 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10667 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10528 class Test_assemblage_2Do1_Reduced(unitt | Line 10670 class Test_assemblage_2Do1_Reduced(unitt |
10670 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp110(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp110(self): |
10671 | x=self.domain.getX() | x=self.domain.getX() |
10672 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10673 | u[0]=4 | u[0]=1 |
10674 | u[1]=(-1) | u[1]=5 |
10675 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10676 | B_test[1,1,0]=x[1] | B_test[1,1,0]=x[1] |
10677 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10678 | X_test[1,1]=4*x[1] | X_test[1,1]=x[1] |
10679 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10680 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10681 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10682 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10683 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10544 class Test_assemblage_2Do1_Reduced(unitt | Line 10686 class Test_assemblage_2Do1_Reduced(unitt |
10686 | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp111(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu2_B_Vario_typeWeak_comp111(self): |
10687 | x=self.domain.getX() | x=self.domain.getX() |
10688 | u=Data(0.,(2,),ContinuousFunction(self.domain)) | u=Data(0.,(2,),ContinuousFunction(self.domain)) |
10689 | u[0]=(-9) | u[0]=7 |
10690 | u[1]=8 | u[1]=7 |
10691 | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) | B_test=Data(0.,(2,2,2),ReducedFunction(self.domain)) |
10692 | B_test[1,1,1]=x[1] | B_test[1,1,1]=x[1] |
10693 | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) | X_test=Data(0.,(2, 2),ContinuousFunction(self.domain)) |
10694 | X_test[1,1]=8*x[1] | X_test[1,1]=7*x[1] |
10695 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10696 | pde.setValue(B=B_test, X=X_test) | pde.setValue(B_reduced=B_test, X_reduced=X_test) |
10697 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10698 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10699 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10560 class Test_assemblage_2Do1_Reduced(unitt | Line 10702 class Test_assemblage_2Do1_Reduced(unitt |
10702 | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0000(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0000(self): |
10703 | x=self.domain.getX() | x=self.domain.getX() |
10704 | u=Data(0.,(3,),ContinuousFunction(self.domain)) | u=Data(0.,(3,),ContinuousFunction(self.domain)) |
10705 | u[0]=3+5*x[1]-4*x[0] | u[0]=(-9)+4*x[1]+3*x[0] |
10706 | u[1]=(-7)-4*x[1]+5*x[0] | u[1]=3-1*x[1]-2*x[0] |
10707 | u[2]=7-9*x[1]-3*x[0] | u[2]=(-3)-4*x[1]+4*x[0] |
10708 | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) |
10709 | A_test[0,0,0,0]=7 | A_test[0,0,0,0]=7 |
10710 | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) |
10711 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
10712 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
10713 | y_test=Data(0.,(3,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain)) |
10714 | y_test[0]=n[0]*((-28)) | y_test[0]=n[0]*(21) |
10715 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10716 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
10717 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10718 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10719 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10580 class Test_assemblage_2Do1_Reduced(unitt | Line 10722 class Test_assemblage_2Do1_Reduced(unitt |
10722 | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0001(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0001(self): |
10723 | x=self.domain.getX() | x=self.domain.getX() |
10724 | u=Data(0.,(3,),ContinuousFunction(self.domain)) | u=Data(0.,(3,),ContinuousFunction(self.domain)) |
10725 | u[0]=(-7)+5*x[1]-8*x[0] | u[0]=5-7*x[1]+3*x[0] |
10726 | u[1]=3-4*x[1]+x[0] | u[1]=1-8*x[1]+8*x[0] |
10727 | u[2]=7-7*x[1]-7*x[0] | u[2]=7-1*x[1]+6*x[0] |
10728 | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) |
10729 | A_test[0,0,0,1]=4 | A_test[0,0,0,1]=8 |
10730 | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) |
10731 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
10732 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
10733 | y_test=Data(0.,(3,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain)) |
10734 | y_test[0]=n[0]*(20) | y_test[0]=n[0]*((-56)) |
10735 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10736 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
10737 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10738 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10739 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10600 class Test_assemblage_2Do1_Reduced(unitt | Line 10742 class Test_assemblage_2Do1_Reduced(unitt |
10742 | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0010(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0010(self): |
10743 | x=self.domain.getX() | x=self.domain.getX() |
10744 | u=Data(0.,(3,),ContinuousFunction(self.domain)) | u=Data(0.,(3,),ContinuousFunction(self.domain)) |
10745 | u[0]=1+7*x[1]+6*x[0] | u[0]=1+3*x[1]+5*x[0] |
10746 | u[1]=4-2*x[1]+8*x[0] | u[1]=4-6*x[1]+8*x[0] |
10747 | u[2]=8+4*x[1]-8*x[0] | u[2]=(-4)+x[1]+2*x[0] |
10748 | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) |
10749 | A_test[0,0,1,0]=5 | A_test[0,0,1,0]=3 |
10750 | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) |
10751 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
10752 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
10753 | y_test=Data(0.,(3,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain)) |
10754 | y_test[0]=n[0]*(40) | y_test[0]=n[0]*(24) |
10755 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10756 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
10757 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10758 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10759 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10620 class Test_assemblage_2Do1_Reduced(unitt | Line 10762 class Test_assemblage_2Do1_Reduced(unitt |
10762 | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0011(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0011(self): |
10763 | x=self.domain.getX() | x=self.domain.getX() |
10764 | u=Data(0.,(3,),ContinuousFunction(self.domain)) | u=Data(0.,(3,),ContinuousFunction(self.domain)) |
10765 | u[0]=(-2)+3*x[1]-6*x[0] | u[0]=2-6*x[1]-4*x[0] |
10766 | u[1]=4-3*x[1]+8*x[0] | u[1]=6+x[1]-4*x[0] |
10767 | u[2]=(-5)-8*x[1]+3*x[0] | u[2]=4-5*x[1]+7*x[0] |
10768 | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) |
10769 | A_test[0,0,1,1]=2 | A_test[0,0,1,1]=7 |
10770 | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) |
10771 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
10772 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
10773 | y_test=Data(0.,(3,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain)) |
10774 | y_test[0]=n[0]*((-6)) | y_test[0]=n[0]*(7) |
10775 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10776 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
10777 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10778 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10779 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10640 class Test_assemblage_2Do1_Reduced(unitt | Line 10782 class Test_assemblage_2Do1_Reduced(unitt |
10782 | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0020(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0020(self): |
10783 | x=self.domain.getX() | x=self.domain.getX() |
10784 | u=Data(0.,(3,),ContinuousFunction(self.domain)) | u=Data(0.,(3,),ContinuousFunction(self.domain)) |
10785 | u[0]=5+7*x[1]-3*x[0] | u[0]=4-2*x[1]+7*x[0] |
10786 | u[1]=(-6)+4*x[1]-4*x[0] | u[1]=(-7)-6*x[1]+4*x[0] |
10787 | u[2]=3-1*x[1]+5*x[0] | u[2]=(-5)-8*x[1]+x[0] |
10788 | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) | A_test=Data(0.,(3,2,3,2),ReducedFunction(self.domain)) |
10789 | A_test[0,0,2,0]=5 | A_test[0,0,2,0]=3 |
10790 | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) | Y_test=Data(0.,(3,),ContinuousFunction(self.domain)) |
10791 | x_boundary=FunctionOnBoundary(self.domain).getX() | x_boundary=ReducedFunctionOnBoundary(self.domain).getX() |
10792 | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) | n=whereZero(x_boundary[0] ,self.ABS_TOL)*numarray.array([-1., 0.])+whereZero(x_boundary[0]-1.,self.ABS_TOL)*numarray.array([ 1., 0.])+whereZero(x_boundary[1] ,self.ABS_TOL)*numarray.array([ 0.,-1.])+whereZero(x_boundary[1]-1.,self.ABS_TOL)*numarray.array([ 0., 1.]) |
10793 | y_test=Data(0.,(3,),FunctionOnBoundary(self.domain)) | y_test=Data(0.,(3,),ReducedFunctionOnBoundary(self.domain)) |
10794 | y_test[0]=n[0]*(25) | y_test[0]=n[0]*(3) |
10795 | pde=LinearPDE(self.domain) | pde=LinearPDE(self.domain) |
10796 | pde.setValue(A=A_test, Y=Y_test, y=y_test) | pde.setValue(A_reduced=A_test, Y_reduced=Y_test, y_reduced=y_test) |
10797 | r=pde.getResidual(u) | r=pde.getResidual(u) |
10798 | rhs=pde.getRightHandSide() | rhs=pde.getRightHandSide() |
10799 | self.failUnless(Lsup(rhs)>0,"right hand side is zero") | self.failUnless(Lsup(rhs)>0,"right hand side is zero") |
# | Line 10660 class Test_assemblage_2Do1_Reduced(unitt | Line 10802 class Test_assemblage_2Do1_Reduced(unitt |
10802 | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0021(self): | def test_assemblage_2D_solO1_coeffOReduced_NEqu3_A_Const_typeStrong_comp0021(self): |
10803 | x=self.domain.getX() | x=self.domain.getX() |
10804 | u=Data(0.,(3,),ContinuousFunction(self.domain)) | u=Data(0.,(3,),ContinuousFunction(self.domain)) |