Skip to content

Conversation

@camierjs
Copy link

@camierjs camierjs commented May 28, 2025

This PR adds DOFs numbering.

The n key now cycles in 2D: NONEELEMENTSEDGESVERTICESDOFS.

Should solve #106

GLVis_s01

Parallel numbering is now by default 'local' to each rank and can be toggle back to 'global' with Alt-n:
output
(mpirun -n 3 ./ex6p -m ../data/star-mixed.mesh -o 2 -md 200)

@tzanio
Copy link
Member

tzanio commented May 28, 2025

To clarify: "DOF" here means the numbering of the Mesh nodes (as a high-order grid function), right?

@najlkin najlkin linked an issue May 29, 2025 that may be closed by this pull request
@najlkin najlkin self-requested a review May 29, 2025 01:08
@najlkin
Copy link
Contributor

najlkin commented May 29, 2025

Js seems to be working: https://github.com/GLVis/glvis-js/actions/runs/15313952476 😉 Thanks for the cleanup 👍 I need to take a deeper look...

@najlkin
Copy link
Contributor

najlkin commented May 29, 2025

I tested that and it works nicely with 2D scalars on conforming meshes, but a few things to do:

  • update README
  • update Changelog
  • the current option could be written to console
  • 2D vector grid functions do something strange after pressing N, should be fixed
  • example 6 crashes glvis after switching to the second option, should be fixed

@najlkin
Copy link
Contributor

najlkin commented May 30, 2025

@tzanio , it shows DOFs (in the sense of finite element nodes) for the visualized grid function. In the case of mesh visualization, the nodes of the coloring grid function.

@hughcars
Copy link

Thanks for doing this @camierjs, testing this on some scalar data as part of #350

On a 2D mesh with scalar data made from a submesh, n doesn't work.
On a 2D mesh with scalar data made directly, it does work.
On a 3D mesh it does not. On a 2d mesh made directly, it works. On a 2D mesh made as a submesh, it fails too.

I would guess that the distinction between a 2D mesh vs a submesh of a 3D mesh is probably the root of the difference.

@najlkin najlkin linked an issue Dec 19, 2025 that may be closed by this pull request
@camierjs
Copy link
Author

Thanks for testing this out, @hughcars —you're right: for now, only 2D meshes with scalar data are supported for the DOF numbering display. The 'n' key cycles through the display modes only in this mode.

To handle vector mode, would adding a key to cycle through the 'index' of the visualized component be a good solution? (It wouldn't solve the clash with the 'n' key in that mode, though—we'd still need to find another one.)

The handling of 2D meshes created as submeshes could definitely be improved—perhaps in a follow-up PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hotkey clash for 2D vector data

5 participants