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

[WIP] Enhance VisIt Data Collection to write out field basis names [task/JustinPrivitera/05_14_24/visit_data_coll_write_out_basis_name] #4307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JustinPrivitera
Copy link
Member

Pull request for comments about the integration of task/JustinPrivitera/05_14_24/visit_data_coll_write_out_basis_name into master.

  • Add basis string to the VisItFieldInfo class.
  • Add logic to handle basis string where appropriate.

These changes should bring the VisIt Data Collection more on par with the Conduit Data Collection. Once this feature is added, I will make changes within the MFEM reader inside VisIt to look for the basis name and use it to make appropriate choices about how to represent MFEM data, which will address this issue: visit-dav/visit#19469.

TODO

  • understand what is the best path for quadrature elements. What should be provided as the basis name? An empty string? They are already element associated, which leads me to think that they have never worked with VisIt. If that's true, that sounds like a separate issue. What should we do in the meantime?
  • how can I test these changes?

@jandrej
Copy link
Member

jandrej commented May 15, 2024

I'm not sure if QuadratureFunctions worked with VisIt before. They definitely do with ParaView, where they are just displayed as a "node" or "point" in space associated with values. They don't require interpolation to visualize as they're point-discontinuous and not element-discontinuous.

@JustinPrivitera
Copy link
Member Author

@jandrej I know that quadrature functions do not work with VisIt. However, both quadrature functions and grid functions use VisItFieldInfo. If I add basis name to that class, I need to handle the grid function case and the quadrature function case. What is the right thing to provide for quadrature functions for basis name? An empty string?

@tzanio
Copy link
Member

tzanio commented May 15, 2024

Maybe instead of the basis name, we should consider saving gf->FESpace()->FEColl()->GetContType() for a given grid function gf. The possible values for this are:

  • FiniteElementCollection::CONTINUOUS - e.g. this is what you get for $H^1$
  • FiniteElementCollection::TANGENTIAL - e.g. this is what you get for $H(curl)$
  • FiniteElementCollection::NORMAL - e.g. this is what you get for $H(div)$
  • FiniteElementCollection::DISCONTINUOUS - e.g. this is what you get for $L^2$

Based on these values, in the VisIt plugin then we can:

  • Plot nodal field on a LOR mesh for CONTINUOUS
  • Plot nodal field on a disjoint mesh refined with GeometryRefiner for all the other options
  • (Optionally) Plot an element field on a LOR mesh for DISCONTINUOUS order 0 (i.e. p.w. const grid function)

@JustinPrivitera
Copy link
Member Author

@tzanio this was my thought as well. However, I discussed with @cyrush, and he felt it would be better to bring the VisIt outputs in closer parity with the Conduit outputs, which do not handle the quadrature function case and do include the basis name. We can wait for him to chime in if you'd like, or organize a time to meet and discuss.

@tzanio
Copy link
Member

tzanio commented May 15, 2024

Regarding QuadratureFunction, this has been discussed previously, but there are several options:

  1. plot colored bubbles at each point
  2. interpret the values as dofs of L2 grid function at the points and plot that
  3. plot p.w. const values on LOR mesh where each LOR element contains exactly one of the points

My personal preference is for option 3

@tzanio
Copy link
Member

tzanio commented May 17, 2024

Check also the code-style CI failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants