trixi-framework / trixi-framework/TrixiParticles.jl
Use default bounding box for `FullGridCellList`
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 83
- Forks
- 24
- Avg merge
- 8d 18h
- Merged PRs (30d)
- 3
Description
As suggested in https://github.com/trixi-framework/TrixiParticles.jl/pull/660 by @svchb, it would be more convenient if the minimum and maximum coordinates of the semidiscretization would automatically be used for the bounding box.
Here, we want to create a cell list template without a bounding box, and the semidiscretization should set the bounding box when copying the NHS.
cell_list = TrixiParticles.PointNeighbors.FullGridCellList()
semi = Semidiscretization(fluid_system, boundary_system,
neighborhood_search=GridNeighborhoodSearch{2}(; cell_list))
Here, we want to use a larger bounding box, so the semidiscretization should not overwrite an existing bounding box of the cell list.
cell_list = TrixiParticles.PointNeighbors.FullGridCellList(; min_corner, max_corner)
semi = Semidiscretization(fluid_system, boundary_system,
neighborhood_search=GridNeighborhoodSearch{2}(; cell_list))
That would make the copy_neighborhood_search API awkward.
copy_neighborhood_search(min_corner=..., max_corner=...)
would only use min_corner and max_corner to set the bounding box when there is none in the template.
When the cell list already has a bounding box, these arguments would have to be ignored, or the second snippet above would not work. This sounds like a bad API to me.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace FullGridCellList construction through GridNeighborhoodSearch, Semidiscretization, and copy_neighborhood_search. Confirm where the semidiscretization copies the neighborhood search; done means an absent cell-list bounding box uses the semidiscretization coordinates while an explicitly supplied bounding box remains unchanged, without adding copy_neighborhood_search arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100