-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
More work towards supporting mixed-topology meshes #3590
base: main
Are you sure you want to change the base?
Conversation
Seems to be crashing in sparsity pattern builder at the moment. |
|
||
# Solve | ||
A_scipy = A.to_scipy() | ||
b_scipy = np.ones(A_scipy.shape[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also assemble RHS? Maybe add an issue and next PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR only adds matrix assembly, but adding vector / scalar assembly should be straightforward. It would be a small extra PR.
/// @brief Create function space for given mesh, elements and | ||
/// degree-of-freedom maps. | ||
/// @param[in] mesh Mesh that the space is defined on. | ||
/// @param[in] elements Finite element for the space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we know which element belongs to which cell type?
This PR builds on @chrisrichardson's work in this branch to support mixed-topology meshes.
The idea is to allow
fem::FunctionSpace
to have multiple elements/dofmaps for each cell type. Similarly,fem::Form
now can have more than oneintegral_data
for a given subdomain ID, one for each kernel type. In the assembler, we simply loop over each kernel type. There are no changes to the lowest level assemblers. Currently, it only works for cell integrals and matrix assembly, but this design should easily generalise to assembling vectors/scalars and exterior facet integrals. The design should also generalise to interior facet integrals, but this will need more work because we need to generate kernels and access the DOF maps for each compatible combination of cell types etc.It's just a draft for now; any comments on the general design would be much appreciated. If we think this is the right approach, I can modify the other assemblers and add support for exterior facet integrals.