Download OOMMF User's Guide
Transcript
proc Threshold { vx vy vz } {
set magsq [expr {$vx*$vx+$vy*$vy+$vz*$vz}]
if {$magsq>0} {return 8e5}
return 0.0
}
Specify Oxs_ScriptScalarField:Ms {
vector_fields :rot
script Threshold
script_args vectors
}
Specify Oxs_TimeDriver {
m0 :rot
Ms :Ms
stopping_dm_dt 0.01
evolver :evolve
mesh :mesh
}
The base field here is given by the Oxs ScriptVectorField:trap object, which produces a vector field having a trapezoidal shape with the non-zero vectors pointing parallel to the y-axis. The :orient and :rot transformations rotate the shape and the vectors counterclockwise 90◦ . Additionally, the offset option in :orient translates the
shape 20 nm towards the left. The original and transformed fields are illustrated below.
Original field
Example: sample-vecrotate.mif.
Rotated field
Oxs MaskVectorField: Multiplies a vector field pointwise by a scalar vector field (the
mask) to produce a new vector field. The Specify block has the form:
Specify Oxs MaskVectorField:name {
99