Hello, Is it possible to take a summed slice in generic_assembly. For example comp(Grad(#1).Grad(#1))(:,i,:,i) , the sum on i is over all gradient components, (e.g it will be over 3 components in 3 dimensions). Is it possible to do a sum over just 2 components, like comp(Grad(#1).Grad(#1))(1:2,i,1:2,i) ?
One way is to ofcourse take a slice for 1 and 2, i.e, comp(Grad(#1).Grad(#1))(1,i,1,i) + comp(Grad(#1).Grad(#1))(2,i,2,i), and this works, but this gets messy pretty quickily. -Jehanzeb _______________________________________________ Getfem-users mailing list [email protected] https://mail.gna.org/listinfo/getfem-users
