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

WIP: Contiguous memory layout for the solution #189

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Andres-MG
Copy link
Collaborator

Right now the solution vector is scattered across all the elements, in small non-contiguous arrays. On top of this, since implicit solvers need a long contiguous vector, we transfer the solution from local to global and vice-versa several times when using these methods.

This PR defines the local storage in terms of pointers to the correct regions of the global array. This means that there is only one solution vector with two different access patterns. The functions global2Local and local2Global are not necessary anymore, and the memory footprint is somewhat smaller as the arrays are not duplicated. Accelerating implicit methods with GPUs should also be easier now.

Conversely, at least two features still need to be reworked: p-adaptation and the construction of individual elements.

The solution is stored in small arrays scattered over all the elements.
Additionally, a global vector also exists to enable implicit time integration.
This commit defines the element-local arrays as pointers to the corresponding
regions in the global vector, avoiding allocations and automatically coupling
local and global representations of the solution.

Still WIP as some features are missing, namely p-adaptation and the creation of
individual elements (not attached to the global storage).
@Andres-MG Andres-MG added the enhancement New feature or request label Oct 23, 2023
@Andres-MG Andres-MG self-assigned this Oct 23, 2023
@loganoz
Copy link
Owner

loganoz commented Oct 24, 2023

Seems quite interesting, let's talk about this on Thursday meeting!

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.

None yet

2 participants