Skip to content

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Jun 16, 2021

This is supposed to be a version of #105 that we can merge right away, plus a number of fixes that arose around that. For review, this PR is probably best viewed commit-by-commit. The commit messages provide a pretty good inventory of what's here.

Diff-wise, the biggest part of this is the (annoying, but IMO required) split of PolynomialWarpAndBlendGroupFactory into PolynomialWarpAndBlend2DGroupFactory and PolynomialWarpAndBlend3DGroupFactory. (The 2D WnB nodes are not equivalent to a restriction of the 3D nodes to a face, and we very much would like 2D el groups in 3D discretizations to be just that, so that the boundary extractions can be done by indirect addressing.)

cc @nchristensen

Copy link
Collaborator

@alexfikl alexfikl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure about the split of the warp and blend classes, but functionally it looks good to me! (barring a few nitpicks)

Comment on lines 272 to 273
if tol_multiplier is None:
tol_multiplier = 500
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's another tol_multiplier is None above that sets it to 50. Which one did you mean to keep?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if len(zero_indices) != ncols - 1:
dist_vecs = (ibatch.result_unit_nodes.reshape(dim, -1, 1)
- from_grp.unit_nodes.reshape(dim, 1, -1))
dists = np.sqrt(np.sum(dist_vecs**2, axis=0))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dists = np.sqrt(np.sum(dist_vecs**2, axis=0))
dists = la.norm(dist_vecs, axis=0, ord=2)

? Don't know if this is any faster.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return result


class PolynomialWarpAndBlend3DElementGroup(_MassMatrixQuadratureElementGroup):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like this should have From3DRestriction or something to that effect in the name? This makes it sound like it only works in 3D.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point.

  • PolynomialWarpAndBlend3DRestrictingElementGroup?
  • PolynomialWarpAndBlend2DRestrictingElementGroup?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that sounds better!

Copy link
Owner Author

@inducer inducer Jun 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 42 to 43
default_simplex_group_factory,
ElementGroupFactory)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default_simplex_group_factory,
ElementGroupFactory)
default_simplex_group_factory,
ElementGroupFactory)

? Everyone else seems to be indented like this.

Copy link
Owner Author

@inducer inducer Jun 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inducer inducer force-pushed the conn-permutations branch 3 times, most recently from be2f9c2 to 2d96e65 Compare June 16, 2021 22:38
@inducer inducer force-pushed the conn-permutations branch from 2d96e65 to af04be8 Compare June 16, 2021 22:43
@inducer inducer enabled auto-merge (rebase) June 16, 2021 22:46
@inducer inducer force-pushed the conn-permutations branch from af04be8 to 351b7c4 Compare June 16, 2021 22:53
@inducer inducer merged commit 21bc911 into main Jun 16, 2021
@inducer inducer deleted the conn-permutations branch June 16, 2021 23:30
inducer added a commit to inducer/grudge that referenced this pull request Jun 16, 2021
inducer added a commit to inducer/grudge that referenced this pull request Jun 17, 2021
inducer added a commit to inducer/grudge that referenced this pull request Jun 17, 2021
inducer added a commit to inducer/grudge that referenced this pull request Jun 17, 2021
inducer added a commit to inducer/grudge that referenced this pull request Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants