Skip to content

Commit

Permalink
updating iDMI formula
Browse files Browse the repository at this point in the history
  • Loading branch information
LemurPwned committed Dec 13, 2024
1 parent a3bc83d commit b0392b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,9 @@ on:
- 'setup.py'
- 'setup.cfg'
- 'pyproject.toml'
workflow_dispatch:
inputs:
linux:
type: boolean
required: true
default: true
other-os:
type: boolean
required: true
default: true

jobs:
linux-build:
if: ${{ inputs.linux }}
runs-on: ubuntu-latest
env:
TWINE_USERNAME: __token__
Expand All @@ -50,7 +39,6 @@ jobs:
continue-on-error: false

other-os-build:
if: ${{ inputs.other-os }}
runs-on: ${{ matrix.os }}
env:
TWINE_USERNAME: __token__
Expand Down Expand Up @@ -98,5 +86,5 @@ jobs:
run: |
gh release create "v${{ steps.get_version.outputs.version }}" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} v${{ steps.get_version.outputs.version }}" \
--title="${GITHUB_REPOSITORY#*/} ${{ steps.get_version.outputs.version }}" \
--generate-notes
12 changes: 8 additions & 4 deletions core/junction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,15 @@ template <typename T = double> class Layer {
// dm1/dm1x x m2 = (0, -mz, my)
// dm1/dm1y x m2 = (mz, 0, -mx)
// dm1/dm1z x m2 = (-my, mx, 0)
const CVector<T> dm1crossm2(
c_dot(Dvector, CVector<T>(0, -coupledMag.z, coupledMag.y)),
c_dot(Dvector, CVector<T>(coupledMag.z, 0, -coupledMag.x)),
c_dot(Dvector, CVector<T>(-coupledMag.y, coupledMag.x, 0)));
// E = D z * (m1 x m2) == D m1 (m2 x z)
// dE/dm1 = D m2 x z
const CVector<T> dm1crossm2 = -1.0 * c_cross<T>(Dvector, coupledMag);
return dm1crossm2 / (this->Ms * this->thickness);
// const CVector<T> dm1crossm2(
// c_dot(Dvector, CVector<T>(0, -coupledMag.z, coupledMag.y)),
// c_dot(Dvector, CVector<T>(coupledMag.z, 0, -coupledMag.x)),
// c_dot(Dvector, CVector<T>(-coupledMag.y, coupledMag.x, 0)));
// return dm1crossm2 / (this->Ms * this->thickness);
}

CVector<T> calculateIDMI(T time, const CVector<T> &stepMag,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import Extension, find_namespace_packages, setup
from setuptools.command.build_ext import build_ext

__version__ = "1.6.1"
__version__ = "1.6.2"
"""
As per
https://github.com/pybind/python_example
Expand Down

0 comments on commit b0392b8

Please sign in to comment.