Skip to content

Commit 31e222f

Browse files
authored
Merge pull request #645 from gridap/fixing_a_potential_typo_in_discrete_model_portion
Fixing inheritance relationship in DiscreteModelPortion data type
2 parents d35b82e + 76699cd commit 31e222f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/Geometry/DiscreteModelPortions.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
"""
33
"""
4-
struct DiscreteModelPortion{Dc,Dp} <: DiscreteModel{Dc,Dc}
4+
struct DiscreteModelPortion{Dc,Dp} <: DiscreteModel{Dc,Dp}
55
model::DiscreteModel{Dc,Dp}
66
parent_model::DiscreteModel{Dc,Dp}
77
d_to_dface_to_parent_dface::Vector{Vector{Int}}

test/GeometryTests/DiscreteModelPortionsTests.jl

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module DiscreteModelPortionsTests
33
using Gridap.Arrays
44
using Gridap.ReferenceFEs
55
using Gridap.Geometry
6+
using Test
67

78
domain = (0,2,0,2,0,2)
89
partition = (10,10,10)
@@ -24,6 +25,16 @@ oldcell_to_mask = lazy_map(is_in,oldcell_to_coods)
2425
model = DiscreteModelPortion(oldmodel,oldcell_to_mask)
2526
test_discrete_model(model)
2627

28+
model=DiscreteModel(Polytope{2},oldmodel)
29+
labels=get_face_labeling(oldmodel)
30+
bgface_to_mask = get_face_mask(labels,[22,23],2)
31+
model = DiscreteModelPortion(model,bgface_to_mask)
32+
test_discrete_model(model)
33+
@test num_cell_dims(model) == 2
34+
@test num_point_dims(model) == 3
35+
36+
37+
2738
#using Gridap.Visualization
2839
#
2940
#writevtk(model,"model")

0 commit comments

Comments
 (0)