Skip to content

WIP: Contiguous memory layout for the solution#189

Draft
Andres-MG wants to merge 5 commits into
masterfrom
feature/global_storage
Draft

WIP: Contiguous memory layout for the solution#189
Andres-MG wants to merge 5 commits into
masterfrom
feature/global_storage

Conversation

@Andres-MG

Copy link
Copy Markdown
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 requested a review from loganoz October 23, 2023 14:43
@Andres-MG Andres-MG self-assigned this Oct 23, 2023
@loganoz

loganoz commented Oct 24, 2023

Copy link
Copy Markdown
Collaborator

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.

2 participants