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

Make DofHandler work with other(any?) dof distribution #829

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

Conversation

AbdAlazezAhmed
Copy link
Collaborator

@AbdAlazezAhmed AbdAlazezAhmed commented Oct 18, 2023

Currently we assume that interpolations have their dofs ordered such that vertices dofs are assigned first then faces etc.
This makes #790 require some painful permutations. This PR utilizes *dof_indices when distributing dofs so we don't need that assumption (now we can have dofs of a line as

+---+---+---+
1   2   3   4

while before we needed it to be

+---+---+---+
1   3   4   2

)

It's not as fast as master yet, also it'd be nice for it to use InterfaceOrientationInfo as in #743 instead of having two/three orientation structs when one can handle both cases.

Making this PR for now to test CI and if you have suggestions or comments. Still working on cleaning it/making it faster :"D

Master:

julia> grid = generate_grid(Quadrilateral, (1000, 1000))
Grid{2, Quadrilateral, Float64} with 1000000 Quadrilateral cells and 1002001 nodes

julia> @btime dofhandler(DofHandler, $grid)
  564.293 ms (293 allocations: 318.43 MiB)
DofHandler{2, Grid{2, Quadrilateral, Float64}}
  Fields:
    :v, Lagrange{RefQuadrilateral, 2}()^2
    :s, Lagrange{RefQuadrilateral, 1}()
  Dofs per cell: 22
  Total dofs: 9010003

PR:

julia> @btime dofhandler(DofHandler, $grid)
  1.208 s (264 allocations: 450.60 MiB)
DofHandler{2, Grid{2, Quadrilateral, Float64}}
  Fields:
    :v, Lagrange{RefQuadrilateral, 2}()^2
    :s, Lagrange{RefQuadrilateral, 1}()
  Dofs per cell: 22
  Total dofs: 9010003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant