@@ -2,62 +2,59 @@ function run_interpolator_tests()
22
33 # list of FETypes that should be tested
44 TestCatalog1D = [
5- L2P0{1 },
6- H1P1{1 },
7- H1P2{1 , 1 },
8- H1P3{1 , 1 },
9- H1Pk{1 , 1 , 3 },
10- H1Pk{1 , 1 , 4 },
11- H1Pk{1 , 1 , 5 },
5+ L2P0{1 } => 0 ,
6+ H1P1{1 } => 1 ,
7+ H1P2{1 , 1 } => 2 ,
8+ H1P3{1 , 1 } => 3 ,
9+ H1Pk{1 , 1 , 3 } => 3 ,
10+ H1Pk{1 , 1 , 4 } => 4 ,
11+ H1Pk{1 , 1 , 5 } => 5
1212 ]
13- ExpectedOrders1D = [0 , 1 , 2 , 3 , 3 , 4 , 5 ]
1413
1514 TestCatalog2D = [
16- HCURLN0{2 },
17- HCURLN1{2 },
18- HDIVRT0{2 },
19- HDIVRTk{2 , 0 },
20- HDIVBDM1{2 },
21- HDIVRT1{2 },
22- HDIVRTk{2 , 1 },
23- HDIVBDM2{2 },
24- HDIVRTk{2 , 2 },
25- HDIVRTk{2 , 3 },
26- HDIVRTk{2 , 4 },
27- L2P0{2 },
28- L2P1{2 },
29- H1P1{2 },
30- H1Q1{2 },
31- H1CR{2 },
32- H1MINI{2 , 2 },
33- H1P1TEB{2 },
34- H1BR{2 },
35- H1P2{2 , 2 },
36- H1P2B{2 , 2 },
37- H1Q2{2 , 2 },
38- H1P3{2 , 2 },
39- H1Pk{2 , 2 , 3 },
40- H1Pk{2 , 2 , 4 },
41- H1Pk{2 , 2 , 5 },
15+ HCURLN0{2 } => 0 ,
16+ HCURLN1{2 } => 1 ,
17+ HDIVRT0{2 } => 0 ,
18+ HDIVRTk{2 , 0 } => 0 ,
19+ HDIVBDM1{2 } => 1 ,
20+ HDIVRT1{2 } => 1 ,
21+ HDIVRTk{2 , 1 } => 1 ,
22+ HDIVBDM2{2 } => 2 ,
23+ HDIVRTk{2 , 2 } => 2 ,
24+ HDIVRTk{2 , 3 } => 3 ,
25+ HDIVRTk{2 , 4 } => 4 ,
26+ L2P0{2 } => 0 ,
27+ L2P1{2 } => 1 ,
28+ H1P1{2 } => 1 ,
29+ H1Q1{2 } => 1 ,
30+ H1CR{2 } => 1 ,
31+ H1MINI{2 , 2 } => 1 ,
32+ H1P1TEB{2 } => 1 ,
33+ H1BR{2 } => 1 ,
34+ H1P2{2 , 2 } => 2 ,
35+ H1P2B{2 , 2 } => 2 ,
36+ H1Q2{2 , 2 } => 2 ,
37+ H1P3{2 , 2 } => 3 ,
38+ H1Pk{2 , 2 , 3 } => 3 ,
39+ H1Pk{2 , 2 , 4 } => 4 ,
40+ H1Pk{2 , 2 , 5 } => 5
4241 ]
43- ExpectedOrders2D = [0 , 1 , 0 , 0 , 1 , 1 , 1 , 2 , 2 , 3 , 4 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 3 , 3 , 4 , 5 ]
4442
4543 TestCatalog3D = [
46- HCURLN0{3 },
47- HDIVRT0{3 },
48- HDIVBDM1{3 },
49- HDIVRT1{3 },
50- L2P0{3 },
51- H1P1{3 },
52- H1Q1{3 },
53- H1CR{3 },
54- H1MINI{3 , 3 },
55- H1P1TEB{3 },
56- H1BR{3 },
57- H1P2{3 , 3 },
58- H1P3{3 , 3 },
44+ HCURLN0{3 } => 0 ,
45+ HDIVRT0{3 } => 0 ,
46+ HDIVBDM1{3 } => 1 ,
47+ HDIVRT1{3 } => 1 ,
48+ L2P0{3 } => 0 ,
49+ H1P1{3 } => 1 ,
50+ H1Q1{3 } => 1 ,
51+ H1CR{3 } => 1 ,
52+ H1MINI{3 , 3 } => 1 ,
53+ H1P1TEB{3 } => 1 ,
54+ H1BR{3 } => 1 ,
55+ H1P2{3 , 3 } => 2 ,
56+ H1P3{3 , 3 } => 3
5957 ]
60- ExpectedOrders3D = [0 , 0 , 1 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 3 ]
6158
6259 # # function that computes errors at enough quadrature points for polynomial of degree order
6360 function compute_error(uh:: FEVectorBlock , u:: Function , order = get_polynomialorder(get_FEType(uh), uh. FES. xgrid[CellGeometries][1 ]))
@@ -123,8 +120,8 @@ function run_interpolator_tests()
123120 println(" ============================" )
124121 xgrid = testgrid(Edge1D)
125122 for n in 1 : length(TestCatalog1D)
126- test_interpolation(xgrid, TestCatalog1D[n], ExpectedOrders1D [n])
127- test_interpolation(xgrid, TestCatalog1D[n], ExpectedOrders1D [n], true )
123+ test_interpolation(xgrid, TestCatalog1D[n]. first, TestCatalog1D [n]. second )
124+ test_interpolation(xgrid, TestCatalog1D[n]. first, TestCatalog1D [n]. second , true )
128125 end
129126 println(" \n " )
130127 println(" ============================" )
@@ -134,8 +131,8 @@ function run_interpolator_tests()
134131 xgrid = uniform_refine(reference_domain(EG), 1 )
135132 println(" EG = $EG " )
136133 for n in 1 : length(TestCatalog2D), broken in (false , true )
137- if ExtendableFEMBase. isdefined(TestCatalog2D[n], EG, broken)
138- test_interpolation(xgrid, TestCatalog2D[n], ExpectedOrders2D [n], broken)
134+ if ExtendableFEMBase. isdefined(TestCatalog2D[n]. first , EG, broken)
135+ test_interpolation(xgrid, TestCatalog2D[n]. first, TestCatalog2D [n]. second , broken)
139136 else
140137 @warn " $(TestCatalog2D[n]) (broken = $broken ) not defined on $EG (skipping test case)"
141138 end
@@ -148,8 +145,8 @@ function run_interpolator_tests()
148145 for EG in [Tetrahedron3D, Parallelepiped3D]
149146 xgrid = uniform_refine(reference_domain(EG), 1 )
150147 for n in 1 : length(TestCatalog3D), broken in (false , true )
151- if ExtendableFEMBase. isdefined(TestCatalog3D[n], EG, broken)
152- test_interpolation(xgrid, TestCatalog3D[n], ExpectedOrders3D [n], broken)
148+ if ExtendableFEMBase. isdefined(TestCatalog3D[n]. first , EG, broken)
149+ test_interpolation(xgrid, TestCatalog3D[n]. first, TestCatalog3D [n]. second , broken)
153150 else
154151 @warn " $(TestCatalog3D[n]) (broken = $broken ) not defined on $EG (skipping test case)"
155152 end
0 commit comments