Skip to content

Commit

Permalink
Test all three classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
lang-m committed May 11, 2021
1 parent 1571baa commit a34a490
Show file tree
Hide file tree
Showing 7 changed files with 447 additions and 6 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
test-all:
ls -lh examples
tclsh $(OOMMFTCL) boxsi +fg examples/isolated_sk_DMI_D2d.mif -exitondone 1
ls -lh examples
tclsh $(OOMMFTCL) boxsi +fg examples/sk_lattice_DMI_D2d_PBCs.mif -exitondone 1
ls -lh examples
for FILE in `find examples -name "INPUT_*"`; do \
tclsh $(OOMMFTCL) boxsi +fg $$FILE -exitondone 1; \
ls -lh examples; \
done


travis-build:
docker build --no-cache -t dockertestimage .
Expand Down
105 changes: 105 additions & 0 deletions examples/INPUT_isolated_sk_DMI_D2d_x.mif
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# MIF 2.1 ---------------------------------------------------------------------

# Generate an isolated skyrmion with interfacial (C_nv) DMI
#
# Authors: D. Cortes, M. Beg, H.Fangohr (2018)

set PI [expr {4 * atan(1.)}]
set MU0 [expr {4 * $PI * 1e-7}]

# -----------------------------------------------------------------------------
# PdFe on Ir(111) [PRL, 114(17):1-5, 2015]
# This is an interfacial system but the parameters should work similarly for
# the D2d symmetry. Spins only change the sense of rotation
set Ms [expr {1.1e6}]
set A [expr {2e-12}]
set D [expr {3.9e-3}]
set KU [expr {2.5e6}]
set BZ [expr {1.0}]

set XL [expr {2e-9}]
set YL [expr {15e-9}]
set ZL [expr {$YL}]

set xcell [expr {2e-9}]
set ycell [expr {$YL / 20}]
set zcell [expr {$ZL / 20}]

# -----------------------------------------------------------------------------

# BoxAtlas
Specify Oxs_BoxAtlas:atlas [subst {
xrange {0 $XL}
yrange {0 $YL}
zrange {0 $ZL}
name atlas
}]

# RectangularMesh
Specify Oxs_RectangularMesh:mesh [subst {
cellsize {$xcell $ycell $zcell}
atlas Oxs_BoxAtlas:atlas
}]

# UniformExchange
Specify Oxs_UniformExchange [subst {
A $A
}]

# Uniaxial Anisotropy
Specify Oxs_UniaxialAnisotropy:Anisotropy [subst {
axis { 0 0 1 }
K1 $KU
}]

# D_2d DMI
Specify Oxs_DMI_D2d_x [subst {
default_D $D
atlas :atlas
D {
atlas atlas $D
}
}]

Specify Oxs_FixedZeeman:Bfield [subst {
comment {Field values in Tesla; scale to A/m}
multiplier [expr {1 / $MU0}]
field {0.0 0.0 $BZ}
}]

# CGEvolver
Specify Oxs_CGEvolve {}

# MinDriver
Specify Oxs_MinDriver [subst {
evolver Oxs_CGEvolve
stopping_mxHxm 0.01
mesh :mesh
Ms $Ms
m0 { Oxs_ScriptVectorField {
atlas :atlas
script { dot }
norm 1.0
script_args { relpt }
}}

basename isolated_sk_D2d_x
scalar_field_output_format {text %\#.15g}
vector_field_output_format {text %\#.15g}
}]

Destination table mmArchive
Destination mags mmArchive

Schedule DataTable table Stage 1
Schedule Oxs_MinDriver::Magnetization mags Stage 1

# =============================================================================

proc dot { x y z } {
set ynorm [expr {(2 * $y - 1)}]
set znorm [expr {(2 * $z - 1)}]
set radius [expr {sqrt($ynorm * $ynorm + $znorm * $znorm)}]
if {$radius < 0.2} { return [list -1 0 0] }
return [list 1 0 0]
}
105 changes: 105 additions & 0 deletions examples/INPUT_isolated_sk_DMI_D2d_y.mif
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# MIF 2.1 ---------------------------------------------------------------------

# Generate an isolated skyrmion with interfacial (C_nv) DMI
#
# Authors: D. Cortes, M. Beg, H.Fangohr (2018)

set PI [expr {4 * atan(1.)}]
set MU0 [expr {4 * $PI * 1e-7}]

# -----------------------------------------------------------------------------
# PdFe on Ir(111) [PRL, 114(17):1-5, 2015]
# This is an interfacial system but the parameters should work similarly for
# the D2d symmetry. Spins only change the sense of rotation
set Ms [expr {1.1e6}]
set A [expr {2e-12}]
set D [expr {3.9e-3}]
set KU [expr {2.5e6}]
set BZ [expr {1.0}]

set XL [expr {15e-9}]
set YL [expr {2e-9}]
set ZL [expr {$XL}]

set xcell [expr {$XL / 20}]
set ycell [expr {2e-9}]
set zcell [expr {$ZL / 20}]

# -----------------------------------------------------------------------------

# BoxAtlas
Specify Oxs_BoxAtlas:atlas [subst {
xrange {0 $XL}
yrange {0 $YL}
zrange {0 $ZL}
name atlas
}]

# RectangularMesh
Specify Oxs_RectangularMesh:mesh [subst {
cellsize {$xcell $ycell $zcell}
atlas Oxs_BoxAtlas:atlas
}]

# UniformExchange
Specify Oxs_UniformExchange [subst {
A $A
}]

# Uniaxial Anisotropy
Specify Oxs_UniaxialAnisotropy:Anisotropy [subst {
axis { 0 0 1 }
K1 $KU
}]

# D_2d DMI
Specify Oxs_DMI_D2d_y [subst {
default_D $D
atlas :atlas
D {
atlas atlas $D
}
}]

Specify Oxs_FixedZeeman:Bfield [subst {
comment {Field values in Tesla; scale to A/m}
multiplier [expr {1 / $MU0}]
field {0.0 0.0 $BZ}
}]

# CGEvolver
Specify Oxs_CGEvolve {}

# MinDriver
Specify Oxs_MinDriver [subst {
evolver Oxs_CGEvolve
stopping_mxHxm 0.01
mesh :mesh
Ms $Ms
m0 { Oxs_ScriptVectorField {
atlas :atlas
script { dot }
norm 1.0
script_args { relpt }
}}

basename isolated_sk_D2d_y
scalar_field_output_format {text %\#.15g}
vector_field_output_format {text %\#.15g}
}]

Destination table mmArchive
Destination mags mmArchive

Schedule DataTable table Stage 1
Schedule Oxs_MinDriver::Magnetization mags Stage 1

# =============================================================================

proc dot { x y z } {
set xnorm [expr {(2 * $x - 1)}]
set znorm [expr {(2 * $z - 1)}]
set radius [expr {sqrt($xnorm * $xnorm + $znorm * $znorm)}]
if {$radius < 0.2} { return [list 0 -1 0] }
return [list 0 1 0]
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Specify Oxs_MinDriver [subst {
script_args { relpt }
}}

basename isolated_sk_D2d
basename isolated_sk_D2d_z
scalar_field_output_format {text %\#.15g}
vector_field_output_format {text %\#.15g}
}]
Expand Down
115 changes: 115 additions & 0 deletions examples/INPUT_sk_lattice_DMI_D2d_PBCs_x.mif
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# MIF 2.1 ---------------------------------------------------------------------

# Generate a skyrmion lattice in a "unit cell" with Periodic Boundaries
#
# Authors: D. Cortes, M. Beg, H.Fangohr (2018)

set PI [expr {4 * atan(1.)}]
set MU0 [expr {4 * $PI * 1e-7}]

# -----------------------------------------------------------------------------
# PdFe on Ir(111) [PRL, 114(17):1-5, 2015]
# This is an interfacial system but parameters should work similarly for D2d
# symmetry. Spins only change the sense of rotation for the skyrmion
set Ms [expr {1.1e6}]
set A [expr {2e-12}]
set D [expr {3.9e-3}]
set KU [expr {2.5e6}]
set BZ [expr {1.0}]

set XL [expr {2e-9}]
set YL [expr {15e-9}]
set ZL [expr {$YL / sqrt(3)}]

set xcell [expr {2e-9}]
set ycell [expr {$YL / 64}]
set zcell [expr {$ZL / 32}]

# -----------------------------------------------------------------------------

# BoxAtlas
Specify Oxs_BoxAtlas:atlas [subst {
xrange {0 $XL}
yrange {0 $YL}
zrange {0 $ZL}
name atlas
}]

# RectangularMesh
Specify Oxs_PeriodicRectangularMesh:mesh [subst {
cellsize {$xcell $ycell $zcell}
atlas Oxs_BoxAtlas:atlas
periodic "xy"
}]

# UniformExchange
Specify Oxs_UniformExchange [subst {
A $A
}]

# Uniaxial Anisotropy
Specify Oxs_UniaxialAnisotropy:Anisotropy [subst {
axis { 0 0 1 }
K1 $KU
}]

# D_2d DMI
Specify Oxs_DMI_D2d_x [subst {
default_D $D
atlas :atlas
D {
atlas atlas $D
}
}]

Specify Oxs_FixedZeeman:Bfield [subst {
comment {Field values in Tesla; scale to A/m}
multiplier [expr {1 / $MU0}]
field {0.0 0.0 $BZ}
}]

# CGEvolver
Specify Oxs_CGEvolve {}

# MinDriver
Specify Oxs_MinDriver [subst {
evolver Oxs_CGEvolve
stopping_mxHxm 0.01
mesh :mesh
Ms $Ms
m0 { Oxs_ScriptVectorField {
atlas :atlas
script { skX }
norm 1.0
script_args { relpt }
}}

basename skL_D2d_PBCs_x
scalar_field_output_format {text %\#.15g}
vector_field_output_format {text %\#.15g}
}]

Destination table mmArchive
Destination mags mmArchive

Schedule DataTable table Stage 1
Schedule Oxs_MinDriver::Magnetization mags Stage 1

# =============================================================================

proc skX { x y z } {
set ynorm [expr {(2 * $y - 1)}]
set znorm [expr {(2 * $z - 1)}]

foreach ysk [list -1.0 1.0 -1.0 1.0 0.0] zsk [list -1.0 -1.0 1.0 1.0 0.0] {

set yrel [expr {$ynorm - $ysk}]
set zrel [expr {$znorm - $zsk}]
set radius [expr {sqrt($yrel * $yrel + $zrel * $zrel)}]

if {$radius < 0.3} { return [list 0 0 -1] }

}

return [list 0 0 1]
}
Loading

0 comments on commit a34a490

Please sign in to comment.