trixi-framework / trixi-framework/TrixiParticles.jl

Use default bounding box for `FullGridCellList`

Open
#665 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.