move from fdfd_tools to meanas

This commit is contained in:
jan 2020-07-03 13:48:24 -07:00
parent 2130b015fd
commit 66c30e6eab
4 changed files with 8 additions and 8 deletions

View File

@ -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:

View File

@ -31,7 +31,7 @@
Dependencies:
- fdfd_tools ( https://mpxd.net/code/jan/fdfd_tools )
- meanas ( https://mpxd.net/code/jan/meanas )
- numpy
- pyopencl
- jinja2

View File

@ -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

View File

@ -22,7 +22,7 @@ setup(name='opencl_fdfd',
'numpy',
'pyopencl',
'jinja2',
'fdfd_tools>=0.3',
'meanas>=0.5',
],
extras_require={
},