Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-volume extras #246

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b3de25e
use partition-ID-enabled meshmode
majosm Mar 18, 2022
ea570ee
temporarily change meshmode branch
majosm Mar 21, 2022
7cc98f6
fix docs
majosm Mar 22, 2022
7ea9d73
Merge remote-tracking branch 'origin/multi-volume' into multi-volume
majosm Apr 12, 2022
e705304
Merge remote-tracking branch 'origin/multi-volume' into multi-volume
majosm May 2, 2022
c1b68c7
Merge remote-tracking branch 'origin/multi-volume' into multi-volume
majosm May 23, 2022
d072923
Merge remote-tracking branch 'origin/multi-volume' into multi-volume
majosm Jun 21, 2022
fe54464
Merge remote-tracking branch 'origin/multi-volume' into multi-volume
majosm Jun 30, 2022
09bac09
promote to part ID instead of using part ID helper
majosm Jun 29, 2022
c46a6b5
clarify part vs. partition terminology
majosm Jun 29, 2022
06ff8f6
account for explicit part_id attribute in InterPartAdjacencyGroup
majosm Jun 29, 2022
d7cd9db
Merge remote-tracking branch 'origin/multi-volume' into multi-volume
majosm Jul 1, 2022
4743538
Merge remote-tracking branch 'origin/multi-volume' into multi-volume
majosm Jul 3, 2022
49d627c
use dataclass instead of tuple for PartID
majosm Jul 4, 2022
b2219d8
move PartID conversion setup stuff into _normalize_mesh_part_ids
majosm Jul 4, 2022
a05c626
reset requirements.txt
majosm Jul 4, 2022
fb8a34b
accept general integral types as MPI ranks
majosm Jul 4, 2022
6af8108
Merge remote-tracking branch 'origin/multi-volume' into multi-volume
majosm Aug 9, 2022
dce83fb
simplify partitioning in test
majosm Aug 9, 2022
9590cdc
redesign inter-volume trace pair functions
majosm Mar 23, 2022
9e0a95f
reapply zero addition to local_bdry_data
majosm Mar 25, 2022
ef4a17c
handle all-Number cases
majosm Mar 25, 2022
4cf60fa
cosmetic change
majosm Apr 1, 2022
041cb92
fix bug
majosm Apr 1, 2022
cb3ebe1
tweak as_dofdesc normalization
majosm Apr 1, 2022
fa17cd1
fix bugs
majosm Apr 1, 2022
5aa6c1d
don't try to create trace pair if there's no adjacency
majosm Apr 18, 2022
e34b30d
forget about heterogeneous inter-volume trace pairs for now
majosm May 2, 2022
fb44700
add FIXME
majosm May 4, 2022
c3bb93c
fix bug
majosm May 4, 2022
7ef21ba
ignore flake8-bugbear error
majosm Jul 3, 2022
12a6443
fix bug
majosm Aug 9, 2022
ecfccfe
add volume_dd to make_visualizer
majosm Apr 1, 2022
35c2f11
implement multi-volume support in op
majosm Apr 1, 2022
5551ac0
fix doc in characteristic_lengthscales
majosm Apr 8, 2022
edb13ad
fix memoization in a couple of spots
majosm Apr 8, 2022
e253b4b
get contextual volume tags for BoundayDomainTags as well
majosm Jul 3, 2022
9aa087b
tag some axes
majosm May 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
351 changes: 184 additions & 167 deletions grudge/discretization.py

Large diffs are not rendered by default.

32 changes: 6 additions & 26 deletions grudge/dof_desc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
:mod:`grudge`-specific boundary tags
------------------------------------

.. autoclass:: BTAG_MULTIVOL_PARTITION

Domain tags
-----------

Expand Down Expand Up @@ -111,24 +109,6 @@ class VTAG_ALL: # noqa: N801
# }}}


# {{{ partition identifier

@dataclass(init=True, eq=True, frozen=True)
class BTAG_MULTIVOL_PARTITION: # noqa: N801
"""
.. attribute:: other_rank

An integer, or *None*. If *None*, this marks a partition boundary
to another volume on the same rank.

.. attribute:: other_volume_tag
"""
other_rank: Optional[int]
other_volume_tag: "VolumeTag"

# }}}


# {{{ domain tag

@dataclass(frozen=True, eq=True)
Expand Down Expand Up @@ -401,17 +381,17 @@ def _normalize_domain_and_discr_tag(
if _contextual_volume_tag is None:
_contextual_volume_tag = VTAG_ALL

if domain in [DTAG_SCALAR, "scalar"]:
if domain == "scalar":
domain = DTAG_SCALAR
elif isinstance(domain, (BoundaryDomainTag, VolumeDomainTag)):
elif isinstance(domain, (ScalarDomainTag, BoundaryDomainTag, VolumeDomainTag)):
pass
elif domain == "vol":
elif domain in [VTAG_ALL, "vol"]:
domain = DTAG_VOLUME_ALL
elif domain in [FACE_RESTR_ALL, "all_faces"]:
domain = BoundaryDomainTag(FACE_RESTR_ALL)
domain = BoundaryDomainTag(FACE_RESTR_ALL, _contextual_volume_tag)
elif domain in [FACE_RESTR_INTERIOR, "int_faces"]:
domain = BoundaryDomainTag(FACE_RESTR_INTERIOR)
elif isinstance(domain, (BTAG_PARTITION, BTAG_MULTIVOL_PARTITION)):
domain = BoundaryDomainTag(FACE_RESTR_INTERIOR, _contextual_volume_tag)
elif isinstance(domain, BTAG_PARTITION):
domain = BoundaryDomainTag(domain, _contextual_volume_tag)
elif domain in [BTAG_ALL, BTAG_REALLY_ALL, BTAG_NONE]:
domain = BoundaryDomainTag(domain, _contextual_volume_tag)
Expand Down
4 changes: 2 additions & 2 deletions grudge/dt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def characteristic_lengthscales(
node distance on the reference cell (see :func:`dt_non_geometric_factors`),
and :math:`r_D` is the inradius of the cell (see :func:`dt_geometric_factors`).

:returns: a frozen :class:`~meshmode.dof_array.DOFArray` containing a
:returns: a :class:`~meshmode.dof_array.DOFArray` containing a
characteristic lengthscale for each element, at each nodal location.

.. note::
Expand All @@ -94,7 +94,7 @@ def characteristic_lengthscales(
methods has been used as a guide. Any concrete time integrator will
likely require scaling of the values returned by this routine.
"""
@memoize_in(dcoll, (characteristic_lengthscales,
@memoize_in(dcoll, (characteristic_lengthscales, dd,
"compute_characteristic_lengthscales"))
def _compute_characteristic_lengthscales():
return actx.freeze(
Expand Down
17 changes: 9 additions & 8 deletions grudge/eager.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ def __init__(self, *args, **kwargs):
def project(self, src, tgt, vec):
return op.project(self, src, tgt, vec)

def grad(self, vec):
return op.local_grad(self, vec)
def grad(self, *args):
return op.local_grad(self, *args)

def d_dx(self, xyz_axis, vec):
return op.local_d_dx(self, xyz_axis, vec)
def d_dx(self, xyz_axis, *args):
return op.local_d_dx(self, xyz_axis, *args)

def div(self, vecs):
return op.local_div(self, vecs)
def div(self, *args):
return op.local_div(self, *args)

def weak_grad(self, *args):
return op.weak_local_grad(self, *args)
Expand All @@ -68,8 +68,8 @@ def weak_div(self, *args):
def mass(self, *args):
return op.mass(self, *args)

def inverse_mass(self, vec):
return op.inverse_mass(self, vec)
def inverse_mass(self, *args):
return op.inverse_mass(self, *args)

def face_mass(self, *args):
return op.face_mass(self, *args)
Expand All @@ -89,5 +89,6 @@ def nodal_max(self, dd, vec):

interior_trace_pair = op.interior_trace_pair
cross_rank_trace_pairs = op.cross_rank_trace_pairs
inter_volume_trace_pairs = op.inter_volume_trace_pairs

# vim: foldmethod=marker
Loading