From: Wolfgang Bangerth Date: Fri, 14 Sep 2012 12:58:32 +0000 (+0000) Subject: Step 4: Remove the original monster testcase. Hurray. X-Git-Tag: v8.0.0~2124 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf252466a562cf65fff490661dd9574a6144e98c;p=dealii.git Step 4: Remove the original monster testcase. Hurray. git-svn-id: https://svn.dealii.org/trunk@26379 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/fe/internals.cc b/tests/fe/internals.cc deleted file mode 100644 index e61873413b..0000000000 --- a/tests/fe/internals.cc +++ /dev/null @@ -1,230 +0,0 @@ -//---------------------------------------------------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 2007, 2008, 2010, 2012 by the deal.II authors -// -// This file is subject to QPL and may not be distributed -// without copyright and license information. Please refer -// to the file deal.II/doc/license.html for the text and -// further information on this license. -// -//---------------------------------------------------------------------- -// -// Compute support points - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -template -void print_formatted (const FullMatrix &A, - const unsigned int precision, - const unsigned int width) -{ - for (unsigned int i=0; i -inline void -check_support (const FiniteElement& finel, const char* name) -{ - Triangulation tr; - GridGenerator::hyper_cube(tr, 0., 1.); - DoFHandler dof (tr); - dof.distribute_dofs (finel); - - deallog << name << '<' << dim << '>' << " cell support points" << std::endl; - - const std::vector > &cell_points = finel.get_unit_support_points (); - - for (unsigned int k=0;k > &face_points = finel.get_unit_face_support_points (); - const std::vector dummy_weights (face_points.size()); - - Quadrature q(face_points, dummy_weights); - - for (unsigned int i=0;i::faces_per_cell;++i) - { - std::vector > q_points (q.get_points().size()); - QProjector::project_to_face (q, i, q_points); - Quadrature qp(q_points); - deallog << name << '<' << dim << '>' << " face " << i - << " support points" << std::endl; - - for (unsigned int k=0; k -inline void -check_matrices (FiniteElement& fe, const char* name) -{ - deallog << name << '<' << dim << '>' << " constraint " << std::endl; - print_formatted (fe.constraints(), 7, 10); - - for (unsigned int i=0;i::max_children_per_cell;++i) - { - deallog << name << '<' << dim << '>' << " restriction " << i << std::endl; - if (fe.isotropic_restriction_is_implemented()) - print_formatted (fe.get_restriction_matrix(i), 6, 8); - deallog << name << '<' << dim << '>' << " embedding " << i << std::endl; - if (fe.isotropic_prolongation_is_implemented()) - print_formatted (fe.get_prolongation_matrix(i), 6, 8); - } -} - - -#define CHECK_S(EL,deg,dim) { FE_ ## EL EL(deg); check_support(EL, #EL #deg); } -#define CHECK_M(EL,deg,dim) { FE_ ## EL EL(deg); check_matrices(EL, #EL #deg); } -#define CHECK_ALL(EL,deg,dim) { FE_ ## EL EL(deg); check_support(EL, #EL #deg); \ - check_matrices(EL,#EL #deg); } -#define CHECK_SYS1(sub1,N1,dim) { FESystem q(sub1, N1); check_support(q, #sub1 #N1); \ - check_matrices(q,#sub1 #N1); } -#define CHECK_SYS2(sub1,N1,sub2,N2,dim) { FESystem q(sub1, N1, sub2, N2); \ - check_support(q, #sub1 #N1 #sub2 #N2); \ - check_matrices(q,#sub1 #N1 #sub2 #N2); } -#define CHECK_SYS3(sub1,N1,sub2,N2,sub3,N3,dim) { FESystem q(sub1, N1, sub2, N2, sub3, N3); \ - check_support(q, #sub1 #N1 #sub2 #N2 #sub3 #N3); \ - check_matrices(q,#sub1 #N1 #sub2 #N2 #sub3 #N3); } - -int -main() -{ - std::ofstream logfile("internals/output"); - deallog.attach(logfile); - deallog.depth_console(0); - deallog.threshold_double(1.e-10); - - CHECK_M(DGQ,0,2); - CHECK_M(DGQ,1,2); - CHECK_M(DGQ,2,2); - CHECK_M(DGQ,3,2); - CHECK_M(DGQ,4,2); - - // DGP elements presently have no - // restriction matrices, so cannot - // be tested - CHECK_M(DGP,0,2); - CHECK_M(DGP,1,2); - CHECK_M(DGP,2,2); - CHECK_M(DGP,3,2); - CHECK_M(DGP,4,2); - - CHECK_ALL(Q,1,2); - CHECK_ALL(Q,2,2); - CHECK_ALL(Q,3,2); - - CHECK_ALL(Q_Hierarchical,1,2); - CHECK_ALL(Q_Hierarchical,2,2); - CHECK_ALL(Q_Hierarchical,3,2); - - CHECK_M(DGQ,0,3); - CHECK_M(DGQ,1,3); - CHECK_M(DGQ,2,3); - - // see above - CHECK_M(DGP,0,3); - CHECK_M(DGP,1,3); - CHECK_M(DGP,2,3); - - CHECK_ALL(Q,1,3); - CHECK_ALL(Q,2,3); - - CHECK_ALL(Q_Hierarchical,1,3); - CHECK_ALL(Q_Hierarchical,2,3); - - CHECK_ALL(Nedelec, 0, 2); - CHECK_ALL(Nedelec, 0, 3); - CHECK_ALL(Nedelec, 1, 2); - CHECK_ALL(Nedelec, 1, 3); - - CHECK_ALL(RaviartThomas, 0, 2); - CHECK_ALL(RaviartThomas, 0, 3); - CHECK_ALL(RaviartThomas, 1, 2); - CHECK_ALL(RaviartThomas, 1, 3); - - CHECK_ALL(BDM, 1, 2); - CHECK_ALL(BDM, 2, 2); - - 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_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<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); - - // systems of systems - CHECK_SYS3((FESystem<2>(FE_Q<2>(1),3)), 3, - FE_DGQ<2>(3), 1, - FE_Q<2>(1), 3, - 2); - CHECK_SYS3(FE_DGQ<2>(3), 1, - FESystem<2>(FE_DGQ<2>(3),3), 1, - FESystem<2>(FE_Q<2>(2),3, - 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>(3),3), 1, - FESystem<2>(FE_Q<2>(2),3, - FE_Nedelec<2>(0),2),2, - 2); - CHECK_SYS2 (FE_DGQ<2>(3), 1, - FE_Nedelec<2>(1), 2, - 2); - CHECK_SYS3(FE_Nedelec<2>(1), 1, - FESystem<2>(FE_DGQ<2>(3),3), 1, - FESystem<2>(FE_Q<2>(2),3, - FE_Nedelec<2>(1),2),2, - 2); - - return 0; -}