Add region tags#129
Conversation
1b6c746 to
c52e661
Compare
|
|
||
| Elements of :attr:`boundary_tags` that do not cover any | ||
| part of the boundary will not be keys in this dictionary. | ||
|
|
There was a problem hiding this comment.
Is this information preserved somewhere?
There was a problem hiding this comment.
As far as I could tell, this wasn't actually true... The code in the mesh constructor didn't check whether the tags were empty.
| return boundary_tags | ||
|
|
||
|
|
||
| def index_tags(tags): |
There was a problem hiding this comment.
| def index_tags(tags): | |
| def tag_to_index_dict(tags): |
?
There was a problem hiding this comment.
Should I verbify it? get_tag_to_index_dict? Or just tag_to_index_dict?
There was a problem hiding this comment.
🤷 Not sure. Be consistent with surrounding code? :)
|
|
||
| .. attribute:: region_tags | ||
|
|
||
| A list of region tag identifiers. :class:`RTAG_ALL` is guaranteed to exist. |
There was a problem hiding this comment.
To what extent are empty tags supposed to be included? (Document this)
| (Note that element groups are not necessarily geometrically contiguous | ||
| like the figure may suggest.) | ||
|
|
||
| .. attribute:: region_tags |
There was a problem hiding this comment.
volume_tags? volume_region_tags? I'm not hating region_tags, I'm just exploring altenatives.
| return boundary_tags | ||
|
|
||
|
|
||
| def index_tags(tags): |
There was a problem hiding this comment.
Does this require that tags is narrowed to the non-empty ones first?
| # {{{ is_region_tag_empty | ||
|
|
||
| def is_region_tag_empty(mesh, region_tag): | ||
| """Return *True* if the corresponding region tag does not occur as part of |
There was a problem hiding this comment.
| """Return *True* if the corresponding region tag does not occur as part of | |
| """:returns: *True* if the corresponding region tag does not occur as part of |
There was a problem hiding this comment.
pydocstyle didn't like this, FWIW. (Not sure if we're following its conventions here too or just in mirgecom.)
There was a problem hiding this comment.
Nah, I find pydocstyle way too rigid to use everywhere.
|
|
||
| *(dim, nunit_nodes)* | ||
|
|
||
| .. attribute:: regions |
There was a problem hiding this comment.
Should this live with the element group or the mesh? (I'm not sure, but I'm kind of leaning mesh.)
| An array *(nelements)*, with the bits of ``regions[i]`` indicating the | ||
| mesh regions that contain element ``i``. |
There was a problem hiding this comment.
If this is allowed to be None, document that fact. (here or wherever it ends up)
|
Superseded by #320. |
@inducer What would you say to doing something like this to handle volume tagging for geometry-based initialization (and later multi-domain)?
cc @dshtey2