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

Add interface for per element operations #35

Draft
wants to merge 119 commits into
base: main
Choose a base branch
from
Draft

Conversation

cwsmith
Copy link
Contributor

@cwsmith cwsmith commented Sep 26, 2024

This includes:

  • definition of linear and quadratic shape functions for simplicies (edges, triangles, and tets)
  • support for user/application element-to-dof ordering and the subsequent index into the arrays holding field data - i.e., the user/application has a different definition of the ordering/numbering of dof holders in a triangle/tet than what MeshFields uses. Note, this PR does not yet include programmatic access to the built-in/native MeshFields canonical ordering for each type of element+shape function combination.
  • tests using dummy mesh and Omega_h data to exercise the APIs

Discussion:

  • is a test of the shape function values, as done in shapefun.cc from pumi, a good addition?
    • yes

Todo:

  • add test for tetrahedrons e118072
  • add test that creates a field over an omegah mesh and evaluates the field d49551c
  • add tests that check the results of the evaluate operation using
    • linear shape function @ centroid d49551c
    • linear shape function @ interior 82f3a4f
    • quadratic shape function @ centroid 34b26b3
    • quadratic shape function @ interior 34b26b3
    • quadratic shape function with linear analytic function @ interior 34b26b3
  • add helper method that writes the field to Omega_h tags for rendering/etc.
  • extend evaluate to accept a multiple points per element 2535f17
  • documentation - class/struct interaction
  • documents - nomenclature
  • add static asserts for templated interfaces and classes
  • test with cabana controller - WIP in cws/CabBackend

@cwsmith
Copy link
Contributor Author

cwsmith commented Dec 5, 2024

/runtests

Copy link

github-actions bot commented Dec 5, 2024

Test Result: failure (details)

@cwsmith
Copy link
Contributor Author

cwsmith commented Dec 5, 2024

/runtests

Copy link

github-actions bot commented Dec 5, 2024

Test Result: failure (details)

@cwsmith
Copy link
Contributor Author

cwsmith commented Dec 5, 2024

/runtests

Copy link

github-actions bot commented Dec 5, 2024

Test Result: failure (details)

template <size_t NumPtsPerElem>
Kokkos::View<MeshField::Real *[3]>
createElmAreaCoords(size_t numElements,
Kokkos::Array<MeshField::Real, 3 * NumPtsPerElem> coords) {

Check notice

Code scanning / CodeQL

Large object passed by value Note test

This parameter of type
Array<double, 9UL, void>
is 72 bytes - consider passing a const pointer/reference instead.
test/testOmegahElement.cpp Fixed Show fixed Hide fixed
test/testOmegahElement.cpp Fixed Show fixed Hide fixed
TestCoords{allVertices, ThreePtsPerElem, "allVertices"}};
// clang-format on

static const size_t LinearField = 1;

Check notice

Code scanning / CodeQL

Unused static variable Note test

Static variable LinearField is never read.
// clang-format on

static const size_t LinearField = 1;
static const size_t QuadraticField = 2;

Check notice

Code scanning / CodeQL

Unused static variable Note test

Static variable QuadraticField is never read.

Field(Slice s) : slice(s) {}
Field(Slice s) : slice(s), divisors(computeDivisors()) {}

Check notice

Code scanning / CodeQL

Large object passed by value Note

This parameter of type
KokkosSliceWrapper<View<long *****, HostSpace>, long *****>
is 72 bytes - consider passing a const pointer/reference instead.
This parameter of type
KokkosSliceWrapper<View<int *****, HostSpace>, int *****>
is 72 bytes - consider passing a const pointer/reference instead.
Copy link

Package Line Rate Complexity Health
...build-kokkos.install.include 65% 0
...build-kokkos.install.include.Serial 97% 0
...build-kokkos.install.include.View.Hooks 100% 0
...build-kokkos.install.include.View 88% 0
...build-kokkos.install.include.desul.atomics 100% 0
...build-kokkos.install.include.impl 75% 0
...build-omegah.install.include 27% 0
meshFields.src 92% 0
meshFields.test 92% 0
Summary 84% (1993 / 2371) 0

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.

1 participant