Skip to content

Commit

Permalink
Added in-plane radial magnetization profile
Browse files Browse the repository at this point in the history
  • Loading branch information
kkingstoun committed Oct 24, 2023
1 parent 1949562 commit 47a18f6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions engine/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func init() {
DeclFunc("Uniform", Uniform, "Uniform magnetization in given direction")
DeclFunc("Vortex", Vortex, "Vortex magnetization with given circulation and core polarization")
DeclFunc("Antivortex", AntiVortex, "Antivortex magnetization with given circulation and core polarization")
DeclFunc("Radial", Radial, "Radial magnetization with given charge and core polarization")
DeclFunc("NeelSkyrmion", NeelSkyrmion, "Néél skyrmion magnetization with given charge and core polarization")
DeclFunc("BlochSkyrmion", BlochSkyrmion, "Bloch skyrmion magnetization with given chirality and core polarization")
DeclFunc("TwoDomain", TwoDomain, "Twodomain magnetization with with given magnetization in left domain, wall, and right domain")
Expand Down Expand Up @@ -111,6 +112,17 @@ func AntiVortex(circ, pol int) Config {
}
}

func Radial(charge, pol int) Config {
return func(x, y, z float64) data.Vector {
r2 := x*x + y*y
r := math.Sqrt(r2)
mz := 0.0
mx := (x * float64(charge) / r)
my := (y * float64(charge) / r)
return noNaN(data.Vector{mx, my, mz}, pol)
}
}

// Make a vortex wall configuration.
func VortexWall(mleft, mright float64, circ, pol int) Config {
h := GetMesh().WorldSize()[Y]
Expand Down

0 comments on commit 47a18f6

Please sign in to comment.