Skip to content

Commit 3e79892

Browse files
author
davidcorteso
committed
Updated minimiser and SD
1 parent 80c26ac commit 3e79892

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

fidimag/common/minimiser_base.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,11 @@
66
import fidimag.common.constant as const
77
from fidimag.common.vtk import VTK
88

9-
from .driver_base import DriverBase
109

11-
12-
class MinimiserBase(MinimiserBase):
10+
class MinimiserBase(object):
1311
"""
14-
15-
This class is the driver to minimise a system using a Steepest Descent
16-
algorithm
17-
18-
NOTE: We are inheriting from DriverBase, but it would be better if we
19-
create a MinimiserBase class in the future, removing the
20-
methods from the Driver class that are not being used at all
12+
13+
Base class for minimiser class. No dependency of CVODE
2114
2215
"""
2316

fidimag/common/steepest_descent.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
from __future__ import division
22
import numpy as np
33
import fidimag.extensions.common_clib as clib
4-
import fidimag.extensions.clib as atom_clib
54
import fidimag.common.helper as helper
65
import fidimag.common.constant as const
7-
from fidimag.common.vtk import VTK
86

9-
from .driver_base import DriverBase
7+
from .minimiser_base import MinimiserBase
108

119

12-
class SteepestDescent(object):
10+
class SteepestDescent(MinimiserBase):
1311
"""
1412
1513
This class is the driver to minimise a system using an optimised Steepest
@@ -64,7 +62,11 @@ def __init__(self, mesh, spin,
6462
):
6563

6664
# Define
67-
super(SteepestDescent, self).__init__()
65+
super(SteepestDescent, self).__init__(mesh, spin,
66+
magnetisation, magnetisation_inv, field, pins,
67+
interactions,
68+
name,
69+
data_saver)
6870

6971
# ---------------------------------------------------------------------
7072
# Variables defined in this SteepestDescent

0 commit comments

Comments
 (0)