From: Wolfgang Bangerth Date: Mon, 5 May 2003 13:49:41 +0000 (+0000) Subject: Add fe_?.cc X-Git-Tag: v8.0.0~16583 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e26f4b54f6f116001dcf9731e7874ef33dc928e;p=dealii.git Add fe_?.cc git-svn-id: https://svn.dealii.org/trunk@7561 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/fe/Makefile b/tests/fe/Makefile index 3b24bd6a26..21d95d4ae9 100644 --- a/tests/fe/Makefile +++ b/tests/fe/Makefile @@ -33,13 +33,16 @@ mapping_q1_eulerian.exe : mapping_q1_eulerian.g.$(OBJEXT) $(libraries) nedelec.exe : nedelec.g.$(OBJEXT) $(libraries) nedelec_2.exe : nedelec_2.g.$(OBJEXT) $(libraries) nedelec_3.exe : nedelec_3.g.$(OBJEXT) $(libraries) +non_primitive_1.exe : non_primitive_1.g.$(OBJEXT) $(libraries) +non_primitive_2.exe : non_primitive_2.g.$(OBJEXT) $(libraries) +numbering.exe : numbering.g.$(OBJEXT) $(libraries) +q_1.exe : q_1.g.$(OBJEXT) $(libraries) +q_2.exe : q_2.g.$(OBJEXT) $(libraries) +q_3.exe : q_3.g.$(OBJEXT) $(libraries) rt_1.exe : rt_1.g.$(OBJEXT) $(libraries) rt_2.exe : rt_2.g.$(OBJEXT) $(libraries) rt_3.exe : rt_3.g.$(OBJEXT) $(libraries) rt_4.exe : rt_4.g.$(OBJEXT) $(libraries) -non_primitive_1.exe : non_primitive_1.g.$(OBJEXT) $(libraries) -non_primitive_2.exe : non_primitive_2.g.$(OBJEXT) $(libraries) -numbering.exe : numbering.g.$(OBJEXT) $(libraries) shapes.exe : shapes.g.$(OBJEXT) $(libraries) transfer.exe : transfer.g.$(OBJEXT) $(libraries) up_and_down.exe : up_and_down.g.$(OBJEXT) $(libraries) @@ -47,6 +50,7 @@ up_and_down.exe : up_and_down.g.$(OBJEXT) $(libraries) tests = fe_data_test fe_traits fe_tools_test mapping \ mapping_c1 shapes derivatives numbering mapping_q1_eulerian \ transfer internals \ + q_1 q_2 q_3 \ non_primitive_1 non_primitive_2 \ nedelec nedelec_2 nedelec_3 up_and_down diff --git a/tests/fe/q_1.cc b/tests/fe/q_1.cc new file mode 100644 index 0000000000..bb72fc74dc --- /dev/null +++ b/tests/fe/q_1.cc @@ -0,0 +1,73 @@ +//---------------------------- q_1.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2003 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 +// fuqher information on this license. +// +//---------------------------- q_1.cc --------------------------- + + +// Just output the constraint matrices of the FE_Q element. Test +// introduced when we started to compute them on the fly, rather than +// precomputing them for a number of elements and storing them in a +// table + +#include +#include + +#include +#include + +#define PRECISION 5 + + + +template +void +test(const unsigned int degree) +{ + deallog << "FE_Q<" << dim << "> (" << degree << ")" + << std::endl; + + FE_Q fe_q(degree); + const FullMatrix & constraints = fe_q.constraints(); + + for (unsigned int i=0; i(degree); + + for (unsigned int degree=1; degree<=2; ++degree) + test<3>(degree); + + return 0; +} + + + diff --git a/tests/fe/q_2.cc b/tests/fe/q_2.cc new file mode 100644 index 0000000000..bd8330cb43 --- /dev/null +++ b/tests/fe/q_2.cc @@ -0,0 +1,82 @@ +//---------------------------- q_2.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2003 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 +// fuqher information on this license. +// +//---------------------------- q_2.cc --------------------------- + + +// Just output the embedding matrices of the FE_Q element. Test +// introduced when we started to compute them on the fly, rather than +// precomputing them for a number of elements and storing them in a +// table + +#include +#include + +#include +#include + +#define PRECISION 5 + + + +template +void +test(const unsigned int degree) +{ + deallog << "FE_Q<" << dim << "> (" << degree << ")" + << std::endl; + + FE_Q fe_q(degree); + + for (unsigned int c=0; c::children_per_cell; ++c) + { + const FullMatrix & m = fe_q.prolongate(c); + + for (unsigned int i=0; i(degree); + + for (unsigned int degree=1; degree<=3; ++degree) + test<2>(degree); + + for (unsigned int degree=1; degree<=2; ++degree) + test<3>(degree); + + return 0; +} + + + diff --git a/tests/fe/q_3.cc b/tests/fe/q_3.cc new file mode 100644 index 0000000000..9839059995 --- /dev/null +++ b/tests/fe/q_3.cc @@ -0,0 +1,79 @@ +//---------------------------- q_3.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2003 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 +// fuqher information on this license. +// +//---------------------------- q_3.cc --------------------------- + + +// Just output the restriction matrices of the FE_Q element. Test +// introduced when we started to compute them on the fly, rather than +// precomputing them for a number of elements and storing them in a +// table + +#include +#include + +#include +#include + +#define PRECISION 5 + + + +template +void +test(const unsigned int degree) +{ + deallog << "FE_Q<" << dim << "> (" << degree << ")" + << std::endl; + + FE_Q fe_q(degree); + + for (unsigned int c=0; c::children_per_cell; ++c) + { + const FullMatrix & m = fe_q.restrict(c); + + for (unsigned int i=0; i(degree); + + for (unsigned int degree=1; degree<=4; ++degree) + test<2>(degree); + + for (unsigned int degree=1; degree<=4; ++degree) + test<3>(degree); + + return 0; +} + + +