From e53156b7896610fcbf28a550182d8c765d29ff7c Mon Sep 17 00:00:00 2001 From: jan Date: Mon, 4 Jul 2016 23:55:43 -0700 Subject: [PATCH] implement default for solver opetions --- opencl_fdfd/csr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencl_fdfd/csr.py b/opencl_fdfd/csr.py index dd0f13b..82347ed 100644 --- a/opencl_fdfd/csr.py +++ b/opencl_fdfd/csr.py @@ -109,6 +109,9 @@ def cg(a, b, max_iters=10000, err_thresh=1e-6, context=None, queue=None, verbose def cg_solver(omega, dxes, J, epsilon, mu=None, pec=None, pmc=None, adjoint=False, solver_opts=None): + if solver_opts is None: + solver_opts = dict() + b0 = -1j * omega * J A0 = fdfd_tools.operators.e_full(omega, dxes, epsilon=epsilon, mu=mu, pec=pec, pmc=pmc)