Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a test to RefinementRulesTests.jl that fails and should not #921

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Adaptivity/EdgeBasedRefinement.jl
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,10 @@ _has_interior_point(rr::RefinementRule,::RefinementRuleType) = false
"""
RefinementRule representing a non-refined cell.
"""
function WhiteRefinementRule(p::Polytope)
ref_grid = UnstructuredDiscreteModel(UnstructuredGrid(LagrangianRefFE(Float64,p,1)))
return RefinementRule(WithoutRefinement(),p,ref_grid)
function WhiteRefinementRule(p::Polytope{D}) where {D}
partition = tfill(1,Val{D}())
ref_grid = UnstructuredGrid(compute_reference_grid(p,partition))
RefinementRule(WithoutRefinement(),p,ref_grid)
end

"""
Expand Down
3 changes: 3 additions & 0 deletions test/AdaptivityTests/RefinementRulesTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ for poly in polys
rr_red = Adaptivity.RedRefinementRule(poly)
Adaptivity.test_refinement_rule(rr_red)

rrules=[rr_generic, rr_white, rr_red]
@test isconcretetype(eltype(rrules))

n_edges = num_faces(poly,1)
for e in 1:n_edges
rr_green = Adaptivity.GreenRefinementRule(poly,e)
Expand Down