Skip to content

Commit c668d48

Browse files
author
davidcorteso
committed
Changes to scale in micro sim class
1 parent fc1539e commit c668d48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fidimag/micro/sim.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ def __init__(self, mesh, name='unnamed', driver='llg',
8585
)
8686

8787
# For the SD in the micromagnetic class we need to scale the mxmxH factor
88-
# by 1/Ms (need more tests)
89-
if driver == 'steepest_descent':
90-
self.driver.scale = np.repeat(self._Ms_inv, 3)
88+
# by mu0 to leave the field in Tesla units
89+
if self.driver.__class__.__name__ == 'SteepestDescent':
90+
self.driver.scale = fidimag.common.constant.mu_0
9191

9292
# Some references to functions in the corresponding driver classes
9393
# that can be accessed through the Simulation class

0 commit comments

Comments
 (0)