Skip to content

Commit

Permalink
refactor STTorque
Browse files Browse the repository at this point in the history
  • Loading branch information
barnex committed Dec 6, 2015
1 parent 9dd4c5a commit a236cf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions engine/torque.go
Expand Up @@ -14,9 +14,9 @@ var (
EpsilonPrime ScalarParam
FrozenSpins ScalarParam
FixedLayer VectorParam
Torque vSetter // total torque in T
LLTorque vSetter // Landau-Lifshitz torque/γ0, in T
STTorque vAdder // Spin-transfer torque/γ0, in T
Torque vSetter // total torque in T
LLTorque vSetter // Landau-Lifshitz torque/γ0, in T
STTorque = AsVectorField(AsQuantity(3, "STTorque", "T", AddSTTorque))
J excitation // Polarized electrical current density
MaxTorque *GetScalar
GammaLL float64 = 1.7595e11 // Gyromagnetic ratio of spins, in rad/Ts
Expand All @@ -26,6 +26,8 @@ var (
)

func init() {
Export(STTorque, "Spin-transfer torque/γ0")

Alpha.init("alpha", "", "Landau-Lifshitz damping constant", []derived{&temp_red})
Xi.init("xi", "", "Non-adiabaticity of spin-transfer-torque", nil)
J.init("J", "A/m2", "Electrical current density")
Expand All @@ -37,7 +39,6 @@ func init() {
FrozenSpins.init("frozenspins", "", "Defines spins that should be fixed", nil) // 1 - frozen, 0 - free. TODO: check if it only contains 0/1 values
FixedLayer.init("FixedLayer", "", "Slonczewski fixed layer polarization")
LLTorque.init("LLtorque", "T", "Landau-Lifshitz torque/γ0", SetLLTorque)
STTorque.init("STtorque", "T", "Spin-transfer torque/γ0", AddSTTorque)
Torque.init("torque", "T", "Total torque/γ0", SetTorque)
DeclVar("GammaLL", &GammaLL, "Gyromagnetic ratio in rad/Ts")
DeclVar("DisableZhangLiTorque", &DisableZhangLiTorque, "Disables Zhang-Li torque (default=false)")
Expand Down
2 changes: 1 addition & 1 deletion pre-commit
Expand Up @@ -12,7 +12,7 @@
fail=0;

if (gofmt -w -l */*.go */*/*.go | grep \.go); then exit 1; fi;
make
make || exit 1

#if astyle --indent=tab cuda/*.cu | grep Formatted; then exit 1; fi;

Expand Down

0 comments on commit a236cf5

Please sign in to comment.