Skip to content
Snippets Groups Projects
Commit 3eaf3226 authored by Stephan Hilb's avatar Stephan Hilb
Browse files

fix prolongation ldofs

became broken because cells no longer assume ordered vertices
parent 55b9c3aa
Branches
Tags
No related merge requests found
...@@ -287,7 +287,7 @@ function refine!(hmesh::HMesh, marked_cells::Set; fs...) ...@@ -287,7 +287,7 @@ function refine!(hmesh::HMesh, marked_cells::Set; fs...)
end end
# prolong data for refined cells # prolong data for refined cells
for (old_cell, extended_cells) in refined_cells for (old_cell, extended_cells) in refined_cells
for (f, extended_f) in zip(NamedTuple(fs), extended_fs) for extended_f in extended_fs
prolong!(extended_f, old_cell, extended_cells) prolong!(extended_f, old_cell, extended_cells)
end end
end end
...@@ -343,9 +343,12 @@ function prolong!(new_f, old_cell, new_cells, ::P1) ...@@ -343,9 +343,12 @@ function prolong!(new_f, old_cell, new_cells, ::P1)
avg_data = (old_f.data[old_gdofs[:, 1]] .+ old_f.data[old_gdofs[:, 2]]) ./ 2 avg_data = (old_f.data[old_gdofs[:, 1]] .+ old_f.data[old_gdofs[:, 2]]) ./ 2
new_gdofs = new_f.space.dofmap[:, 3, new_cells[1]] _, newldof = findmax(new_cell1_vs)
new_gdofs = new_f.space.dofmap[:, newldof, new_cells[1]]
new_f.data[new_gdofs] .= avg_data new_f.data[new_gdofs] .= avg_data
new_gdofs = new_f.space.dofmap[:, 3, new_cells[2]]
_, newldof = findmax(new_cell2_vs)
new_gdofs = new_f.space.dofmap[:, newldof, new_cells[2]]
new_f.data[new_gdofs] .= avg_data new_f.data[new_gdofs] .= avg_data
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment