////////////////////////////////////////////////////// // test for relax() procedure. // relaxing a vortex DW in a wedged track. // The system energy is lower with the DW towards the narrow end (rightwards). // Total energy versus DW position has a single minimum at ~808nm (see result with minimize()) nx := 768; ny := 128; csz := 3e-9; SetCellSize(csz, csz, 5e-9); SetGridSize(nx,ny,1); EdgeSmooth = 8; θ := 3.*pi/180.; setGeom(Universe().sub( YRange( 0,nx*csz).rotZ(-θ).transl(-nx*csz/2, ny*csz/2,0)).sub( YRange(-nx*csz,0).rotZ( θ).transl(-nx*csz/2,-ny*csz/2,0)) ); defRegion(2, XRange(-csz*(nx/2.-1), csz*(nx/2.-1)).Inverse() ); frozenSpins.setRegion(2, 1); TableAddVar(ext_corePos.average()[0],"DW position","m"); TableAdd(E_total); TableAddVar(step,"step",""); TableAdd(maxTorque); Msat = 1e6; Aex = 20e-12; ext_rmSurfaceCharge(2, 1, -1); initialPos:=0; TablePrint("Section 0. Minimize()."); m = VortexWall(1, -1, 1, 1).transl(initialPos*csz,0,0); alpha=.5; DoPrecess= false; steps(100); start=now(); neval0=Neval.get(); Minimize(); print("calc time: ",since(start).seconds(), " #evals: ", Neval.get()-neval0); print("final DW position: ", ext_corePos.average()[0], " maxTorque: ", maxTorque); tableSave(); TablePrint("Section 1. Previous relax() behaviour (