From 66c30e6eab9b862f8803e6f6ec182f709b4e0cae Mon Sep 17 00:00:00 2001 From: jan Date: Fri, 3 Jul 2020 13:48:24 -0700 Subject: [PATCH] move from fdfd_tools to meanas --- README.md | 4 ++-- opencl_fdfd/__init__.py | 2 +- opencl_fdfd/main.py | 8 ++++---- setup.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index afca8ac..56a5f76 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,11 @@ generalization to multiple GPUs should be pretty straightforward ## Installation **Dependencies:** -* python 3 (written and tested with 3.5) +* python 3 (written and tested with 3.7) * numpy * pyopencl * jinja2 -* [fdfd_tools](https://mpxd.net/code/jan/fdfd_tools) (>=0.2) +* [meanas](https://mpxd.net/code/jan/meanas) (>=0.5) Install with pip, via git: diff --git a/opencl_fdfd/__init__.py b/opencl_fdfd/__init__.py index a1d54c6..927f5e2 100644 --- a/opencl_fdfd/__init__.py +++ b/opencl_fdfd/__init__.py @@ -31,7 +31,7 @@ Dependencies: - - fdfd_tools ( https://mpxd.net/code/jan/fdfd_tools ) + - meanas ( https://mpxd.net/code/jan/meanas ) - numpy - pyopencl - jinja2 diff --git a/opencl_fdfd/main.py b/opencl_fdfd/main.py index a48aec0..95cd37a 100644 --- a/opencl_fdfd/main.py +++ b/opencl_fdfd/main.py @@ -15,7 +15,7 @@ from numpy.linalg import norm import pyopencl import pyopencl.array -import fdfd_tools.operators +import meanas.fdfd.operators from . import ops @@ -43,7 +43,7 @@ def cg_solver(omega: complex, OpenCL. All ndarray arguments should be 1D arrays. To linearize a list of 3 3D ndarrays, - either use fdfd_tools.vec() or numpy: + either use meanas.vec() or numpy: f_1D = numpy.hstack(tuple((fi.flatten(order='F') for fi in [f_x, f_y, f_z]))) :param omega: Complex frequency to solve at. @@ -104,7 +104,7 @@ def cg_solver(omega: complex, if mu is not None: mu = numpy.conj(mu) - L, R = fdfd_tools.operators.e_full_preconditioners(dxes) + L, R = meanas.fdfd.operators.e_full_preconditioners(dxes) if adjoint: b_preconditioned = R @ b @@ -221,7 +221,7 @@ def cg_solver(omega: complex, logger.debug('final error {}'.format(errs[-1])) logger.debug('overhead {} sec'.format(start_time2 - start_time)) - A0 = fdfd_tools.operators.e_full(omega, dxes, epsilon, mu).tocsr() + A0 = meanas.fdfd.operators.e_full(omega, dxes, epsilon, mu).tocsr() if adjoint: # Remember we conjugated all the contents of A earlier A0 = A0.T diff --git a/setup.py b/setup.py index 1cbf8f0..b037fd1 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup(name='opencl_fdfd', 'numpy', 'pyopencl', 'jinja2', - 'fdfd_tools>=0.3', + 'meanas>=0.5', ], extras_require={ },