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

Custom C/C++ kernel demo #2983

Merged
merged 49 commits into from
Jan 21, 2024
Merged

Custom C/C++ kernel demo #2983

merged 49 commits into from
Jan 21, 2024

Conversation

jhale
Copy link
Member

@jhale jhale commented Jan 11, 2024

Work towards solving #2942.

First draft for discussion. P1 Mass matrix assemble.

@jorgensd
Copy link
Sponsor Member

Blank slate to work towards solving #2942.

First initial thought is (and this applies to the Python interface too); how can I make a function space with dofs assigned to vertices without codegen?

@jhale see; https://github.com/FEniCS/dolfinx/blob/main/cpp/demo/interpolation-io/main.cpp#L34-L42

@jorgensd
Copy link
Sponsor Member

@jhale
Is there a reason that our custom kernel has to use pre-defined finite element tabulation?
I think it would be really nice to show that you can make up your own quadrature scheme (or take one from a text-book), and use basix to do runtime tabulation.

@jhale
Copy link
Member Author

jhale commented Jan 15, 2024

No, it's just a placeholder. I plan to add tabulation via Basix.

@jhale
Copy link
Member Author

jhale commented Jan 18, 2024

Should we assembler for an FFCx version too to compare the result? This would also be super helpful for profiling the kernel call cost (since the pure C++ version can inline to call).

Let's discuss this on Slack in #development - I don't think this is currently possible as std::function is everywhere. If we can get that issue solved, yes, I'd be happy to produce a counterpart for benchmarking/comparison.

@garth-wells garth-wells added this pull request to the merge queue Jan 21, 2024
Merged via the queue into main with commit b79e4e5 Jan 21, 2024
19 checks passed
@garth-wells garth-wells deleted the jhale/custom-cell-kernel-cpp branch January 21, 2024 07:58
@garth-wells garth-wells linked an issue Jan 23, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add C++ demo that uses a custom C/C++ kernel
4 participants