LutzGross / esys-escript.github.io

Other
29 stars 13 forks source link

copywithMask fails when copying a vector into vector with scalar mask. #47

Open aellery opened 2 years ago

aellery commented 2 years ago

from esys.escript import * from esys.finley import Rectangle

domain=Rectangle(1,1)

v=Vector((1,2), Function(domain)) mask=whereNegative(Function(domain).getX()[0]-0.5) print("v0", str(v0) ) print("v1", str(v1) )

v.copyWithMask(Vector((0.,-1), Function(domain)), mask*[1,1]) print("v0", str(v0)) print("v1", str(v1))

v=Vector((1,2), Function(domain)) v.copyWithMask(Vector((0.,-1), Function(domain)), mask) print("v0", str(v0)) print("v1", str(v1))