Ferrite-FEM / Ferrite.jl

Finite element toolbox for Julia
https://ferrite-fem.github.io
Other
346 stars 92 forks source link

Support reordering operations for Grid #832

Open termi-official opened 1 year ago

termi-official commented 1 year ago

We should add renumber!(grid, order). This can be useful if we want to add data locality optimization strategies in the future.

Jay-sanjay commented 12 months ago

Hi @termi-official I would like to work on this issue, can you please tell me what kind of function renumber!( ) must be . I see there is some things related to it here https://github.com/Ferrite-FEM/Ferrite.jl/blob/fe44e7f6297158e9bbb62fd4bc9adaa1d79929f2/src/Dofs/DofRenumbering.jl#L62 but I am not clear what needs to be done

termi-official commented 12 months ago

The idea is similar to the dof renumbering. Basically the grid has an array of cells and nodes https://github.com/Ferrite-FEM/Ferrite.jl/blob/fe44e7f6297158e9bbb62fd4bc9adaa1d79929f2/src/Grid/grid.jl#L316-L317 where the cells hold indices to the node array. So the function basically has to change the node locations on the nodes array of the grid and the indices in the cells respectively.