Skip to content

Commit

Permalink
Updating minimiser with abstract methods
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcortesortuno committed Jul 31, 2024
1 parent 6b9931b commit d6406e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions fidimag/common/hubert_minimiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ def minimise(self,
if avGradE < mXgradE_tol:
print(f'Average torque length |mX∇E|/N = {avGradE} negligible. Stopping calculation.')
exitFlag = True
# TODO: add break here?

# Stop while creepCount

Expand Down
6 changes: 3 additions & 3 deletions fidimag/common/minimiser_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import division
from abc import abstractmethod
import numpy as np
import os
import zipfile
Expand Down Expand Up @@ -75,9 +76,8 @@ def run_step_CLIB(self):
"""
pass

def minimise(self, stopping_dm=1e-2, max_steps=2000,
save_data_steps=10, save_m_steps=None, save_vtk_steps=None,
log_steps=1000):
@abstractmethod
def minimise(self):
pass

def relax(self):
Expand Down

0 comments on commit d6406e1

Please sign in to comment.