File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -548,8 +548,22 @@ def save_vtks(self):
548548
549549 self .coords .shape = (self .total_image_num , - 1 )
550550
551+ # We use Ms from the simulation assuming that all the
552+ # images are the same
551553 for i in range (self .total_image_num ):
552- self .vtk .save_vtk (spherical2cartesian (self .coords [i ]), step = i , vtkname = 'm' )
554+ # We will try to save for the micromagnetic simulation (Ms)
555+ # or an atomistic simulation (mu_s)
556+ # TODO: maybe this can be done with an: isinstance
557+ try :
558+ self .vtk .save_vtk (spherical2cartesian (self .coords [i ]).reshape (- 1 , 3 ),
559+ self .sim .Ms ,
560+ step = i ,
561+ vtkname = 'm' )
562+ except :
563+ self .vtk .save_vtk (spherical2cartesian (self .coords [i ]).reshape (- 1 , 3 ),
564+ self .sim ._mu_s ,
565+ step = i ,
566+ vtkname = 'm' )
553567
554568 self .coords .shape = (- 1 , )
555569
You can’t perform that action at this time.
0 commit comments