trixi-framework / trixi-framework/Trixi.jl
Error: boundaries object missing from cache object using a DGMultMesh from Triangulate.jl and StartUpDG.jl
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 731
- Forks
- 167
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 25
Description
I've been trying to use Triangulate and StartUpDG to create my own mesh to pass to Trixi and a DGMultiMesh. It's essentially a mixture of the confunctionality of the two examples; euler brown minion vortex and forward facing step.
However, the code errors when the cache object doesn't have a boundaries object with name and neighbors_ids on it. I've created a MWE repo that errors with this message:
ERROR: LoadError: type Tuple has no field name
Stacktrace:
[1] getproperty(x::Tuple{}, f::Symbol)
@ Base ./Base.jl:37
[2] initialize!(boundary_types_container::Trixi.UnstructuredSortedBoundaryTypes{3, Tuple{BoundaryConditionDirichlet{typeof(initial_condition_mach_flow)}, typeof(boundary_condition_outflow), typeof(boundary_condition_slip_wall)}}, cache::@NamedTuple{boundaries::Tuple{}, md::MeshData{2, StartUpDG.VertexMappedMesh{Tri, Tuple{Vector{Float64}, Vector{Float64}}, Matrix{Int32}}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, Matrix{Int64}, Matrix{Float64}, StaticArraysCore.SMatrix{2, 2, Matrix{Float64}, 4}, Matrix{Float64}, Matrix{Int64}, Matrix{Int64}, Vector{Int64}}, Qrst_skew::Tuple{LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}, LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}}, VhP::Matrix{Float64}, Ph::Matrix{Float64}, invJ::Matrix{Float64}, dxidxhatj::StaticArraysCore.SMatrix{2, 2, Matrix{Float64}, 4}, entropy_var_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, projected_entropy_var_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, entropy_projected_u_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, u_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, u_face_values::StructArray{SVector{4, Float64}, 2, NTuple{4, SubArray{Float64, 2, Matrix{Float64}, Tuple{UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}}, CartesianIndex{2}}, flux_face_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, local_values_threaded::Vector{StructArrays.StructVector{SVector{4, Float64}, NTuple{4, Vector{Float64}}, Int64}}, fluxdiff_local_threaded::Vector{Vector{SVector{4, Float64}}}, rhs_local_threaded::Vector{StructArrays.StructVector{SVector{4, Float64}, NTuple{4, Vector{Float64}}, Int64}}})
@ Trixi ~/.julia/packages/Trixi/J5oxT/src/solvers/dgsem_unstructured/sort_boundary_conditions.jl:48
[3] Trixi.UnstructuredSortedBoundaryTypes(boundary_conditions::Dict{Symbol, Any}, cache::@NamedTuple{boundaries::Tuple{}, md::MeshData{2, StartUpDG.VertexMappedMesh{Tri, Tuple{Vector{Float64}, Vector{Float64}}, Matrix{Int32}}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, Matrix{Int64}, Matrix{Float64}, StaticArraysCore.SMatrix{2, 2, Matrix{Float64}, 4}, Matrix{Float64}, Matrix{Int64}, Matrix{Int64}, Vector{Int64}}, Qrst_skew::Tuple{LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}, LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}}, VhP::Matrix{Float64}, Ph::Matrix{Float64}, invJ::Matrix{Float64}, dxidxhatj::StaticArraysCore.SMatrix{2, 2, Matrix{Float64}, 4}, entropy_var_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, projected_entropy_var_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, entropy_projected_u_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, u_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, u_face_values::StructArray{SVector{4, Float64}, 2, NTuple{4, SubArray{Float64, 2, Matrix{Float64}, Tuple{UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}}, CartesianIndex{2}}, flux_face_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, local_values_threaded::Vector{StructArrays.StructVector{SVector{4, Float64}, NTuple{4, Vector{Float64}}, Int64}}, fluxdiff_local_threaded::Vector{Vector{SVector{4, Float64}}}, rhs_local_threaded::Vector{StructArrays.StructVector{SVector{4, Float64}, NTuple{4, Vector{Float64}}, Int64}}})
@ Trixi ~/.julia/packages/Trixi/J5oxT/src/solvers/dgsem_unstructured/sort_boundary_conditions.jl:41
[4] digest_boundary_conditions(boundary_conditions::Dict{Symbol, Any}, mesh::DGMultiMesh{2, Trixi.Affine, MeshData{2, StartUpDG.VertexMappedMesh{Tri, Tuple{Vector{Float64}, Vector{Float64}}, Matrix{Int32}}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, Matrix{Int64}, Matrix{Float64}, StaticArraysCore.SMatrix{2, 2, Matrix{Float64}, 4}, Matrix{Float64}, Matrix{Int64}, Matrix{Int64}, Vector{Int64}}, Dict{Symbol, Vector{Int64}}}, solver::DGMulti{2, Tri, Polynomial{MultidimensionalQuadrature}, SurfaceIntegralWeakForm{FluxLaxFriedrichs{typeof(max_abs_speed_naive)}}, VolumeIntegralFluxDifferencing{typeof(flux_ranocha)}, Nothing, RefElemData{2, Tri, Polynomial{MultidimensionalQuadrature}, Int64, Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, Tuple{Vector{Float64}, Vector{Float64}}, Tuple{Vector{Float64}, Vector{Float64}}, Tuple{Vector{Float64}, Vector{Float64}}, Tuple{Vector{Float64}, Vector{Float64}}, Tuple{Vector{Float64}, Vector{Float64}}, Vector{Int64}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, Tuple{Matrix{Float64}, Matrix{Float64}}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, Vector{Float64}, Vector{Float64}}}, cache::@NamedTuple{boundaries::Tuple{}, md::MeshData{2, StartUpDG.VertexMappedMesh{Tri, Tuple{Vector{Float64}, Vector{Float64}}, Matrix{Int32}}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}, Matrix{Int64}, Matrix{Float64}, StaticArraysCore.SMatrix{2, 2, Matrix{Float64}, 4}, Matrix{Float64}, Matrix{Int64}, Matrix{Int64}, Vector{Int64}}, Qrst_skew::Tuple{LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}, LinearAlgebra.Adjoint{Float64, SparseArrays.SparseMatrixCSC{Float64, Int64}}}, VhP::Matrix{Float64}, Ph::Matrix{Float64}, invJ::Matrix{Float64}, dxidxhatj::StaticArraysCore.SMatrix{2, 2, Matrix{Float64}, 4}, entropy_var_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, projected_entropy_var_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, entropy_projected_u_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, u_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, u_face_values::StructArray{SVector{4, Float64}, 2, NTuple{4, SubArray{Float64, 2, Matrix{Float64}, Tuple{UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}}, CartesianIndex{2}}, flux_face_values::StructArray{SVector{4, Float64}, 2, NTuple{4, Matrix{Float64}}, Int64}, local_values_threaded::Vector{StructArrays.StructVector{SVector{4, Float64}, NTuple{4, Vector{Float64}}, Int64}}, fluxdiff_local_threaded::Vector{Vector{SVector{4, Float64}}}, rhs_local_threaded::Vector{StructArrays.StructVector{SVector{4, Float64}, NTuple{4, Vector{Float64}}, Int64}}})
@ Trixi ~/.julia/packages/Trixi/J5oxT/src/semidiscretization/semidiscretization_hyperbolic.jl:207
[5] top-level scope
@ ~/code/DGMultMeshMWE.jl/src/DGMultMeshMWE.jl:182
in expression starting at ~/code/DGMultMeshMWE.jl/src/DGMultMeshMWE.jl:182
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
Reproduce the failure using the linked DGMultMeshMWE.jl, starting at src/DGMultMeshMWE.jl:182 and comparing the cited Trixi examples. Read Trixi's dgsem_unstructured/sort_boundary_conditions.jl and semidiscretization/semidiscretization_hyperbolic.jl to determine how a DGMultiMesh cache should provide boundary data. Done should be a working Triangulate/StartUpDG mesh setup without the reported missing-boundaries error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100