Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong current answers on macOS #117

Open
rpep opened this issue Jun 16, 2018 · 0 comments
Open

Wrong current answers on macOS #117

rpep opened this issue Jun 16, 2018 · 0 comments
Labels

Comments

@rpep
Copy link
Member

rpep commented Jun 16, 2018

Running the test under identical conditions with the latest checked out master branch on my Macbook gives the incorrect answer on the STT calculations.

_________________________________________________________________________________________________________ test_stt_dw _________________________________________________________________________________________________________

    @pytest.mark.slow
    def test_stt_dw():
        # We will crate a mesh with 1000 elements of 2x2x2 nm
        # in the x direction, and 1 along y and z
        # (so we have a 1D system)
        mesh = Mesh(nx=1000, ny=1, nz=1,
                    dx=2, dy=2, dz=2.0,
                    unit_length=1e-9)

        # Relax the initial state. It will save the last state
        # to the m0.npy file
        relax_system(mesh)

        m0_z = load_mz_npy('m0.npy')

        x = np.arange(len(m0_z))
        index_max = np.argmax(np.abs(m0_z))

        assert x[index_max] == 225
        assert np.abs(m0_z[index_max] - 0.705740362679) < 1e-8

        # Excite the system for 1.5 ns
        excite_system(mesh, 1.5, 151)

        m0_z = load_mz_npy('dyn_npys/m_100.npy')
        x = np.arange(len(m0_z))
        # Check that the DW is at the 242th x-position in the 100th snapshot
        print(x[np.argmax(np.abs(m0_z))])
>       assert x[np.argmax(np.abs(m0_z))] == 242
E       assert 972 == 242

../../../Git/fidimag/tests/test_stt_dw.py:161: AssertionError

I noticed this by looking at the current driven Skyrmion notebook; the skyrmion was moving faster than it should have been...

@rpep rpep added the bug label Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant