Commit eaf0fd28 authored by Philipp Arras's avatar Philipp Arras
Browse files

Add support for UnstructuredDomains and for DomainTuples

parent 6010c684
......@@ -24,6 +24,7 @@ from scipy.sparse import coo_matrix
from scipy.sparse.linalg import aslinearoperator
from ..compat import *
from import RGSpace
from import UnstructuredDomain
from ..field import Field
from ..sugar import makeDomain
......@@ -49,7 +50,15 @@ class LinearInterpolator(LinearOperator):
ndim = positions.shape[0]
mg = mgrid[(slice(0, 2),)*ndim]
mg = array(list(map(ravel, mg)))
dist = array(self.domain[0].distances).reshape((-1, 1))
dist = []
for dom in self.domain:
if isinstance(dom, UnstructuredDomain):
elif isinstance(dom, RGSpace):
raise TypeError
dist = array(dist).flatten().reshape((-1, 1))
pos = positions/dist
excess = pos-pos.astype(int64)
pos = pos.astype(int64)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment