Skip to content

Commit

Permalink
Merge pull request #90 from ubermag/update-field-values
Browse files Browse the repository at this point in the history
Faster update of the magnetisation
  • Loading branch information
lang-m authored Mar 15, 2022
2 parents e0f707e + 0ad109f commit e073cf8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oommfc/drivers/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def drive(self, system, /, dirname='.', append=True, fixed_subregions=None,
# test_sample-Oxs_TimeDriver-Magnetization-01-0000008.omf
omffiles = glob.iglob(f'{system.name}*.omf')
lastomffile = sorted(omffiles)[-1]
system.m.value = df.Field.fromfile(lastomffile)
# pass Field.array instead of Field for better performance
system.m.value = df.Field.fromfile(lastomffile).array

# Update system's datatable.
if isinstance(self, oc.TimeDriver):
Expand Down

0 comments on commit e073cf8

Please sign in to comment.