Skip to content

Commit 6b3bebf

Browse files
author
davidcorteso
committed
Scaled atomistic VTK magnetic moments data in units of Bohr magnetons
1 parent c5e7e8e commit 6b3bebf

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

fidimag/atomistic/llg.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,18 @@ def add_monitor_at(self, i, j, k, name='p'):
326326
self.saver.update_entity_order()
327327

328328
def save_vtk(self):
329-
self.vtk.save_vtk(self.spin.reshape(-1, 3), self._mu_s, step=self.step)
329+
"""
330+
Save a VTK file with the magnetisation vector field and magnetic
331+
moments as cell data. Magnetic moments are saved in units of
332+
Bohr magnetons
333+
334+
NOTE: It is recommended to use a *cell to point data* filter in
335+
Paraview or Mayavi to plot the vector field
336+
"""
337+
self.vtk.save_vtk(self.spin.reshape(-1, 3),
338+
self._mu_s / const.mu_B,
339+
step=self.step
340+
)
330341

331342
def save_m(self):
332343
if not os.path.exists('%s_npys' % self.name):

0 commit comments

Comments
 (0)