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

[Distributed] Support for discrete geometries #89

Closed
zjwegert opened this issue Jun 7, 2024 · 1 comment
Closed

[Distributed] Support for discrete geometries #89

zjwegert opened this issue Jun 7, 2024 · 1 comment

Comments

@zjwegert
Copy link
Contributor

zjwegert commented Jun 7, 2024

Discrete geometries are not currently available. It looks like the best way to go about this would be a type DistributedDiscreteGeometry. I have created a starting PR with the new struct and the bare minimum of functionality to implement a Poisson test.

The constructor for DistributedDiscreteGeometry is currently poorly optimised and requires the evaluation of an FEFunction at point_to_coords. See below:

function DistributedDiscreteGeometry(φh::CellField,model::DistributedDiscreteModel)
  gids = get_cell_gids(model)
  geometries = map(local_views(model),local_views(gids),local_views(φh)) do model,gids,φh
    ownmodel = remove_ghost_cells(model,gids)
    point_to_coords = collect1d(get_node_coordinates(ownmodel))
    DiscreteGeometry(φh(point_to_coords),point_to_coords)
  end
  DistributedDiscreteGeometry(geometries)
end
@zjwegert
Copy link
Contributor Author

The above now avoids evaluating a cell field along point_to_coords. I have also added some tests.

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

No branches or pull requests

2 participants