func (u *MMEFUpdater) Update() { // Account for msat0T0 multiplier in both relaxation tensor and magnetization vector u.Qmm.Multiplier()[0] = u.msat0T0.Multiplier()[0] u.Qmm.Multiplier()[0] *= u.msat0T0.Multiplier()[0] // Account for mu0 u.Qmm.Multiplier()[0] *= Mu0 // Account for multiplier in R that should always be equal to the gyromagnetic ratio. Moreover the R is reduced to [1/s] units u.Qmm.Multiplier()[0] *= u.R.Multiplier()[0] gpu.Dot(u.Qmm.Array(), u.m.Array(), u.R.Array()) // Finally, do Qmm = Qmm * msat0T0(r)^2 to account spatial properties of msat0T0 that are hidden in the definitions of the relaxation constants and magnertization vector if !u.msat0T0.Array().IsNil() { gpu.Mul(u.Qmm.Array(), u.Qmm.Array(), u.msat0T0.Array()) gpu.Mul(u.Qmm.Array(), u.Qmm.Array(), u.msat0T0.Array()) } }
func (u *DFUpdater) Update() { // Account for msat0T0 multiplier, because it is a mask u.Qmagn.Multiplier()[0] = u.msat0T0.Multiplier()[0] // Account for - 2.0 * 0.5 * mu0 u.Qmagn.Multiplier()[0] *= -Mu0 // Account for multiplier in H_eff u.Qmagn.Multiplier()[0] *= u.Heff.Multiplier()[0] // Account for multiplier in R that should always be equal to the gyromagnetic ratio. Moreover the R is reduced to [1/s] units u.Qmagn.Multiplier()[0] *= u.R.Multiplier()[0] gpu.Dot(u.Qmagn.Array(), u.Heff.Array(), u.R.Array()) // Finally. do Qmag = Qmag * msat0T0(r) to account spatial properties of msat0T0 that are hidden in the definition of the relaxation constants if !u.msat0T0.Array().IsNil() { gpu.Mul(u.Qmagn.Array(), u.Qmagn.Array(), u.msat0T0.Array()) } }