Skip to content

Commit 8b004a6

Browse files
committed
Add workshop
0 parents  commit 8b004a6

32 files changed

Lines changed: 70697 additions & 0 deletions

LICENSE

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Copyright 2020, Marijan Beg and Hans Fangohr
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
7+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8+
9+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10+
11+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
PROJECT=workshop
2+
IPYNBPATH=tutorials/*.ipynb
3+
PYTHON?=python3
4+
5+
test-ipynb:
6+
$(PYTHON) -m pytest -v --nbval-lax $(IPYNBPATH)
7+
8+
test-pycodestyle:
9+
$(PYTHON) -m pycodestyle --filename=*.py .
10+
11+
test-all: test-ipynb test-pycodestyle
12+
13+
test-all-travis: test-ipynb test-pycodestyle
14+
15+
travis-build: SHELL:=/bin/bash
16+
travis-build:
17+
docker build -f docker/Dockerfile -t dockertestimage .
18+
docker run -e ci_env -ti -d --name testcontainer dockertestimage
19+
docker exec testcontainer make test-all-travis
20+
docker stop testcontainer
21+
docker rm testcontainer
22+
23+
test-docker:
24+
docker build -f docker/Dockerfile -t dockertestimage .
25+
docker run -ti -d --name testcontainer dockertestimage
26+
docker exec testcontainer find . -name '*.pyc' -delete
27+
docker exec testcontainer make test-all-travis
28+
docker stop testcontainer
29+
docker rm testcontainer

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Workshop: Micromagnetics with Ubermag
2+
Marijan Beg<sup>1,2</sup>, Ondrej Hovorka<sup>1</sup>, and Hans Fangohr<sup>2,1</sup>
3+
4+
<sup>1</sup> *Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, United Kingdom*
5+
<sup>2</sup> *European XFEL GmbH, Holzkoppel 4, 22869 Schenefeld, Germany*
6+
7+
| Description | Badge |
8+
| --- | --- |
9+
| Builds | [![Build Status](https://travis-ci.org/ubermag/workshop.svg?branch=master)](https://travis-ci.org/ubermag/workshop) |
10+
| Binder | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ubermag/workshop/master?urlpath=lab/tree/tutorials/index.ipynb) |
11+
| License | [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) |
12+
| Zoom | [![Zoom_ID 74465485256](https://img.shields.io/badge/Zoom_ID-74465485256-brightgreen.svg)](https://us04web.zoom.us/j/74465485256) |
13+
14+
## About
15+
16+
This repository is a place where all the materials (slides, tutorials, and exercises) used in Ubermag workshops are stored.
17+
18+
1. The slides (as PDF) can be found in `slides` directory. The slides do not have animations in order to make sure the files are of reasonable size and accessible by everybody. If you want the full presentation in Keynote format, please let Marijan Beg know. The slides are going to be extended as we progress through other sessions.
19+
20+
2. Tutorials and exercises as Jupyter notebooks are available in `tutorials` directory. More will be added as we go through the workshop. They are also accessible via Binder.
21+
22+
3. The materials addressing (too) specific questions we did not have time to discuss during live sessions, are going to be available in `extras` directory.
23+
24+
This is a public repository and it can be seen by everybody. If you want to contribute to it, please be careful what data you share.
25+
26+
## Current workshop
27+
28+
The current workshop is divided into 4 sessions:
29+
30+
1. Friday 24 April 2020, 14:00-15:30 (UK time) - The basics of micromagnetics, Jupyter, and Python
31+
2. Wednesday 29 April 2020, 14:00-15:30 (UK time) - Micromagnetics with Ubermag
32+
3. Monday 4 May 2020, 14:00-15:30 (UK time) - Data analysis and visualisation with Ubermag 1
33+
4. Thursday 14 May 2020, 14:00-15:30 (UK time) - Data analysis and visualisation with Ubermag 2
34+
35+
Optional follow-up sessions, depending on the requests and feedback might be organised in the future.
36+
37+
## What to do before the workshop?
38+
39+
1. The workshop will delivered using [Zoom](https://zoom.us). Please install it before the workshop and join the session using this link: https://us04web.zoom.us/j/74465485256. There is no need to create an account with Zoom.
40+
41+
2. To follow the tutorials and exercises, you do not need to install anything on your machine or download (clone) this repository. The tutorials and exercises can be run in the cloud and no files will be created on your machine. Ubermag in the cloud can be accessed using Binder badge in the table above. Starting the cloud service can take a few minutes, so please be patient.
42+
43+
WARNING: The most recent update of Safari browser on MacOS sometimes does not interpret the colours well in 3D interactive plots and we recommend using Google Chrome for Ubermag.
44+
45+
## Support
46+
47+
If you require support, have questions, want to report a bug, or want to suggest an improvement, please raise an issue in [ubermag/help](https://github.com/ubermag/help) repository.
48+
49+
## License
50+
51+
Licensed under the BSD 3-Clause "New" or "Revised" License. For details, please refer to the [LICENSE](LICENSE) file.
52+
53+
## How to cite
54+
55+
If you use Ubermag, please cite it as:
56+
57+
1. M. Beg, R. A. Pepper, and H. Fangohr. User interfaces for computational science: A domain specific language for OOMMF embedded in Python. [*AIP Advances* **7**, 56025 (2017)](http://aip.scitation.org/doi/10.1063/1.4977225).
58+
59+
2. M. Beg, R. A. Pepper, T. Kluyver, and H. Fangohr. ubermag/oommfc: Python interface to OOMMF integrated into Jupyter notebook. Zenodo. DOI: [10.5281/zenodo.3539494](http://doi.org/10.5281/zenodo.3539494) (2020).
60+
61+
## Acknowledgements
62+
63+
Developed as a part of:
64+
65+
- [OpenDreamKit](http://opendreamkit.org/) – Horizon 2020 European Research Infrastructure project (676541)
66+
67+
- EPSRC Programme grant on [Skyrmionics](http://www.skyrmions.ac.uk) (EP/N032128/1).

binder/environment.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: binder-environment
2+
3+
channels:
4+
- conda-forge
5+
6+
dependencies:
7+
- python==3.8
8+
- oommfc==0.8.20

binder/postBuild

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jupyter labextension install @jupyter-widgets/jupyterlab-manager
2+
jupyter labextension install k3d

docker/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubermag/oommf
2+
3+
USER root
4+
5+
RUN apt update -y
6+
RUN apt install -y git python3-pip curl
7+
RUN python3 -m pip install --upgrade pip pytest-cov nbval pycodestyle oommfc
8+
9+
COPY . /usr/local/workshop/
10+
RUN chown -R oommfuser /usr/local/workshop/ # Make sure it is owned by the user.
11+
USER oommfuser
12+
WORKDIR /usr/local/workshop

extras/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Extras
2+
3+
Here we collect the extra resources addressing questions we did not have time to discuss during live sessions.
4+
5+
## Where does the damping term in LLG equation come from?
6+
7+
1. Landau, L. & Lifshits, E. On the theory of the dispersion of magnetic permeability in ferromagnetic bodies. Phys. Zeitsch. Der Sow., 8, 153–169 (1935). https://doi.org/10.1016/B978-0-08-036364-6.50008-9
8+
9+
2. Gilbert, T. L. A phenomenological theory of damping in ferromagnetic materials. IEEE Transactions on Magnetics, 40(6), 3443–3449 (2014). https://doi.org/10.1109/TMAG.2004.836740
10+
11+
## How to do calculations with complex numbers in Python?
12+
13+
The Python library is `cmath`. Please refer to Python documentation: https://docs.python.org/3.8/library/cmath.html
14+
15+
## Further resources
16+
17+
- Python: https://docs.python.org/3/
18+
- Jupyter: https://jupyter.org/documentation

extras/derivations.pdf

13.8 MB
Binary file not shown.

slides/slides.pdf

13.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)