trixi-framework / trixi-framework/Trixi.jl
Use proxy types that are passed to `P4estMesh` to allow to dispatch on the first argument?
- Dominant language
- Julia
- Stars
- 731
- Forks
- 166
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 25
Description
This is more of a general remark. The `P4estMesh` has many different options of generating meshes: structured, INP, now cubed sphere. Possibly soon also `UnstructuredQuadMesh`. Instead of differentiating by the arguments to the constructor, what about using proxy types that are passed to `P4estMesh` that allows to dispatch on the first argument?
For example (names can/must be optimized),
* `Abaqus`
* `Structured`
* `CubedSphere`
Such that you could just call
```julia
P4estMesh(CubedSphere(3, 2, 0.5, 0.2), ...)
```
I am not sure if this needs to be done in this PR, I just wanted to put this out as an idea.
_Originally posted by @sloede in https://github.com/trixi-framework/Trixi.jl/pull/689#discussion_r662111889_
Contributor guide
Assessment
This issue has not been assessed yet.