From 09f27b1ac32dea6424d329c2c253f5c1fdefe2d6 Mon Sep 17 00:00:00 2001
From: Alex Fikl <alexfikl@gmail.com>
Date: Fri, 29 Jun 2018 14:09:03 -0500
Subject: [PATCH] renamed MatrixBlockIndex to MatrixBlockIndexRanges

---
 sumpy/p2p.py           | 4 ++--
 sumpy/qbx.py           | 6 +++---
 sumpy/tools.py         | 6 +++---
 test/test_matrixgen.py | 6 +++---
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/sumpy/p2p.py b/sumpy/p2p.py
index 7e012497..a0e89f24 100644
--- a/sumpy/p2p.py
+++ b/sumpy/p2p.py
@@ -381,8 +381,8 @@ class P2PMatrixBlockGenerator(P2PBase):
 
         :arg targets: target point coordinates.
         :arg sources: source point coordinates.
-        :arg index_set: a :class:`sumpy.tools.MatrixBlockIndex` object used
-            to define the various blocks.
+        :arg index_set: a :class:`sumpy.tools.MatrixBlockIndexRanges` used
+            to define the blocks.
         :return: a tuple of one-dimensional arrays of kernel evaluations at
             target-source pairs described by `index_set`.
         """
diff --git a/sumpy/qbx.py b/sumpy/qbx.py
index dea09e74..a0814e01 100644
--- a/sumpy/qbx.py
+++ b/sumpy/qbx.py
@@ -400,10 +400,10 @@ class LayerPotentialMatrixBlockGenerator(LayerPotentialBase):
         :arg sources: source point coordinates.
         :arg centers: QBX target expansion centers.
         :arg expansion_radii: radii for each expansion center.
-        :arg index_set: a :class:`sumpy.tools.MatrixBlockIndex` object used
-        to define the various blocks.
+        :arg index_set: a :class:`sumpy.tools.MatrixBlockIndexRanges` used
+            to define the blocks.
         :return: a tuple of one-dimensional arrays of kernel evaluations at
-        target-source pairs described by `index_set`.
+            target-source pairs described by `index_set`.
         """
 
         knl = self.get_cached_optimized_kernel()
diff --git a/sumpy/tools.py b/sumpy/tools.py
index 4a5ab86a..469cb5e1 100644
--- a/sumpy/tools.py
+++ b/sumpy/tools.py
@@ -365,7 +365,7 @@ class BlockIndexRanges(object):
         return x[self.block_indices(i)]
 
 
-class MatrixBlockIndex(object):
+class MatrixBlockIndexRanges(object):
     """Keep track of different ways to index into matrix blocks.
 
     .. attribute:: row
@@ -432,7 +432,7 @@ class MatrixBlockIndex(object):
         all :class:`pyopencl.array.Array` instances are replaces by
         :class:`numpy.ndarray` instances.
         """
-        return MatrixBlockIndex(self.cl_context,
+        return MatrixBlockIndexRanges(self.cl_context,
                 row=self.row.get(queue=queue),
                 col=self.col.get(queue=queue))
 
@@ -447,7 +447,7 @@ class MatrixBlockIndex(object):
         if isinstance(self.row.indices, cl.array.Array) or \
                 isinstance(self.col.indices, cl.array.Array):
             raise ValueError("CL `Array`s are not supported."
-                    "Use MatrixBlockIndex.get() and then view into matrices.")
+                    "Use MatrixBlockIndexRanges.get() and then view into matrices.")
 
         irow, icol = self.block_indices(i)
         return x[np.ix_(irow, icol)]
diff --git a/test/test_matrixgen.py b/test/test_matrixgen.py
index e11b6693..2f3aabc3 100644
--- a/test/test_matrixgen.py
+++ b/test/test_matrixgen.py
@@ -30,7 +30,7 @@ import pyopencl as cl
 import pyopencl.array  # noqa
 
 from sumpy.tools import vector_to_device
-from sumpy.tools import MatrixBlockIndex
+from sumpy.tools import MatrixBlockIndexRanges
 
 import pytest
 from pyopencl.tools import (  # noqa
@@ -139,7 +139,7 @@ def test_qbx_direct(ctx_getter, factor, lpot_id):
 
         tgtindices = _build_block_index(queue, n, nblks, factor)
         srcindices = _build_block_index(queue, n, nblks, factor)
-        index_set = MatrixBlockIndex(ctx, tgtindices, srcindices)
+        index_set = MatrixBlockIndexRanges(ctx, tgtindices, srcindices)
 
         extra_kwargs = {}
         if lpot_id == 2:
@@ -211,7 +211,7 @@ def test_p2p_direct(ctx_getter, exclude_self, factor):
 
         tgtindices = _build_block_index(queue, n, nblks, factor)
         srcindices = _build_block_index(queue, n, nblks, factor)
-        index_set = MatrixBlockIndex(ctx, tgtindices, srcindices)
+        index_set = MatrixBlockIndexRanges(ctx, tgtindices, srcindices)
 
         extra_kwargs = {}
         if exclude_self:
-- 
GitLab