Verbosity levels#
When calling OOMMF different numbers of information can be shown. We demonstrate the different options for the example macrospin defined in micromagneticmodel
[1]:
import micromagneticmodel as mm
import oommfc as oc
[2]:
system = mm.examples.macrospin()
[3]:
md = oc.MinDriver()
td = oc.TimeDriver()
One summary line (default)#
The default value verbose=1
prints one summary line to the screen.
[4]:
md.drive(system)
Running OOMMF (ExeOOMMFRunner)[2023/10/18 12:41]... (0.4 s)
[5]:
td.drive(system, t=1e-9, n=10)
Running OOMMF (ExeOOMMFRunner)[2023/10/18 12:41]... (0.3 s)
Silent run#
By setting verbose=0
the calls to OOMMF do not produce any output.
[6]:
md.drive(system, verbose=0)
[7]:
td.drive(system, t=1e-9, n=10, verbose=0)
Progress bar (TimeDriver
only)#
By passing verbose=2
we can get a status bar showing the progress of a running simulations. This feature is only available for the TimeDriver
and solely relies on the total number of steps n
and the number of files already written to disk. Therefore, the information only gives a rough indication of the progress. The progress bar is not persistent accross notebook sessions. Therefore, an additional summary line is printed at the end of the simulation.
[8]:
td.drive(system, t=100e-9, n=50, verbose=2)
Running OOMMF (ExeOOMMFRunner)[2023/10/18 12:41] took 4.1 s
When used with the MinDriver
the standard one-line summary is shown instead.
[9]:
md.drive(system, verbose=2)
Running OOMMF (ExeOOMMFRunner)[2023/10/18 12:42]... (0.2 s)
[10]:
# cleanup
oc.delete(system)