LutzGross / esys-escript.github.io

Other
29 stars 13 forks source link

convertToNumpy does not work for more than 1 data point per elemen #71

Closed LutzGross closed 1 year ago

LutzGross commented 2 years ago

domain=Rectangle(l0=1, l1=1, n0=10, n1=10) u=domain.get(x)[0] g=grad(u) g_np=convertToNump(g) assert g_np.shape == (10104, 2)

but it is g_np.shape == (10*10, 2)

aellery commented 2 years ago

Did you mean x=domain.getX() u=x[0] g=grad(u)

In this example, does g have 400 data points?

AndreaCodd commented 2 years ago

u=domain.getX()[0]

is probably what Lutz meant to write as his second line.

aellery commented 1 year ago

Fixed in the latest commit.