From: Wolfgang Bangerth Date: Wed, 19 Oct 2005 05:33:52 +0000 (+0000) Subject: Add two tests. X-Git-Tag: v8.0.0~12979 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=caddce38576096653d6785c16f40eacff2ffee63;p=dealii.git Add two tests. git-svn-id: https://svn.dealii.org/trunk@11624 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/fe/Makefile b/tests/fe/Makefile index 5c6c3b1d28..5434b8becf 100644 --- a/tests/fe/Makefile +++ b/tests/fe/Makefile @@ -30,7 +30,8 @@ tests = fe_data_test traits fe_tools fe_tools_test mapping \ transfer internals \ dgq_1 \ q_1 q_2 q_3 q_4 interpolate_q1 \ - rt_1 rt_2 rt_3 rt_4 rt_5 rt_6 rtdiff rtn_1 interpolate_rt interpolate_rtn \ + rt_1 rt_2 rt_3 rt_4 rt_5 rt_6 rt_7 rtdiff rtn_1 rtn_2 \ + interpolate_rt interpolate_rtn \ dgp_monomial_1 dgp_monomial_2 \ system_1 interpolate_system \ non_primitive_1 non_primitive_2 \ diff --git a/tests/fe/rt_7.cc b/tests/fe/rt_7.cc new file mode 100644 index 0000000000..483eb747d2 --- /dev/null +++ b/tests/fe/rt_7.cc @@ -0,0 +1,88 @@ +//---------------------------- rt_7.cc --------------------------- +// rt_7.cc,v 1.3 2003/06/09 16:00:38 wolf Exp +// Version: +// +// Copyright (C) 2003, 2005 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. +// +//---------------------------- rt_7.cc --------------------------- + +// RT(2) had some problems with shape functions... + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define PRECISION 2 + + + +template +void +plot_shape_functions(const unsigned int degree) +{ + FE_RaviartThomasNodal fe_rt(degree); + Triangulation tr; + GridGenerator::hyper_cube(tr, 0., 1.); + + DoFHandler dof(tr); + typename DoFHandler::cell_iterator c = dof.begin(); + dof.distribute_dofs(fe_rt); + + QTrapez<1> q_trapez; + const unsigned int div=10; + QIterated q(q_trapez, div); + FEValues fe(fe_rt, q, update_values|update_gradients|update_q_points); + fe.reinit(c); + + Assert (fe.get_fe().n_components() == dim, ExcInternalError()); + + for (unsigned int q_point=0; q_point(q_trapez,div).n_quadrature_points == 0) + deallog << std::endl; + + deallog << fe.quadrature_point(q_point) << " "; + + for (unsigned int i=0;i(2); + + return 0; +} + + + diff --git a/tests/fe/rtn_2.cc b/tests/fe/rtn_2.cc new file mode 100644 index 0000000000..c9b7a18152 --- /dev/null +++ b/tests/fe/rtn_2.cc @@ -0,0 +1,89 @@ +//---------------------------- rtn_2.cc --------------------------- +// rtn_2.cc,v 1.3 2003/06/09 16:00:38 wolf Exp +// Version: +// +// Copyright (C) 2003, 2005 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. +// +//---------------------------- rtn_2.cc --------------------------- + +// rt(2) had some problems with shape functions (tested in rt_7.cc). because +// it is so simple, just run the same test for the RT-Nodal element as well + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define PRECISION 2 + + + +template +void +plot_shape_functions(const unsigned int degree) +{ + FE_RaviartThomasNodal fe_rt(degree); + Triangulation tr; + GridGenerator::hyper_cube(tr, 0., 1.); + + DoFHandler dof(tr); + typename DoFHandler::cell_iterator c = dof.begin(); + dof.distribute_dofs(fe_rt); + + QTrapez<1> q_trapez; + const unsigned int div=10; + QIterated q(q_trapez, div); + FEValues fe(fe_rt, q, update_values|update_gradients|update_q_points); + fe.reinit(c); + + Assert (fe.get_fe().n_components() == dim, ExcInternalError()); + + for (unsigned int q_point=0; q_point(q_trapez,div).n_quadrature_points == 0) + deallog << std::endl; + + deallog << fe.quadrature_point(q_point) << " "; + + for (unsigned int i=0;i(2); + + return 0; +} + + +