From 86f08ababe29c3b91b4de88158045183ca35230d Mon Sep 17 00:00:00 2001
From: Thomas Gibson <gibsonthomas1120@hotmail.com>
Date: Wed, 26 May 2021 09:38:31 -0500
Subject: [PATCH] Rename: 'get_distributed_boundary_swap_connection' ->
 'distributed_boundary_swap_connection'

---
 grudge/discretization.py   | 8 ++++++++
 grudge/execution.py        | 2 +-
 grudge/models/advection.py | 2 +-
 grudge/trace_pair.py       | 2 +-
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/grudge/discretization.py b/grudge/discretization.py
index 2a272af1..47b425e6 100644
--- a/grudge/discretization.py
+++ b/grudge/discretization.py
@@ -216,6 +216,14 @@ class DiscretizationCollection:
         return boundary_connections
 
     def get_distributed_boundary_swap_connection(self, dd):
+        warn("`DiscretizationCollection.get_distributed_boundary_swap_connection` "
+             "is deprecated and will go away in 2022. Use "
+             "`DiscretizationCollection.distributed_boundary_swap_connection` "
+             "instead.",
+             DeprecationWarning, stacklevel=2)
+        return self.distributed_boundary_swap_connection(dd)
+
+    def distributed_boundary_swap_connection(self, dd):
         """Provides a mapping from the base volume discretization
         to the exterior boundary restriction on a parallel boundary
         partition described by *dd*. This connection is used to
diff --git a/grudge/execution.py b/grudge/execution.py
index eeba079d..73b5e894 100644
--- a/grudge/execution.py
+++ b/grudge/execution.py
@@ -318,7 +318,7 @@ class ExecutionMapper(mappers.Evaluator,
 
     def map_opposite_partition_face_swap(self, op, field_expr):
         assert op.dd_in == op.dd_out
-        bdry_conn = self.dcoll.get_distributed_boundary_swap_connection(op.dd_in)
+        bdry_conn = self.dcoll.distributed_boundary_swap_connection(op.dd_in)
         remote_bdry_vec = self.rec(field_expr)  # swapped by RankDataSwapAssign
         return bdry_conn(remote_bdry_vec)
 
diff --git a/grudge/models/advection.py b/grudge/models/advection.py
index 98ff40ac..37ed429b 100644
--- a/grudge/models/advection.py
+++ b/grudge/models/advection.py
@@ -292,7 +292,7 @@ def v_dot_n_tpair(actx, dcoll, velocity, trace_dd):
     if trace_dd.domain_tag is FACE_RESTR_INTERIOR:
         e = dcoll.opposite_face_connection()(i)
     elif isinstance(trace_dd.domain_tag, DTAG_BOUNDARY):
-        e = dcoll.get_distributed_boundary_swap_connection(trace_dd)(i)
+        e = dcoll.distributed_boundary_swap_connection(trace_dd)(i)
     else:
         raise ValueError("Unrecognized domain tag: %s" % trace_dd.domain_tag)
 
diff --git a/grudge/trace_pair.py b/grudge/trace_pair.py
index 64ea2109..ad2e9c81 100644
--- a/grudge/trace_pair.py
+++ b/grudge/trace_pair.py
@@ -298,7 +298,7 @@ class _RankBoundaryCommunication:
             actx.from_numpy(self.remote_data_host)
         )
 
-        bdry_conn = self.dcoll.get_distributed_boundary_swap_connection(
+        bdry_conn = self.dcoll.distributed_boundary_swap_connection(
             dof_desc.as_dofdesc(dof_desc.DTAG_BOUNDARY(self.remote_btag))
         )
         swapped_remote_dof_array = bdry_conn(remote_dof_array)
-- 
GitLab