Skip to content

Commit

Permalink
Merge pull request #645 from gridap/fixing_a_potential_typo_in_discre…
Browse files Browse the repository at this point in the history
…te_model_portion

Fixing inheritance relationship in DiscreteModelPortion data type
  • Loading branch information
fverdugo authored Aug 18, 2021
2 parents d35b82e + 76699cd commit 31e222f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Geometry/DiscreteModelPortions.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

"""
"""
struct DiscreteModelPortion{Dc,Dp} <: DiscreteModel{Dc,Dc}
struct DiscreteModelPortion{Dc,Dp} <: DiscreteModel{Dc,Dp}
model::DiscreteModel{Dc,Dp}
parent_model::DiscreteModel{Dc,Dp}
d_to_dface_to_parent_dface::Vector{Vector{Int}}
Expand Down
11 changes: 11 additions & 0 deletions test/GeometryTests/DiscreteModelPortionsTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module DiscreteModelPortionsTests
using Gridap.Arrays
using Gridap.ReferenceFEs
using Gridap.Geometry
using Test

domain = (0,2,0,2,0,2)
partition = (10,10,10)
Expand All @@ -24,6 +25,16 @@ oldcell_to_mask = lazy_map(is_in,oldcell_to_coods)
model = DiscreteModelPortion(oldmodel,oldcell_to_mask)
test_discrete_model(model)

model=DiscreteModel(Polytope{2},oldmodel)
labels=get_face_labeling(oldmodel)
bgface_to_mask = get_face_mask(labels,[22,23],2)
model = DiscreteModelPortion(model,bgface_to_mask)
test_discrete_model(model)
@test num_cell_dims(model) == 2
@test num_point_dims(model) == 3



#using Gridap.Visualization
#
#writevtk(model,"model")
Expand Down

0 comments on commit 31e222f

Please sign in to comment.