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

Diagrams of Meshes #288

Open
quffaro opened this issue Dec 9, 2024 · 0 comments
Open

Diagrams of Meshes #288

quffaro opened this issue Dec 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@quffaro
Copy link
Member

quffaro commented Dec 9, 2024

Currently, bespoke boundary conditions are included through the generate function by masking. That is, boundary conditions are not automated. There are two ways that this is done:

  1. Through the generate function, such as in poiseuille and bc_debug. Masks are implemented as bespoke operators.
  2. Through collages, such as in stokes_aswell.jl here which uses UWDs to specify meshes with their boundaries. A collage is "manual" in the sense that users need to write functions for each boundary. (e.g, left_wall_idxs here). Collages require the user to specify an additional Decapode with the boundary morphisms, a relation diagram mapping the mesh to its boundaries, as well as the resulting Decapode collage produced through collate.

Both methods require new functions implemented into generate to specify the indices of the boundary and apply the correct value.

We'd like a way of automating this process further. Through FreeDiagram and the @diagram macro in Catlab, we have the ability of freely-constructing a diagram. We can use this to build a diagram of meshes which stores a hierarchy of subobjects for meshes, including the original mesh as well as boundaries, their boundaries, etc. We can use this to programmatically select boundaries and apply boundary conditions.

We can implement map for Diagrams (if not currently implemented) to broadcast functions onto the mesh hierarchy. Rather than passing in a mesh to the compiler, we can pass in the diagram of meshes. This way, the relationship between meshes and their boundaries are sustained throughout the entire decapodes workflow.

Because boundary conditions are also enforced through the generate function, it makes sense to have the Mesh Hierarchy also carry around functions traditionally stored in the generate function; for example, while foo may be defined over the mesh $$X$$, bar may be defined over $$\partial_{top}X$$.

This is a large lift impacting most aspects of Decapodes, so this implementation will create a breaking release.

@quffaro quffaro added the enhancement New feature or request label Dec 9, 2024
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

1 participant