EvalTo method for magnetic parameters
Issue details
hello! May I ask what is the difference in the required Slice for the EvalTo method between B-ext and alpha? Why can Slice constructed with newVectorMask run normally for B_ext, but not for alpha? How to construct Slice with magnetic parameters?
For example: mask := newVectorMask(Nx, Ny, 1) for i:=0; i<Nx; i++{ for j:=0; j<Ny; j++{ r := index2coord(i, j, 0) x := r.X() y := r.Y() Bz := exp(-pow((x-500e-9)/100e-9, 2)) * exp(-pow(y/250e-9, 2)) mask.setVector(i, j, 0, vector(0, 0, Bz)) } } B_ext.EvalTo(mask) The above code can run normally
However, mask := newVectorMask(Nx, Ny, 1) for i:=0; i<Nx; i++{ for j:=0; j<Ny; j++{ r := index2coord(i, j, 0) x := r.X() y := r.Y() Bz := exp(-pow((x-500e-9)/100e-9, 2)) * exp(-pow(y/250e-9, 2)) mask.SetScalar(i, j, 0, 0.1) } } alpha.EvalTo(mask) panic: slice not accessible by GPU