From: David Wells Date: Tue, 15 Oct 2024 19:18:22 +0000 (-0400) Subject: Verify that FE_System<2>(FE_SimplexP<2>(3), N) works. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17785%2Fhead;p=dealii.git Verify that FE_System<2>(FE_SimplexP<2>(3), N) works. This previously threw an index exception. --- diff --git a/tests/simplex/mapping_01.cc b/tests/simplex/mapping_01.cc index f22e63fb8c..2ba9069a00 100644 --- a/tests/simplex/mapping_01.cc +++ b/tests/simplex/mapping_01.cc @@ -48,11 +48,10 @@ public: } }; +template void test(const unsigned int mapping_degree) { - const int dim = 3; - Triangulation tria; GridGenerator::subdivided_hyper_cube_with_simplices(tria, 2); @@ -95,9 +94,19 @@ main() { initlog(); - test(1); // linear mapping + deallog << std::endl << "cubic mapping" << std::endl << std::endl; + + test<2>(3); + + deallog << std::endl << "linear mapping" << std::endl << std::endl; + + test<3>(1); deallog << std::endl << "quadratic mapping" << std::endl << std::endl; - test(2); // quadratic mapping + test<3>(2); + + deallog << std::endl << "cubic mapping" << std::endl << std::endl; + + test<3>(3); } diff --git a/tests/simplex/mapping_01.output b/tests/simplex/mapping_01.output index 88e2683c8c..689788742f 100644 --- a/tests/simplex/mapping_01.output +++ b/tests/simplex/mapping_01.output @@ -1,4 +1,42 @@ +DEAL:: +DEAL::cubic mapping +DEAL:: +DEAL::cell = 0.0 +DEAL::mapped barycenter = 0.666667 0.166667 +DEAL::exact mapped barycenter = 0.666667 0.166667 +DEAL::mapped vertex mean = 0.500000 0.166667 +DEAL::cell = 0.1 +DEAL::mapped barycenter = 1.19936 0.333333 +DEAL::exact mapped barycenter = 1.19936 0.333333 +DEAL::mapped vertex mean = 1.00000 0.333333 +DEAL::cell = 0.2 +DEAL::mapped barycenter = 1.16667 0.166667 +DEAL::exact mapped barycenter = 1.16667 0.166667 +DEAL::mapped vertex mean = 1.00000 0.166667 +DEAL::cell = 0.3 +DEAL::mapped barycenter = 1.69936 0.333333 +DEAL::exact mapped barycenter = 1.69936 0.333333 +DEAL::mapped vertex mean = 1.50000 0.333333 +DEAL::cell = 0.4 +DEAL::mapped barycenter = 1.03269 0.666667 +DEAL::exact mapped barycenter = 1.03269 0.666667 +DEAL::mapped vertex mean = 0.833333 0.666667 +DEAL::cell = 0.5 +DEAL::mapped barycenter = 0.833333 0.833333 +DEAL::exact mapped barycenter = 0.833333 0.833333 +DEAL::mapped vertex mean = 0.666667 0.833333 +DEAL::cell = 0.6 +DEAL::mapped barycenter = 1.53269 0.666667 +DEAL::exact mapped barycenter = 1.53269 0.666667 +DEAL::mapped vertex mean = 1.33333 0.666667 +DEAL::cell = 0.7 +DEAL::mapped barycenter = 1.33333 0.833333 +DEAL::exact mapped barycenter = 1.33333 0.833333 +DEAL::mapped vertex mean = 1.16667 0.833333 +DEAL:: +DEAL::linear mapping +DEAL:: DEAL::cell = 0.0 DEAL::mapped barycenter = 0.375000 0.125000 0.125000 DEAL::exact mapped barycenter = 0.507683 0.125000 0.125000 @@ -322,3 +360,166 @@ DEAL::cell = 0.39 DEAL::mapped barycenter = 1.45711 0.750000 0.750000 DEAL::exact mapped barycenter = 1.45711 0.750000 0.750000 DEAL::mapped vertex mean = 1.25000 0.750000 0.750000 +DEAL:: +DEAL::cubic mapping +DEAL:: +DEAL::cell = 0.0 +DEAL::mapped barycenter = 0.508729 0.125000 0.125000 +DEAL::exact mapped barycenter = 0.507683 0.125000 0.125000 +DEAL::mapped vertex mean = 0.375000 0.125000 0.125000 +DEAL::cell = 0.1 +DEAL::mapped barycenter = 0.758729 0.375000 0.125000 +DEAL::exact mapped barycenter = 0.757683 0.375000 0.125000 +DEAL::mapped vertex mean = 0.625000 0.375000 0.125000 +DEAL::cell = 0.2 +DEAL::mapped barycenter = 1.30010 0.125000 0.375000 +DEAL::exact mapped barycenter = 1.29888 0.125000 0.375000 +DEAL::mapped vertex mean = 1.12500 0.125000 0.375000 +DEAL::cell = 0.3 +DEAL::mapped barycenter = 1.05010 0.375000 0.375000 +DEAL::exact mapped barycenter = 1.04888 0.375000 0.375000 +DEAL::mapped vertex mean = 0.875000 0.375000 0.375000 +DEAL::cell = 0.4 +DEAL::mapped barycenter = 0.955889 0.250000 0.250000 +DEAL::exact mapped barycenter = 0.957107 0.250000 0.250000 +DEAL::mapped vertex mean = 0.750000 0.250000 0.250000 +DEAL::cell = 0.5 +DEAL::mapped barycenter = 1.25873 0.125000 0.125000 +DEAL::exact mapped barycenter = 1.25768 0.125000 0.125000 +DEAL::mapped vertex mean = 1.12500 0.125000 0.125000 +DEAL::cell = 0.6 +DEAL::mapped barycenter = 1.00873 0.375000 0.125000 +DEAL::exact mapped barycenter = 1.00768 0.375000 0.125000 +DEAL::mapped vertex mean = 0.875000 0.375000 0.125000 +DEAL::cell = 0.7 +DEAL::mapped barycenter = 1.55010 0.125000 0.375000 +DEAL::exact mapped barycenter = 1.54888 0.125000 0.375000 +DEAL::mapped vertex mean = 1.37500 0.125000 0.375000 +DEAL::cell = 0.8 +DEAL::mapped barycenter = 1.80010 0.375000 0.375000 +DEAL::exact mapped barycenter = 1.79888 0.375000 0.375000 +DEAL::mapped vertex mean = 1.62500 0.375000 0.375000 +DEAL::cell = 0.9 +DEAL::mapped barycenter = 1.45589 0.250000 0.250000 +DEAL::exact mapped barycenter = 1.45711 0.250000 0.250000 +DEAL::mapped vertex mean = 1.25000 0.250000 0.250000 +DEAL::cell = 0.10 +DEAL::mapped barycenter = 0.758729 0.625000 0.125000 +DEAL::exact mapped barycenter = 0.757683 0.625000 0.125000 +DEAL::mapped vertex mean = 0.625000 0.625000 0.125000 +DEAL::cell = 0.11 +DEAL::mapped barycenter = 0.508729 0.875000 0.125000 +DEAL::exact mapped barycenter = 0.507683 0.875000 0.125000 +DEAL::mapped vertex mean = 0.375000 0.875000 0.125000 +DEAL::cell = 0.12 +DEAL::mapped barycenter = 1.05010 0.625000 0.375000 +DEAL::exact mapped barycenter = 1.04888 0.625000 0.375000 +DEAL::mapped vertex mean = 0.875000 0.625000 0.375000 +DEAL::cell = 0.13 +DEAL::mapped barycenter = 1.30010 0.875000 0.375000 +DEAL::exact mapped barycenter = 1.29888 0.875000 0.375000 +DEAL::mapped vertex mean = 1.12500 0.875000 0.375000 +DEAL::cell = 0.14 +DEAL::mapped barycenter = 0.955889 0.750000 0.250000 +DEAL::exact mapped barycenter = 0.957107 0.750000 0.250000 +DEAL::mapped vertex mean = 0.750000 0.750000 0.250000 +DEAL::cell = 0.15 +DEAL::mapped barycenter = 1.00873 0.625000 0.125000 +DEAL::exact mapped barycenter = 1.00768 0.625000 0.125000 +DEAL::mapped vertex mean = 0.875000 0.625000 0.125000 +DEAL::cell = 0.16 +DEAL::mapped barycenter = 1.25873 0.875000 0.125000 +DEAL::exact mapped barycenter = 1.25768 0.875000 0.125000 +DEAL::mapped vertex mean = 1.12500 0.875000 0.125000 +DEAL::cell = 0.17 +DEAL::mapped barycenter = 1.80010 0.625000 0.375000 +DEAL::exact mapped barycenter = 1.79888 0.625000 0.375000 +DEAL::mapped vertex mean = 1.62500 0.625000 0.375000 +DEAL::cell = 0.18 +DEAL::mapped barycenter = 1.55010 0.875000 0.375000 +DEAL::exact mapped barycenter = 1.54888 0.875000 0.375000 +DEAL::mapped vertex mean = 1.37500 0.875000 0.375000 +DEAL::cell = 0.19 +DEAL::mapped barycenter = 1.45589 0.750000 0.250000 +DEAL::exact mapped barycenter = 1.45711 0.750000 0.250000 +DEAL::mapped vertex mean = 1.25000 0.750000 0.250000 +DEAL::cell = 0.20 +DEAL::mapped barycenter = 1.30010 0.125000 0.625000 +DEAL::exact mapped barycenter = 1.29888 0.125000 0.625000 +DEAL::mapped vertex mean = 1.12500 0.125000 0.625000 +DEAL::cell = 0.21 +DEAL::mapped barycenter = 1.05010 0.375000 0.625000 +DEAL::exact mapped barycenter = 1.04888 0.375000 0.625000 +DEAL::mapped vertex mean = 0.875000 0.375000 0.625000 +DEAL::cell = 0.22 +DEAL::mapped barycenter = 0.508729 0.125000 0.875000 +DEAL::exact mapped barycenter = 0.507683 0.125000 0.875000 +DEAL::mapped vertex mean = 0.375000 0.125000 0.875000 +DEAL::cell = 0.23 +DEAL::mapped barycenter = 0.758729 0.375000 0.875000 +DEAL::exact mapped barycenter = 0.757683 0.375000 0.875000 +DEAL::mapped vertex mean = 0.625000 0.375000 0.875000 +DEAL::cell = 0.24 +DEAL::mapped barycenter = 0.955889 0.250000 0.750000 +DEAL::exact mapped barycenter = 0.957107 0.250000 0.750000 +DEAL::mapped vertex mean = 0.750000 0.250000 0.750000 +DEAL::cell = 0.25 +DEAL::mapped barycenter = 1.55010 0.125000 0.625000 +DEAL::exact mapped barycenter = 1.54888 0.125000 0.625000 +DEAL::mapped vertex mean = 1.37500 0.125000 0.625000 +DEAL::cell = 0.26 +DEAL::mapped barycenter = 1.80010 0.375000 0.625000 +DEAL::exact mapped barycenter = 1.79888 0.375000 0.625000 +DEAL::mapped vertex mean = 1.62500 0.375000 0.625000 +DEAL::cell = 0.27 +DEAL::mapped barycenter = 1.25873 0.125000 0.875000 +DEAL::exact mapped barycenter = 1.25768 0.125000 0.875000 +DEAL::mapped vertex mean = 1.12500 0.125000 0.875000 +DEAL::cell = 0.28 +DEAL::mapped barycenter = 1.00873 0.375000 0.875000 +DEAL::exact mapped barycenter = 1.00768 0.375000 0.875000 +DEAL::mapped vertex mean = 0.875000 0.375000 0.875000 +DEAL::cell = 0.29 +DEAL::mapped barycenter = 1.45589 0.250000 0.750000 +DEAL::exact mapped barycenter = 1.45711 0.250000 0.750000 +DEAL::mapped vertex mean = 1.25000 0.250000 0.750000 +DEAL::cell = 0.30 +DEAL::mapped barycenter = 1.05010 0.625000 0.625000 +DEAL::exact mapped barycenter = 1.04888 0.625000 0.625000 +DEAL::mapped vertex mean = 0.875000 0.625000 0.625000 +DEAL::cell = 0.31 +DEAL::mapped barycenter = 1.30010 0.875000 0.625000 +DEAL::exact mapped barycenter = 1.29888 0.875000 0.625000 +DEAL::mapped vertex mean = 1.12500 0.875000 0.625000 +DEAL::cell = 0.32 +DEAL::mapped barycenter = 0.758729 0.625000 0.875000 +DEAL::exact mapped barycenter = 0.757683 0.625000 0.875000 +DEAL::mapped vertex mean = 0.625000 0.625000 0.875000 +DEAL::cell = 0.33 +DEAL::mapped barycenter = 0.508729 0.875000 0.875000 +DEAL::exact mapped barycenter = 0.507683 0.875000 0.875000 +DEAL::mapped vertex mean = 0.375000 0.875000 0.875000 +DEAL::cell = 0.34 +DEAL::mapped barycenter = 0.955889 0.750000 0.750000 +DEAL::exact mapped barycenter = 0.957107 0.750000 0.750000 +DEAL::mapped vertex mean = 0.750000 0.750000 0.750000 +DEAL::cell = 0.35 +DEAL::mapped barycenter = 1.80010 0.625000 0.625000 +DEAL::exact mapped barycenter = 1.79888 0.625000 0.625000 +DEAL::mapped vertex mean = 1.62500 0.625000 0.625000 +DEAL::cell = 0.36 +DEAL::mapped barycenter = 1.55010 0.875000 0.625000 +DEAL::exact mapped barycenter = 1.54888 0.875000 0.625000 +DEAL::mapped vertex mean = 1.37500 0.875000 0.625000 +DEAL::cell = 0.37 +DEAL::mapped barycenter = 1.00873 0.625000 0.875000 +DEAL::exact mapped barycenter = 1.00768 0.625000 0.875000 +DEAL::mapped vertex mean = 0.875000 0.625000 0.875000 +DEAL::cell = 0.38 +DEAL::mapped barycenter = 1.25873 0.875000 0.875000 +DEAL::exact mapped barycenter = 1.25768 0.875000 0.875000 +DEAL::mapped vertex mean = 1.12500 0.875000 0.875000 +DEAL::cell = 0.39 +DEAL::mapped barycenter = 1.45589 0.750000 0.750000 +DEAL::exact mapped barycenter = 1.45711 0.750000 0.750000 +DEAL::mapped vertex mean = 1.25000 0.750000 0.750000