--- branches/ein16/synth/d2/obj_ty.py 2016/06/09 20:00:15 3945 +++ branches/ein16/synth/d2/obj_ty.py 2016/06/11 00:39:19 3946 @@ -130,9 +130,6 @@ ty_mat2x2F_d3 = fty(19,"mat2x2field_d3", 3, [2,2], ty_mat2x2T,k_init) ty_ten2x2x2F_d3 = fty(20,"ten2x2x2field_d3", 3, [2,2,2], ty_ten2x2x2T,k_init) - - - # check equal dim def check_dim(fld,b): if(fty.is_Field(b)): @@ -186,13 +183,13 @@ dim1=ty1.dim dim2=ty2.dim if (dim1==0): # tensors - return ty2 + return (True , ty2) elif(dim2==0):# tensors - return ty1 + return (True , ty1) elif(dim1==dim2): - return ty1 + return (True , ty1) else : - raise "neither are fields" + return (False, None) #shape to type def shapeToTy(shapeout, dim): @@ -212,8 +209,8 @@ elif(shapeout==[3,3, 3]): return ty_ten3x3x3F_d2 else: - print "shapeout",shapeout,"dim", dim - raise "unsupported shapeout" + #print "shapeout",shapeout,"dim", dim + raise Exception ("unsupported shapeout", str(shapeout)) elif (dim==3): if (shapeout==[]): return ty_scalarF_d3 @@ -221,6 +218,7 @@ return ty_vec3F_d3 elif(shapeout==[3,3]): return ty_mat3x3F_d3 + elif(shapeout==[3,3, 3]): return ty_ten3x3x3F_d3 elif(shapeout==[2]):
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: elif(shapeout==[3,3, 3]): return ty_ten3x3x3F_d3 elif(shapeout==[2]):