From: kronbichler Date: Mon, 11 Jul 2011 12:15:19 +0000 (+0000) Subject: Test for avoiding bug in FE_Q with arbitrary nodes: the hp line/quad identities need... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d17b34e88107a7aa1203ca88d9c88eea94d736a3;p=dealii-svn.git Test for avoiding bug in FE_Q with arbitrary nodes: the hp line/quad identities need to be computed from support points, not equidistant points. git-svn-id: https://svn.dealii.org/trunk@23940 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/hp/hp_line_dof_identities_q_gl.cc b/tests/hp/hp_line_dof_identities_q_gl.cc new file mode 100644 index 0000000000..d500515bf8 --- /dev/null +++ b/tests/hp/hp_line_dof_identities_q_gl.cc @@ -0,0 +1,76 @@ +//-------------------- hp_line_dof_identities_q_gl.cc ---------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2005, 2006, 2011 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. +// +//-------------------- hp_line_dof_identities_q.cc ------------------------- + + +// check FE_Q::hp_line_dof_identities for Gauss-Lobatto nodes + + +#include "../tests.h" +#include +#include +#include +#include + +#include + + +template +void test () +{ + hp::FECollection fe_collection; + for (unsigned int i=1; i<8-dim; ++i) + fe_collection.push_back (FE_Q(QGaussLobatto<1>(i+1))); + + for (unsigned int i=0; i > + identities = fe_collection[i].hp_line_dof_identities (fe_collection[j]); + + deallog << "Identities for " + << fe_collection[i].get_name() << " and " + << fe_collection[j].get_name() << ": " + << identities.size() + << std::endl; + + for (unsigned int k=0; k (); + test<2> (); + test<3> (); + + deallog << "OK" << std::endl; +} diff --git a/tests/hp/hp_line_dof_identities_q_gl/cmp/generic b/tests/hp/hp_line_dof_identities_q_gl/cmp/generic new file mode 100644 index 0000000000..acc8becd3c --- /dev/null +++ b/tests/hp/hp_line_dof_identities_q_gl/cmp/generic @@ -0,0 +1,120 @@ + +DEAL::Identities for FE_Q<1>(1) and FE_Q<1>(1): 0 +DEAL::Identities for FE_Q<1>(1) and FE_Q<1>(2): 0 +DEAL::Identities for FE_Q<1>(1) and FE_Q<1>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<1>(1) and FE_Q<1>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<1>(1) and FE_Q<1>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<1>(1) and FE_Q<1>(QGaussLobatto(7)): 0 +DEAL::Identities for FE_Q<1>(2) and FE_Q<1>(1): 0 +DEAL::Identities for FE_Q<1>(2) and FE_Q<1>(2): 1 +DEAL::0 0 +DEAL::Identities for FE_Q<1>(2) and FE_Q<1>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<1>(2) and FE_Q<1>(QGaussLobatto(5)): 1 +DEAL::0 1 +DEAL::Identities for FE_Q<1>(2) and FE_Q<1>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<1>(2) and FE_Q<1>(QGaussLobatto(7)): 1 +DEAL::0 2 +DEAL::Identities for FE_Q<1>(QGaussLobatto(4)) and FE_Q<1>(1): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(4)) and FE_Q<1>(2): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(4)) and FE_Q<1>(QGaussLobatto(4)): 2 +DEAL::0 0 +DEAL::1 1 +DEAL::Identities for FE_Q<1>(QGaussLobatto(4)) and FE_Q<1>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(4)) and FE_Q<1>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(4)) and FE_Q<1>(QGaussLobatto(7)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(5)) and FE_Q<1>(1): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(5)) and FE_Q<1>(2): 1 +DEAL::1 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(5)) and FE_Q<1>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(5)) and FE_Q<1>(QGaussLobatto(5)): 3 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::Identities for FE_Q<1>(QGaussLobatto(5)) and FE_Q<1>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(5)) and FE_Q<1>(QGaussLobatto(7)): 1 +DEAL::1 2 +DEAL::Identities for FE_Q<1>(QGaussLobatto(6)) and FE_Q<1>(1): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(6)) and FE_Q<1>(2): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(6)) and FE_Q<1>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(6)) and FE_Q<1>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(6)) and FE_Q<1>(QGaussLobatto(6)): 4 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::3 3 +DEAL::Identities for FE_Q<1>(QGaussLobatto(6)) and FE_Q<1>(QGaussLobatto(7)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(7)) and FE_Q<1>(1): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(7)) and FE_Q<1>(2): 1 +DEAL::2 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(7)) and FE_Q<1>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(7)) and FE_Q<1>(QGaussLobatto(5)): 1 +DEAL::2 1 +DEAL::Identities for FE_Q<1>(QGaussLobatto(7)) and FE_Q<1>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<1>(QGaussLobatto(7)) and FE_Q<1>(QGaussLobatto(7)): 5 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::3 3 +DEAL::4 4 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(2): 0 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(2): 1 +DEAL::0 0 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(QGaussLobatto(5)): 1 +DEAL::0 1 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(2): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(QGaussLobatto(4)): 2 +DEAL::0 0 +DEAL::1 1 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(2): 1 +DEAL::1 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(QGaussLobatto(5)): 3 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(2): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(QGaussLobatto(6)): 4 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::3 3 +DEAL::Identities for FE_Q<3>(1) and FE_Q<3>(1): 0 +DEAL::Identities for FE_Q<3>(1) and FE_Q<3>(2): 0 +DEAL::Identities for FE_Q<3>(1) and FE_Q<3>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<3>(1) and FE_Q<3>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<3>(2) and FE_Q<3>(1): 0 +DEAL::Identities for FE_Q<3>(2) and FE_Q<3>(2): 1 +DEAL::0 0 +DEAL::Identities for FE_Q<3>(2) and FE_Q<3>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<3>(2) and FE_Q<3>(QGaussLobatto(5)): 1 +DEAL::0 1 +DEAL::Identities for FE_Q<3>(QGaussLobatto(4)) and FE_Q<3>(1): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(4)) and FE_Q<3>(2): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(4)) and FE_Q<3>(QGaussLobatto(4)): 2 +DEAL::0 0 +DEAL::1 1 +DEAL::Identities for FE_Q<3>(QGaussLobatto(4)) and FE_Q<3>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(5)) and FE_Q<3>(1): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(5)) and FE_Q<3>(2): 1 +DEAL::1 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(5)) and FE_Q<3>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(5)) and FE_Q<3>(QGaussLobatto(5)): 3 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::OK diff --git a/tests/hp/hp_quad_dof_identities_q_gl.cc b/tests/hp/hp_quad_dof_identities_q_gl.cc new file mode 100644 index 0000000000..3da0b16d24 --- /dev/null +++ b/tests/hp/hp_quad_dof_identities_q_gl.cc @@ -0,0 +1,75 @@ +//-------------------- hp_quad_dof_identities_q_gl.cc ---------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2005, 2006 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. +// +//-------------------- hp_quad_dof_identities_q_gl.cc ---------------------- + + +// check FE_Q::hp_quad_dof_identities for Gauss-Lobatto nodes + + +#include "../tests.h" +#include +#include +#include +#include + +#include + + +template +void test () +{ + hp::FECollection fe_collection; + for (unsigned int i=1; i<8-dim; ++i) + fe_collection.push_back (FE_Q(QGaussLobatto<1>(i+1))); + + for (unsigned int i=0; i > + identities = fe_collection[i].hp_quad_dof_identities (fe_collection[j]); + + deallog << "Identities for " + << fe_collection[i].get_name() << " and " + << fe_collection[j].get_name() << ": " + << identities.size() + << std::endl; + + for (unsigned int k=0; k (); + test<3> (); + + deallog << "OK" << std::endl; +} diff --git a/tests/hp/hp_quad_dof_identities_q_gl/cmp/generic b/tests/hp/hp_quad_dof_identities_q_gl/cmp/generic new file mode 100644 index 0000000000..7f29523d8e --- /dev/null +++ b/tests/hp/hp_quad_dof_identities_q_gl/cmp/generic @@ -0,0 +1,91 @@ + +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(2): 0 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<2>(1) and FE_Q<2>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(2): 1 +DEAL::0 0 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(QGaussLobatto(5)): 1 +DEAL::0 4 +DEAL::Identities for FE_Q<2>(2) and FE_Q<2>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(2): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(QGaussLobatto(4)): 4 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::3 3 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(4)) and FE_Q<2>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(2): 1 +DEAL::4 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(QGaussLobatto(5)): 9 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::3 3 +DEAL::4 4 +DEAL::5 5 +DEAL::6 6 +DEAL::7 7 +DEAL::8 8 +DEAL::Identities for FE_Q<2>(QGaussLobatto(5)) and FE_Q<2>(QGaussLobatto(6)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(1): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(2): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<2>(QGaussLobatto(6)) and FE_Q<2>(QGaussLobatto(6)): 16 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::3 3 +DEAL::4 4 +DEAL::5 5 +DEAL::6 6 +DEAL::7 7 +DEAL::8 8 +DEAL::9 9 +DEAL::10 10 +DEAL::11 11 +DEAL::12 12 +DEAL::13 13 +DEAL::14 14 +DEAL::15 15 +DEAL::Identities for FE_Q<3>(1) and FE_Q<3>(1): 0 +DEAL::Identities for FE_Q<3>(1) and FE_Q<3>(2): 0 +DEAL::Identities for FE_Q<3>(1) and FE_Q<3>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<3>(1) and FE_Q<3>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<3>(2) and FE_Q<3>(1): 0 +DEAL::Identities for FE_Q<3>(2) and FE_Q<3>(2): 1 +DEAL::0 0 +DEAL::Identities for FE_Q<3>(2) and FE_Q<3>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<3>(2) and FE_Q<3>(QGaussLobatto(5)): 1 +DEAL::0 4 +DEAL::Identities for FE_Q<3>(QGaussLobatto(4)) and FE_Q<3>(1): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(4)) and FE_Q<3>(2): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(4)) and FE_Q<3>(QGaussLobatto(4)): 4 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::3 3 +DEAL::Identities for FE_Q<3>(QGaussLobatto(4)) and FE_Q<3>(QGaussLobatto(5)): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(5)) and FE_Q<3>(1): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(5)) and FE_Q<3>(2): 1 +DEAL::4 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(5)) and FE_Q<3>(QGaussLobatto(4)): 0 +DEAL::Identities for FE_Q<3>(QGaussLobatto(5)) and FE_Q<3>(QGaussLobatto(5)): 9 +DEAL::0 0 +DEAL::1 1 +DEAL::2 2 +DEAL::3 3 +DEAL::4 4 +DEAL::5 5 +DEAL::6 6 +DEAL::7 7 +DEAL::8 8 +DEAL::OK