Skip to content
Snippets Groups Projects
Commit 5ff5a0e1 authored by patavirt's avatar patavirt
Browse files

core: fix attribute casts

parent dcb53855
No related branches found
No related tags found
No related merge requests found
......@@ -35,5 +35,6 @@ test = [
[tool.pytest.ini_options]
filterwarnings = [
'ignore:the imp module is deprecated:DeprecationWarning',
'ignore::DeprecationWarning:usadel1'
'ignore::DeprecationWarning:usadel1',
'ignore::usadel1.nonlinearsolver.BroydenWarning'
]
......@@ -30,16 +30,16 @@ def _action_property(name, freeze=True):
class Core:
def __init__(self, Lx=1, Ly=1, alpha=0, D=1, nx=1, ny=1):
self._Lx = Lx
self._Ly = Ly
self._alpha = alpha
self._D = D
self._Lx = float(Lx)
self._Ly = float(Ly)
self._alpha = complex(alpha)
self._D = complex(D)
self.set_shape(nx, ny)
def set_shape(self, nx=1, ny=1):
self._frozen = False
self._shape = (nx, ny)
self._omega = 0j
self._omega = complex(0)
self._mask = np.zeros((nx, ny), dtype=np.uint8)
self._U = np.zeros((nx, ny, 4, 4, 4), dtype=complex)
self._Omega = np.zeros((nx, ny, 4, 4), dtype=complex)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment