Skip to content

Commit 95ecef7

Browse files
committed
Add a changelog to track changes between versions
1 parent cead510 commit 95ecef7

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

CHANGELOG.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
Version 3.0 Alpha
2+
------------------
3+
* Changes to the helper functions init_scalar and init_vector (fidimag/common/helper.py)
4+
which allow users to pass additional parameters. These are then used within the sim
5+
classes to allow
6+
7+
For example:
8+
9+
```
10+
11+
mesh = CuboidMesh(nx=10, ny=1, nz=1, unit_length=1e-9)
12+
sim = Sim(mesh, Ms)
13+
14+
def init_domain_wall(pos, domain_centre)
15+
x, y, z = pos
16+
17+
if x < domain_centre:
18+
return (0, 0, 1)
19+
20+
else:
21+
return (0, 0, -1)
22+
23+
# Place a domain wall at 5nm
24+
sim.set_m(init_domain_wall, 5)
25+
# Place a domain wall at 3nm
26+
sim.set_m(init_domain_wall, 3)
27+
28+
```
29+
30+
* Setting currents is now more general, and is standardised across the simulation types.
31+
This allows us to use more general functions for setting the current.
32+
Previously, the current function was set as:
33+
```
34+
sim(mesh, driver='llg_stt')
35+
sim.driver.jx = 1e14 # A / m^2
36+
sim.driver.update_j_fun = lambda t: np.sin(t)
37+
```
38+
with the actual current used being multiplicative:
39+
40+
$ jx * sin(t) $
41+
42+
For the current-perpendicular to the plane STT ('llg_stt_cpp') driver
43+
we would now change this to
44+
45+
```
46+
sim.driver(mesh, driver='llg_stt_cpp')
47+
sim.driver.j_function = lambda t: 1e14 * np.sin(t)
48+
```
49+
and for the standard STT driver:
50+
51+
```
52+
sim.drive(mesh, driver='llg_stt')
53+
sim.driver.jz_function = lambda t: 1e14 * np.sin(t)
54+
# Can also set:
55+
# sim.driver.jx_function = ...
56+
# sim.driver.jy_function = ...
57+
58+
* Similarly, the TimeZeeman interaction is also no longer multiplicative;
59+
you can have an arbitrary function of the form:
60+
61+
def time_function(pos, t):
62+
x, y, z = pos
63+
# some calculation of Bx(pos, t), By(pos, t), Bz(pos, t)
64+
return (Bx, By, Bz)
65+
zee = TimeZeeman(np.array([0, 0, 0]), time_function)
66+
sim.add(zee)
67+
68+
* You can now remove energy classes from the simulation.
69+
70+
This can be useful in cases where you have an interaction
71+
but no longer need to calculate it because the simulation has
72+
reached a certain point, e.g. an applied field has been turned off.
73+
74+
In the data table, the entries corresponding to a given interaction
75+
will be zero everywhere once the interaction is removed.
76+
77+
78+
For example:
79+
80+
```
81+
sim.add(Zeeman((0, 0, B), name='Zeeman'))
82+
83+
sim.run_until(1e-9)
84+
sim.remove('Zeeman')
85+
```

0 commit comments

Comments
 (0)