Skip to content

Commit

Permalink
Added commentson next steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCan committed Oct 18, 2024
1 parent a5ce210 commit 4b04cd2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/meshes/p4est_mesh_view.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ A view on a p4est mesh.
mutable struct P4estMeshView{NDIMS, NDIMS_AMBIENT, RealT <: Real, Parent} <: AbstractMesh{NDIMS}
parent::Parent
cell_ids::Vector{Int}
# SC: After some thought, we might need to create a p4est pointer to p4est data
# conatining the data from the view.

Check warning on line 15 in src/meshes/p4est_mesh_view.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"conatining" should be "containing".
# unsaved_changes::Bool
end

Expand All @@ -22,6 +24,8 @@ function P4estMeshView(parent::P4estMesh{NDIMS, NDIMS_AMBIENT, RealT}) where {ND
cell_ids[i] = i
end

# SC: Since we need a p4est pointer no the modified (view) p4est data, we might need a function
# like connectivity_structured that computes the connectivity.
return P4estMeshView{NDIMS, NDIMS_AMBIENT, RealT, typeof(parent)}(parent, cell_ids)#, parent.unsaved_changes)
end

Expand Down
2 changes: 2 additions & 0 deletions src/solvers/dgsem_p4est/containers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ function init_surfaces!(interfaces, mortars, boundaries, mesh::P4estMeshView)
iter_face_c = cfunction(init_surfaces_iter_face, Val(ndims(mesh)))
user_data = InitSurfacesIterFaceUserData(interfaces, mortars, boundaries, mesh.parent)

# SC: After adding p4est ponter to the view we should change this.

Check warning on line 533 in src/solvers/dgsem_p4est/containers.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"ponter" should be "pointer".
iterate_p4est(mesh.parent.p4est, user_data; iter_face_c = iter_face_c)

return interfaces
Expand Down Expand Up @@ -722,6 +723,7 @@ function count_required_surfaces(mesh::P4estMeshView)
# interfaces, mortars, boundaries
user_data = [0, 0, 0]

# SC: After adding p4est ponter to the view we should change this.

Check warning on line 726 in src/solvers/dgsem_p4est/containers.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"ponter" should be "pointer".
iterate_p4est(mesh.parent.p4est, user_data; iter_face_c = iter_face_c)

# Return counters
Expand Down
2 changes: 0 additions & 2 deletions src/solvers/dgsem_p4est/containers_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ function calc_node_coordinates!(node_coordinates,
p4est_root_len = 1 << P4EST_MAXLEVEL
p4est_quadrant_len(l) = 1 << (P4EST_MAXLEVEL - l)

# SC: It seems that here we need to make some serious changes so it works
# with P4estMeshView without touching the p4est struct.
trees = unsafe_wrap_sc(p4est_tree_t, mesh.parent.p4est.trees)[mesh.cell_ids]

for tree in eachindex(trees)
Expand Down

0 comments on commit 4b04cd2

Please sign in to comment.