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

Warn when interpolation is taking place in vis #451

Open
inducer opened this issue Feb 21, 2025 · 3 comments
Open

Warn when interpolation is taking place in vis #451

inducer opened this issue Feb 21, 2025 · 3 comments

Comments

@inducer
Copy link
Owner

inducer commented Feb 21, 2025

(Especially/only) if orders match, because then it might be unexpected.

cc @ShawnL00

@alexfikl
Copy link
Collaborator

Is the existing warning not sufficient? What other cases should it warn about?

warn("Visualization discretization is identical to base discretization. "
"To avoid the creation of a separate discretization for "
"visualization, avoid passing vis_order unless needed.",
stacklevel=2)

@inducer
Copy link
Owner Author

inducer commented Feb 21, 2025

No, not in this case. This code:

pre_density_discr = Discretization(
    actx, mesh, InterpolatoryQuadratureGroupFactory(target_order)
    )

vis = make_visualizer(actx, pre_density_discr, target_order)

makes pre-density as GL and vis as GLL, I think. The warning didn't fire.

@alexfikl
Copy link
Collaborator

No, not in this case. This code:
makes pre-density as GL and vis as GLL, I think. The warning didn't fire.

Ah, yeah, it wouldn't fire in that case. I'm not sure how I feel about making that a warning though.. all the visualizers in pytential will complain :(

Definitely could use better documentation for when it interpolates and to what elements.

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

No branches or pull requests

2 participants