Skip to content

Commit

Permalink
Merge pull request #82 from ubermag/fix_relax_driver
Browse files Browse the repository at this point in the history
Damping term not required for RelaxDriver
  • Loading branch information
samjrholt authored Mar 1, 2024
2 parents 63d5872 + d8749a6 commit faa8337
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mumax3c/scripts/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ def driver_script(driver, system, compute=None, ovf_format="bin4", **kwargs):
mx3 += "tablesave()\n\n"

if isinstance(driver, mc.RelaxDriver):
if not system.dynamics.get(type=mm.Damping):
raise ValueError("A damping term is needed.")
alpha = system.dynamics.get(type=mm.Damping)[0].alpha
mx3 += f"alpha = {alpha}\n"
if system.dynamics.get(type=mm.Damping):
alpha = system.dynamics.get(type=mm.Damping)[0].alpha
mx3 += f"alpha = {alpha}\n"

for attr, value in driver:
if attr != "evolver":
Expand Down

0 comments on commit faa8337

Please sign in to comment.