I am trying to set the external field of the entire material cell by cell. I think I should be able to use a mask for this but I keep getting an error: "panic: slice not accessible by GPU". Here is the code fore setting the value of the mask and applying it to B_ext:
for x := 0; x < 280; x++{
for y := 0; y < 60; y++{
for z := 0; z < 1; z++{
mask.SetVector(x, y, z, Vector(stripHx[x], 0, stripHz[x]))
}
}
}
B_ext.AddTo(mask)
Any help in getting around this would be appreciated.
I am trying to set the external field of the entire material cell by cell. I think I should be able to use a mask for this but I keep getting an error: "panic: slice not accessible by GPU". Here is the code fore setting the value of the mask and applying it to B_ext:
for x := 0; x < 280; x++{ for y := 0; y < 60; y++{ for z := 0; z < 1; z++{ mask.SetVector(x, y, z, Vector(stripHx[x], 0, stripHz[x])) } } } B_ext.AddTo(mask)
Any help in getting around this would be appreciated.