Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rpep committed May 24, 2020
2 parents 1b06332 + 72c536f commit 78c18b6
Show file tree
Hide file tree
Showing 38 changed files with 10,336 additions and 50 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*.pdf
*.tmp
*.so
*.o

local/
*~
*.bak
Expand Down Expand Up @@ -51,3 +53,4 @@ test-reports

*.npz
*.npy
fmm.cpp
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- docker

before_install:
- docker build -t fidimag -f ./docker/travis/Dockerfile .
- travis_wait 90 docker build -t fidimag -f ./docker/travis/Dockerfile .
- docker run -ti -d --name fidimag fidimag

jobs:
Expand Down
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
FROM ubuntu:16.04
FROM ubuntu:18.04

RUN apt -y update
RUN apt install -y git python3 python3-pip gcc psutils cmake wget make
# Avoid user interaction dialog
ENV DEBIAN_FRONTEND=noninteractive

RUN apt -y update
# Binder fails with Cython from pip -> use apt cython3
RUN apt install -y git python3 python3-pip gcc psutils cmake wget make cython3
RUN apt install -y gfortran libblas-dev liblapack-dev python3-tk sudo fonts-lato
RUN pip3 install cython matplotlib pytest scipy psutil pyvtk ipywidgets -U
RUN pip3 install pip -U
RUN pip3 install matplotlib pytest scipy psutil pyvtk ipywidgets -U
RUN pip3 install --no-cache-dir notebook

RUN ln -s /usr/bin/python3 /usr/bin/python
Expand All @@ -12,7 +17,7 @@ WORKDIR /usr/local
RUN git clone https://github.com/computationalmodelling/fidimag.git
WORKDIR /usr/local/fidimag
# Work with stable release
RUN git checkout tags/v2.9
RUN git checkout tags/v3.0a2
# Install CVODE and FFTW libraries
WORKDIR /usr/local/fidimag/bin
RUN bash install-fftw.sh
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PYTEST = ${PYTHON} -m pytest
#####################

build:
${PYTHON} setup.py build_ext --inplace
${PYTHON} setup.py build_ext --inplace -j2

clean:
rm -rf ${EXTENSIONS_DIR}/*
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ Bisotti, M.-A., Cortés-Ortuño, D., Pepper, R., Wang, W., Beg, M., Kluyver, T.

The following publications, in reverse chronological order, have used or cited Fidimag:

[17] [Diameter-independent skyrmion Hall angle in the plastic flow regime observed in chiral magnetic
multilayers](https://arxiv.org/pdf/1908.04239.pdf)
K. Zeissler, S. Finizio, C. Barton, A. Huxtable, J. Massey, J. Raabe, A. V. Sadovnikov, S. A. Nikitov, R. Brearton, T. Hesjedal, G. van der Laan, M. C. Rosamond, E. H. Linfield, G. Burnell, C. H. Marrows, arXiv:1908.04239 (2019)

[16] [Efficient computation of demagnetising fields for magnetic multilayers using multilayered convolution](https://arxiv.org/abs/1906.00813) S. Lepadatu, arXiv:1906.00813 (2019)

[15] [Micromagnetics and spintronics: models and numerical methods](https://link.springer.com/article/10.1140%2Fepjb%2Fe2019-90599-6) C. Abert, Eur. Phys. J. B (2019) 92: 120

[14] [Nanoscale magnetic skyrmions and target states in confined geometries](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.99.214408), D. Cortés-Ortuño, N. Romming, M. Beg, K. von Bergmann, A. Kubetzka, O. Hovorka, H. Fangohr, R. Wiesendanger, Physical Review B 99, 214408 (2019)
Expand Down
2 changes: 1 addition & 1 deletion bin/install-fftw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ download_and_install() {
./configure --quiet --enable-shared --enable-openmp --enable-sse2 --enable-avx --prefix=${LIBS_DIR}
echo "Compiling and installing "${1}"."
{
make
make -j2
make install
} > /dev/null
echo "Done."
Expand Down
2 changes: 1 addition & 1 deletion bin/install-sundials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ download_and_cmake_install() {

echo "Compiling and installing "${1}"."
{
make
make -j2
make install
} > /dev/null

Expand Down
2 changes: 1 addition & 1 deletion docker/travis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:18.04

# To build this image `docker build -t fidimag .`
# Then you can drop into a live bash shell with `docker run -it fidimag`.
Expand Down
8 changes: 4 additions & 4 deletions examples/micromagnetic/skyrmion/Ku_H/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import matplotlib.pyplot as plt

import numpy as np
from micro import Sim
from common import CuboidMesh
from micro import UniformExchange, Demag, DMI, UniaxialAnisotropy
from micro import Zeeman, TimeZeeman
from fidimag.micro import Sim
from fidimag.common import CuboidMesh
from fidimag.micro import UniformExchange, Demag, DMI, UniaxialAnisotropy
from fidimag.micro import Zeeman, TimeZeeman
from fidimag.common.fileio import DataReader

mu0 = 4 * np.pi * 1e-7
Expand Down
2 changes: 1 addition & 1 deletion fidimag/atomistic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .exchange import UniformExchange, Exchange
from .anisotropy import Anisotropy, CubicAnisotropy
from .zeeman import Zeeman, TimeZeeman
from .demag import Demag
from .demag import Demag, DemagFMM
from .demag_hexagonal import DemagHexagonal
from .hexagonal_mesh import HexagonalMesh
from .demag_full import DemagFull
Expand Down
8 changes: 7 additions & 1 deletion fidimag/atomistic/demag.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import fidimag.extensions.dipolar as clib
import numpy as np
from .energy import Energy
import numpy as np
import fidimag
from fidimag.atomistic.energy import Energy
import fidimag.extensions.fmm as fmm
import time
import sys


class Demag(Energy):
Expand Down Expand Up @@ -41,7 +47,7 @@ def __init__(self, calc_every=0, name='Demag'):

def setup(self, mesh, spin, mu_s, mu_s_inv):
super(Demag, self).setup(mesh, spin, mu_s, mu_s_inv)

# Ryan Pepper 04/04/2019
# We *do not* need to scale by mesh.unit_length**3 here!
# This is because in the base energy class, dx, dy and dz
Expand Down
Loading

0 comments on commit 78c18b6

Please sign in to comment.