-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Dear @ww1g11 ,
I found an issue about creating a random state by usingcreate_sim(mesh) and Sim(mesh;driver = "SD"), respectively.
if I use Sim(mesh;driver = "SD"), like this:
mesh = FDMesh(dx=2e-9, dy=2e-9, dz=2e-9, nx=256, ny=256, nz=53, pbc="xy")
sim = Sim(mesh; driver="SD", name="relax")
init_m0_random(sim)
save_ovf(sim, "save256x256x53_random", type = Float64)
println("output finished")The out put ovf file save256x256x53_random.ovf is not correct, it produced a ferromagnetic state not random state.
However, if I use create_sim(mesh) function, like this:
mesh = FDMesh(dx=2e-9, dy=2e-9, dz=2e-9, nx=256, ny=256, nz=53, pbc="xy")
sim = create_sim(mesh)
init_m0_random(sim)
save_ovf(sim, "save256x256x53_random", type = Float64)
println("output finished")The output ovf file is correct, a random state created. Similarly, I define a region for example:
#region 1
mesh = FDMesh(dx=2e-9, dy=2e-9, dz=2e-9, nx=256, ny=256, nz=53, pbc="xy")
#sim = Sim(mesh; driver="SD", name="relax") commend this line
sim = create_sim(mesh)
function initial_layer(i,j,k, dx, dy, dz)
if k>3&&k<53-3
return (0,0,1)
else
return (0,0,-1)
end
end
init_m0(sim, damage_layer_initial) # Initialize magnetization
save_ovf(sim, "save256x256x53_initial", type = Float64)If I use create_sim(mesh) to create this region, this region can be defined correctly. But Sim(mesh;driver = "SD") did not work well.
So, I hope to know what's the different between create_sim() and Sim().
I would be very appreciate for any help you provide :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels