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

Create an abstract Constraints class to support different types of constraints via inheritance #153

Open
2 tasks
faisal-bhuiyan opened this issue Apr 30, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@faisal-bhuiyan
Copy link
Collaborator

Task
Create an abstract interface for different types of constraints supported in OpenTurbine.

Why
To treat the constraints uniformly as member of the base class, rather than duplicating code to acknowledge the different types.

Done means

  • Refactoring of the constraints classes to establish an inheritance hierarchy
  • Unit tests exist for all derived classes
@faisal-bhuiyan faisal-bhuiyan added the enhancement New feature or request label Apr 30, 2024
@faisal-bhuiyan faisal-bhuiyan self-assigned this Apr 30, 2024
@deslaughter
Copy link
Collaborator

I gave this a bit more thought and I don't think the inheritance based approach will work well with the Kokkos parallelism. If we could define a vector of Constraint type, it would be a good solution, but inevitably we'll need all the data to generate Phi and B in the GPU and we won't want to copy that in at every iteration. I do think this may be a great opportunity to define a View of Constraint structs that we can do a parallel_for over. Let's get together and come up with a list of constraint types that the struct will need to implement.

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

No branches or pull requests

2 participants