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

Upstream boundary accessors for 1D simplicial sets #132

Closed
lukem12345 opened this issue Jan 25, 2025 · 0 comments · Fixed by #133
Closed

Upstream boundary accessors for 1D simplicial sets #132

lukem12345 opened this issue Jan 25, 2025 · 0 comments · Fixed by #133
Assignees
Labels
enhancement New feature or request

Comments

@lukem12345
Copy link
Member

lukem12345 commented Jan 25, 2025

Currently, this package exports helper functions which access the indices of boundary simplices for 2D simplicial sets.

However, boundary accessors for 1D simplicial sets are not exported. This is typically because the 1D simplicial sets used in simulations are either lines or circles. For the line mesh, grabbing the boundary indices is simply a matter of calling [begin] and [end] on the co-chain of interest.

For other meshes, i.e. those with multiple connected components, [begin] and [end] will not suffice.

So, we should upstream some helper functions:

boundary_verts =                                    
  findall(x -> x < 2,
          StatsBase.counts(vcat(sdE[:∂v0], sdE[:∂v1])))       
boundary_edges =
  union(reduce(vcat, incident(sdE, boundary_verts, :∂v1)),
        reduce(vcat, incident(sdE, boundary_verts, :∂v0)))

The star operator could be used as well:

boundary_edges = mapreduce(v -> star(sE, v)[2], vcat, boundary_verts)
@lukem12345 lukem12345 added the enhancement New feature or request label Jan 25, 2025
@lukem12345 lukem12345 self-assigned this Jan 25, 2025
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

Successfully merging a pull request may close this issue.

1 participant