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

Improving show of Meshes #103

Open
lukem12345 opened this issue Jul 2, 2024 · 2 comments
Open

Improving show of Meshes #103

lukem12345 opened this issue Jul 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lukem12345
Copy link
Member

lukem12345 commented Jul 2, 2024

Currently, we display meshes in the REPL by relying on the usual method one-size-fits-all default for pretty-printing the tabular representation of an ACSets. This is convenient for e.g. examining whether orientations are set to nothing.

However, especially for large meshes, this default means can be quite slow and noisy, leading to a poor UX. Further, most of the quality-checks we care about are hard to perform by manual inspection of the tabular representation. Dual complexes especially suffer from these problems, since they are always larger and always contain more tables.

So, we should investigate ways of speeding up such visualizations.

Here are some potential ideas:

nparts and/ or statistics

For any mesh, or meshes above a certain size, only display the number of simplices of each dimension. Further, we could always return the Euler characteristic, and so on, as we do when testing our mesh loading.

Some Advantages:

  • This would always be fast.
  • Certainly eliminates "noise" in the most prejudicial way.

Some Disadvantages:

  • It may be difficult to choose the perfect set of default summary statistics.

Sparse matrix visualizations

One interesting idea is to display connectivity information as given by the sparse matrix visualization of the $d_0$ matrix, or all $d$ matrices, or the $\Delta_0$ matrix.

Some Advantages:

  • You get a more immediate intuition into the structure of the mesh.
  • $d$ and $\Delta$ are - in some sense - more "natural" representations.
  • This is faster than converting the mesh ACSet to a table and then pretty printing that table. This is especially true for large meshes.

Some Disadvantages:

  • More fragile.
  • Might fail if a mesh is being constructed imperatively at the REPL.
  • This obscures whether e.g. orientations are assigned to nothing.

Some of those disadvantages are ameliorated by providing an easy means to still pretty-print the underlying ACSet.

Upstreaming

Or, we could look at speeding up display for all ACSets upstream. This would solve the speed issue, but would not the noise.

@lukem12345
Copy link
Member Author

@jpfairbanks I am interested to hear your thoughts on this issue.

@lukem12345 lukem12345 added the enhancement New feature or request label Jul 2, 2024
@jpfairbanks
Copy link
Member

I think that printing summary statistic if the mesh is above a certain size is fine. You could for instance print the size of each table.

Some information about the geometric layout of the points would be helpful so you could also print a bounding box for embedded Delta sets

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

No branches or pull requests

2 participants