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

libCEED integration #97

Merged
merged 43 commits into from
Oct 14, 2023
Merged

libCEED integration #97

merged 43 commits into from
Oct 14, 2023

Conversation

sebastiangrimberg
Copy link
Contributor

@sebastiangrimberg sebastiangrimberg commented Sep 18, 2023

Integrate libCEED for operator partial assembly directly into Palace rather than via patches on MFEM, for both long-term maintainability and better integration with the specialized use within Palace.

All integrators are now assembled via libCEED using user-defined QFunctions rather than using the predefined MFEM integrators. This allows for a single code path for both CPU and device-based partial and full assembly. The "Device" configuration file option now only configures the mfem::Device (as cpu, cuda, hip, etc.) while the new "Backend" option configures the libCEED backend, with appropriate defaults based on the value of "Device" for the typical end-user.

TODO:

Resolves #101 (updates libCEED and MFEM dependencies)

@sebastiangrimberg sebastiangrimberg force-pushed the sjg/libceed-integration-dev branch from 1cc8052 to f764f01 Compare September 22, 2023 19:04
@sebastiangrimberg sebastiangrimberg force-pushed the sjg/libceed-integration-dev branch from f764f01 to b2b2d4a Compare September 22, 2023 19:28
Includes some test meshes in 2D and 3D, in test/unit/mesh.
…taneous unordered_map::find while also inserting
…, tested across many meshes/finite element spaces in the unit tests
…ng the palace::FiniteElementSpace class which inherits from mfem::ParFiniteElementSpace and adds a UUID so each instance of the class can be uniquely identified

Adds UUID generation functionality using https://github.com/mariusbancila/stduuid, one choice of many for a light-weight, permissively licensed, reliable UUID generator. We only need weak guarantees on uniqueness, since we won't be generating millions or billions of objects requiring unique identification.
@sebastiangrimberg sebastiangrimberg marked this pull request as ready for review September 26, 2023 15:55
This was referenced Oct 3, 2023
Copy link
Collaborator

@hughcars hughcars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's very hard to see much into the correctness of the Q functions, aside from some basic pattern matching, so am relying on the correctness of the tests. Very good there'll now be a unit test framework in place.

The only largish change I could see is doing away comes from reducing the indirection with the new bilinear form. Breaking from the mfem version it's possible to make a much neater interface.

palace/fem/bilinearform.cpp Show resolved Hide resolved
palace/fem/integ/curlcurl.cpp Show resolved Hide resolved
palace/fem/integ/curlcurlmass.cpp Outdated Show resolved Hide resolved
palace/fem/integ/curlcurlmass.cpp Outdated Show resolved Hide resolved
palace/models/spaceoperator.cpp Show resolved Hide resolved
palace/fem/qfunctions/utils_qf.h Show resolved Hide resolved
palace/fem/bilinearform.hpp Outdated Show resolved Hide resolved
palace/fem/libceed/restriction.cpp Show resolved Hide resolved
palace/fem/libceed/coefficient.hpp Show resolved Hide resolved
palace/fem/fespace.hpp Show resolved Hide resolved
palace/fem/integ/vecfemass.cpp Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes on the first decimal place seem surprising, but note for posterity: the regeneration here compared to mainline is due to regeneration necessary for b2b2d4a in updating the quadrature orders.

test/unit/test-libceed.cpp Outdated Show resolved Hide resolved
@sebastiangrimberg sebastiangrimberg merged commit 55f3ee9 into main Oct 14, 2023
17 checks passed
@sebastiangrimberg sebastiangrimberg deleted the sjg/libceed-integration-dev branch October 14, 2023 00:16
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 this pull request may close these issues.

2 participants