Hi
I write an effective field using the following code and ensure there are no anomalies at the boundaries(Fig2). However, once I apply the STT drive, after a while the entire structure is destroyed. I believe this might be due to the Masked vector field statement, because if I apply the effective field directly without using the masked statement, the structure driven by STT is not destroyed. However, directly applying the effective field causes anomalies at the boundaries(Fig1). I would like guidance on how to modify my code so that the custom effective field is free from anomalies at the boundaries while also allowing for normal STT driving.

