-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
support Cabana backend #48
base: main
Are you sure you want to change the base?
Conversation
…orked on copying over kokkos tests to test cabana
@Joshua-Kloepfer Thanks for addressing the items. Can you describe how the recursive baseType struct for defining ValArray works? |
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.
Looks good. A few comments are below.
coordField(i, 0, 0, MeshField::Vertex) = coords[i * meshDim]; | ||
coordField(i, 0, 1, MeshField::Vertex) = coords[i * meshDim + 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.
We should document the change in the field indexing order to 'entity, node, component'. For now I think the best spot for that description is on this function:
Line 183 in 3b72eb0
auto CreateLagrangeField() { |
src/MeshField_Element.hpp
Outdated
template <typename T> struct baseType { | ||
using type = T; | ||
}; | ||
template <typename T, size_t N> struct baseType<T[N]> { | ||
using type = typename baseType<T>::type; | ||
}; |
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.
Please add a brief description of why this is needed and how it works.
Controller<ExecutionSpace, MemorySpace, DataType>, | ||
MeshField::CabanaController<ExecutionSpace, MemorySpace, | ||
DataType>>) { | ||
return Ctrlr(std::max(numVtx, numEdge)); |
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.
The controller needs to provide field storage for all the vertices and all the edges. It looks like this is selecting the higher of the two. Am I reading this correctly?
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.
Yes. The Cabana Controller accepts one number for the number of tuples so I picked the larger one to make sure there was enough space for both vertices and edges.
@Joshua-Kloepfer Please address the few comments above when you get a chance. Thanks for adding the the |
This PR adds support for the Cabana backend for field creation through the high level/user API.
Todo:
baseType
struct does for definingValArray
createCoordinateField(...)
and just useDataType[1][3]
in the cab controllernumComps == 1|2
increateCoordinateField(...)