From: Peter Munch Date: Sat, 14 Oct 2023 17:29:31 +0000 (+0200) Subject: Remove useless (hp::DoFHandler) test X-Git-Tag: relicensing~396^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16140%2Fhead;p=dealii.git Remove useless (hp::DoFHandler) test --- diff --git a/tests/hp/n_dofs.cc b/tests/hp/n_dofs.cc deleted file mode 100644 index 143bb6ddc3..0000000000 --- a/tests/hp/n_dofs.cc +++ /dev/null @@ -1,185 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2005 - 2020 by the deal.II authors -// -// This file is part of the deal.II library. -// -// The deal.II library is free software; you can use it, redistribute -// it, and/or modify it under the terms of the GNU Lesser General -// Public License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// The full text of the license can be found in the file LICENSE.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - - -// check that even for wickedly complicated finite elements the -// hp::DoFHandler allocates the same number of degrees of freedom as a -// ::DoFHandler, as long as the same element is used on all cells - - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "../tests.h" - - - -template -void -test(const FiniteElement &fe) -{ - Triangulation tria; - GridGenerator::hyper_cube(tria); - tria.refine_global(2); - tria.begin_active()->set_refine_flag(); - tria.execute_coarsening_and_refinement(); - tria.refine_global(1); - - const hp::FECollection fe_collection(fe); - - DoFHandler hp_dof_handler(tria); - hp_dof_handler.distribute_dofs(fe_collection); - - DoFHandler dof_handler(tria); - dof_handler.distribute_dofs(fe); - - deallog << fe.get_name() << ' ' << dof_handler.n_dofs() << ' ' - << hp_dof_handler.n_dofs() << std::endl; - - Assert(dof_handler.n_dofs() == hp_dof_handler.n_dofs(), ExcInternalError()); -} - - - -#define CHECK(EL, deg, dim) \ - { \ - FE_##EL EL(deg); \ - test(EL); \ - } - -#define CHECK_SYS1(sub1, N1, dim) \ - { \ - FESystem q(sub1, N1); \ - test(q); \ - } - -#define CHECK_SYS2(sub1, N1, sub2, N2, dim) \ - { \ - FESystem q(sub1, N1, sub2, N2); \ - test(q); \ - } - -#define CHECK_SYS3(sub1, N1, sub2, N2, sub3, N3, dim) \ - { \ - FESystem q(sub1, N1, sub2, N2, sub3, N3); \ - test(q); \ - } - - -#define CHECK_ALL(EL, deg) \ - { \ - CHECK(EL, deg, 1); \ - CHECK(EL, deg, 2); \ - CHECK(EL, deg, 3); \ - } - - - -int -main() -{ - initlog(); - deallog.get_file_stream().precision(2); - - CHECK_ALL(Q, 1); - CHECK_ALL(Q, 2); - CHECK_ALL(Q, 3); - - CHECK_ALL(DGQ, 0); - CHECK_ALL(DGQ, 1); - CHECK_ALL(DGQ, 3); - - CHECK_ALL(DGP, 0); - CHECK_ALL(DGP, 1); - CHECK_ALL(DGP, 3); - - CHECK(Nedelec, 0, 2); - CHECK(Nedelec, 0, 3); - - CHECK(RaviartThomas, 0, 2); - CHECK(RaviartThomas, 1, 2); - CHECK(RaviartThomas, 2, 2); - CHECK(RaviartThomas, 0, 3); - CHECK(RaviartThomas, 1, 3); - CHECK(RaviartThomas, 2, 3); - - CHECK_SYS1(FE_Q<1>(1), 3, 1); - CHECK_SYS1(FE_DGQ<1>(2), 2, 1); - CHECK_SYS1(FE_DGP<1>(3), 1, 1); - - CHECK_SYS1(FE_Q<2>(1), 3, 2); - CHECK_SYS1(FE_DGQ<2>(2), 2, 2); - CHECK_SYS1(FE_DGP<2>(3), 1, 2); - - CHECK_SYS1(FE_Q<3>(1), 3, 3); - CHECK_SYS1(FE_DGQ<3>(2), 2, 3); - CHECK_SYS1(FE_DGP<3>(3), 1, 3); - - - CHECK_SYS2(FE_Q<1>(1), 3, FE_DGQ<1>(2), 2, 1); - CHECK_SYS2(FE_DGQ<1>(2), 2, FE_DGP<1>(3), 1, 1); - CHECK_SYS2(FE_DGP<1>(3), 1, FE_DGQ<1>(2), 2, 1); - - CHECK_SYS2(FE_Q<2>(1), 3, FE_DGQ<2>(2), 2, 2); - CHECK_SYS2(FE_DGQ<2>(2), 2, FE_DGP<2>(3), 1, 2); - CHECK_SYS2(FE_DGP<2>(3), 1, FE_DGQ<2>(2), 2, 2); - - CHECK_SYS3(FE_Q<1>(1), 3, FE_DGP<1>(3), 1, FE_Q<1>(1), 3, 1); - CHECK_SYS3(FE_DGQ<1>(2), 2, FE_DGQ<1>(2), 2, FE_Q<1>(3), 3, 1); - CHECK_SYS3(FE_DGP<1>(3), 1, FE_DGP<1>(3), 1, FE_Q<1>(2), 3, 1); - - CHECK_SYS3(FE_Q<2>(1), 3, FE_DGP<2>(3), 1, FE_Q<2>(1), 3, 2); - CHECK_SYS3(FE_DGQ<2>(2), 2, FE_DGQ<2>(2), 2, FE_Q<2>(3), 3, 2); - CHECK_SYS3(FE_DGP<2>(3), 1, FE_DGP<2>(3), 1, FE_Q<2>(2), 3, 2); - - CHECK_SYS3(FE_DGQ<3>(1), 3, FE_DGP<3>(3), 1, FE_Q<3>(1), 3, 3); - - // systems of systems - CHECK_SYS3( - (FESystem<2>(FE_Q<2>(1), 3)), 3, FE_DGQ<2>(0), 1, FE_Q<2>(1), 3, 2); - CHECK_SYS3(FE_DGQ<2>(3), - 1, - FESystem<2>(FE_DGQ<2>(0), 3), - 1, - FESystem<2>(FE_Q<2>(2), 1, FE_DGQ<2>(0), 1), - 2, - 2); - - // systems with Nedelec elements - CHECK_SYS2(FE_DGQ<2>(3), 1, FE_Nedelec<2>(0), 2, 2); - CHECK_SYS3(FE_Nedelec<2>(0), - 1, - FESystem<2>(FE_DGQ<2>(1), 2), - 1, - FESystem<2>(FE_Q<2>(2), 1, FE_Nedelec<2>(0), 2), - 2, - 2); - - deallog << "OK" << std::endl; -} diff --git a/tests/hp/n_dofs.output b/tests/hp/n_dofs.output deleted file mode 100644 index 3145e97873..0000000000 --- a/tests/hp/n_dofs.output +++ /dev/null @@ -1,63 +0,0 @@ - -DEAL::FE_Q<1>(1) 11 11 -DEAL::FE_Q<2>(1) 97 97 -DEAL::FE_Q<3>(1) 827 827 -DEAL::FE_Q<1>(2) 21 21 -DEAL::FE_Q<2>(2) 349 349 -DEAL::FE_Q<3>(2) 5559 5559 -DEAL::FE_Q<1>(3) 31 31 -DEAL::FE_Q<2>(3) 753 753 -DEAL::FE_Q<3>(3) 17587 17587 -DEAL::FE_DGQ<1>(0) 10 10 -DEAL::FE_DGQ<2>(0) 76 76 -DEAL::FE_DGQ<3>(0) 568 568 -DEAL::FE_DGQ<1>(1) 20 20 -DEAL::FE_DGQ<2>(1) 304 304 -DEAL::FE_DGQ<3>(1) 4544 4544 -DEAL::FE_DGQ<1>(3) 40 40 -DEAL::FE_DGQ<2>(3) 1216 1216 -DEAL::FE_DGQ<3>(3) 36352 36352 -DEAL::FE_DGP<1>(0) 10 10 -DEAL::FE_DGP<2>(0) 76 76 -DEAL::FE_DGP<3>(0) 568 568 -DEAL::FE_DGP<1>(1) 20 20 -DEAL::FE_DGP<2>(1) 228 228 -DEAL::FE_DGP<3>(1) 2272 2272 -DEAL::FE_DGP<1>(3) 40 40 -DEAL::FE_DGP<2>(3) 760 760 -DEAL::FE_DGP<3>(3) 11360 11360 -DEAL::FE_Nedelec<2>(0) 176 176 -DEAL::FE_Nedelec<3>(0) 2220 2220 -DEAL::FE_RaviartThomas<2>(0) 176 176 -DEAL::FE_RaviartThomas<2>(1) 656 656 -DEAL::FE_RaviartThomas<2>(2) 1440 1440 -DEAL::FE_RaviartThomas<3>(0) 1944 1944 -DEAL::FE_RaviartThomas<3>(1) 14592 14592 -DEAL::FE_RaviartThomas<3>(2) 48168 48168 -DEAL::FESystem<1>[FE_Q<1>(1)^3] 33 33 -DEAL::FESystem<1>[FE_DGQ<1>(2)^2] 60 60 -DEAL::FESystem<1>[FE_DGP<1>(3)] 40 40 -DEAL::FESystem<2>[FE_Q<2>(1)^3] 291 291 -DEAL::FESystem<2>[FE_DGQ<2>(2)^2] 1368 1368 -DEAL::FESystem<2>[FE_DGP<2>(3)] 760 760 -DEAL::FESystem<3>[FE_Q<3>(1)^3] 2481 2481 -DEAL::FESystem<3>[FE_DGQ<3>(2)^2] 30672 30672 -DEAL::FESystem<3>[FE_DGP<3>(3)] 11360 11360 -DEAL::FESystem<1>[FE_Q<1>(1)^3-FE_DGQ<1>(2)^2] 93 93 -DEAL::FESystem<1>[FE_DGQ<1>(2)^2-FE_DGP<1>(3)] 100 100 -DEAL::FESystem<1>[FE_DGP<1>(3)-FE_DGQ<1>(2)^2] 100 100 -DEAL::FESystem<2>[FE_Q<2>(1)^3-FE_DGQ<2>(2)^2] 1659 1659 -DEAL::FESystem<2>[FE_DGQ<2>(2)^2-FE_DGP<2>(3)] 2128 2128 -DEAL::FESystem<2>[FE_DGP<2>(3)-FE_DGQ<2>(2)^2] 2128 2128 -DEAL::FESystem<1>[FE_Q<1>(1)^3-FE_DGP<1>(3)-FE_Q<1>(1)^3] 106 106 -DEAL::FESystem<1>[FE_DGQ<1>(2)^2-FE_DGQ<1>(2)^2-FE_Q<1>(3)^3] 213 213 -DEAL::FESystem<1>[FE_DGP<1>(3)-FE_DGP<1>(3)-FE_Q<1>(2)^3] 143 143 -DEAL::FESystem<2>[FE_Q<2>(1)^3-FE_DGP<2>(3)-FE_Q<2>(1)^3] 1342 1342 -DEAL::FESystem<2>[FE_DGQ<2>(2)^2-FE_DGQ<2>(2)^2-FE_Q<2>(3)^3] 4995 4995 -DEAL::FESystem<2>[FE_DGP<2>(3)-FE_DGP<2>(3)-FE_Q<2>(2)^3] 2567 2567 -DEAL::FESystem<3>[FE_DGQ<3>(1)^3-FE_DGP<3>(3)-FE_Q<3>(1)^3] 27473 27473 -DEAL::FESystem<2>[FESystem<2>[FE_Q<2>(1)^3]^3-FE_DGQ<2>(0)-FE_Q<2>(1)^3] 1240 1240 -DEAL::FESystem<2>[FE_DGQ<2>(3)-FESystem<2>[FE_DGQ<2>(0)^3]-FESystem<2>[FE_Q<2>(2)-FE_DGQ<2>(0)]^2] 2294 2294 -DEAL::FESystem<2>[FE_DGQ<2>(3)-FE_Nedelec<2>(0)^2] 1568 1568 -DEAL::FESystem<2>[FE_Nedelec<2>(0)-FESystem<2>[FE_DGQ<2>(1)^2]-FESystem<2>[FE_Q<2>(2)-FE_Nedelec<2>(0)^2]^2] 2186 2186 -DEAL::OK