Skip to content

Commit

Permalink
Rename: interior_trace_pair -> local_interior_trace_pair
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgibson authored and inducer committed Dec 1, 2021
1 parent f5638a3 commit 95561d0
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions grudge/trace_pair.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
Interior and cross-rank trace functions
---------------------------------------
.. autofunction:: interior_trace_pair
.. autofunction:: interior_trace_pairs
.. autofunction:: local_interior_trace_pair
.. autofunction:: cross_rank_trace_pairs
"""

Expand Down Expand Up @@ -215,7 +215,7 @@ def bv_trace_pair(

# {{{ Interior trace pairs

def interior_trace_pair(dcoll: DiscretizationCollection, vec) -> TracePair:
def local_interior_trace_pair(dcoll: DiscretizationCollection, vec) -> TracePair:
r"""Return a :class:`TracePair` for the interior faces of
*dcoll* with a discretization tag specified by *discr_tag*.
This does not include interior faces on different MPI ranks.
Expand Down Expand Up @@ -247,21 +247,31 @@ def get_opposite_face(el):
return TracePair("int_faces", interior=i, exterior=e)


def interior_trace_pair(dcoll: DiscretizationCollection, vec) -> TracePair:
from warnings import warn
warn("`grudge.op.interior_trace_pair` is deprecated and will be dropped "
"in version 2022.x. Use `local_interior_trace_pair` "
"instead, or `interior_trace_pairs` which also includes contributions "
"from different MPI ranks.",
DeprecationWarning, stacklevel=2)
return local_interior_trace_pair(dcoll, vec)


def interior_trace_pairs(dcoll: DiscretizationCollection, vec) -> list:
r"""Return a :class:`list` of :class:`TracePair` objects
defined on the interior faces of *dcoll* and any faces connected to a
parallel boundary.
Note that :func:`interior_trace_pair` provides the rank-local contributions
if those are needed in isolation.
Note that :func:`local_interior_trace_pair` provides the rank-local contributions
if those are needed in isolation. Similarly, :func:`cross_rank_trace_pairs`
provides only the trace pairs defined on cross-rank boundaries.
:arg vec: a :class:`~meshmode.dof_array.DOFArray` or object array of
:class:`~meshmode.dof_array.DOFArray`\ s.
:returns: a :class:`list` of :class:`TracePair` objects.
"""
return (
[interior_trace_pair(dcoll, vec)]
+ cross_rank_trace_pairs(dcoll, vec)
[local_interior_trace_pair(dcoll, vec)] + cross_rank_trace_pairs(dcoll, vec)
)

# }}}
Expand Down

0 comments on commit 95561d0

Please sign in to comment.