From: bangerth Date: Wed, 23 Feb 2011 15:17:13 +0000 (+0000) Subject: New test. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6a5a6452354e25f0032ee69bdeb5f0a33087156;p=dealii-svn.git New test. git-svn-id: https://svn.dealii.org/trunk@23432 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/hp/fe_nothing_09/cmp/generic b/tests/hp/fe_nothing_09/cmp/generic index cd6e4f7767..a048c60600 100644 --- a/tests/hp/fe_nothing_09/cmp/generic +++ b/tests/hp/fe_nothing_09/cmp/generic @@ -1,8 +1,8 @@ -DEAL::4 dofs +DEAL::8 dofs DEAL::0 0 DEAL::1 0 -DEAL::12 dofs +DEAL::24 dofs DEAL::0 0 DEAL::1 0 DEAL::2 0 @@ -13,7 +13,17 @@ DEAL::8 0 DEAL::9 0 DEAL::10 0 DEAL::11 0 -DEAL::36 dofs +DEAL::14 0 +DEAL::15 0 +DEAL::16 0 +DEAL::17 0 +DEAL::18 0 +DEAL::19 0 +DEAL::20 0 +DEAL::21 0 +DEAL::22 0 +DEAL::23 0 +DEAL::72 dofs DEAL::0 0 DEAL::1 0 DEAL::2 0 @@ -40,12 +50,46 @@ DEAL::24 0 DEAL::25 0 DEAL::26 0 DEAL::27 0 -DEAL::28 0 -DEAL::29 0 DEAL::30 0 DEAL::31 0 DEAL::32 0 DEAL::33 0 DEAL::34 0 DEAL::35 0 +DEAL::36 0 +DEAL::37 0 +DEAL::38 0 +DEAL::39 0 +DEAL::40 0 +DEAL::41 0 +DEAL::42 0 +DEAL::43 0 +DEAL::44 0 +DEAL::45 0 +DEAL::46 0 +DEAL::47 0 +DEAL::48 0 +DEAL::49 0 +DEAL::50 0 +DEAL::51 0 +DEAL::52 0 +DEAL::53 0 +DEAL::54 0 +DEAL::55 0 +DEAL::56 0 +DEAL::57 0 +DEAL::58 0 +DEAL::59 0 +DEAL::60 0 +DEAL::61 0 +DEAL::62 0 +DEAL::63 0 +DEAL::64 0 +DEAL::65 0 +DEAL::66 0 +DEAL::67 0 +DEAL::68 0 +DEAL::69 0 +DEAL::70 0 +DEAL::71 0 DEAL::OK diff --git a/tests/hp/fe_nothing_11.cc b/tests/hp/fe_nothing_11.cc new file mode 100644 index 0000000000..4fcdfdcc19 --- /dev/null +++ b/tests/hp/fe_nothing_11.cc @@ -0,0 +1,98 @@ +//---------------------------- fe_nothing_11.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2009, 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. +// +//---------------------------- fe_nothing_11.cc --------------------------- + + +// test that FE_Nothing can be called with interpolate_boundary_values +// with vector elements in the hp context with each element active +// only in a subdomain + + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include + + +template +void test () +{ + Triangulation triangulation; + GridGenerator :: hyper_cube (triangulation, -1, 1); + triangulation.refine_global(1); + + hp::FECollection fe_collection; + fe_collection.push_back (FESystem(FE_Q(1), 2, + FE_Nothing(), 2)); + fe_collection.push_back (FESystem(FE_Nothing(), 2, + FE_Q(1), 2)); + + hp::DoFHandler dof_handler (triangulation); + + typename hp::DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(), + endc = dof_handler.end(); + + for(; cell != endc; cell++) + if (cell->center()[0] > 0) + cell->set_active_fe_index(1); + else + cell->set_active_fe_index(0); + + dof_handler.distribute_dofs (fe_collection); + deallog << dof_handler.n_dofs() << " dofs" << std::endl; + + std::map bv; + VectorTools::interpolate_boundary_values (dof_handler, + 0, + ZeroFunction(4), + bv); + for (std::map::iterator + p = bv.begin(); p!=bv.end(); ++p) + deallog << p->first << ' ' << p->second << std::endl; +} + + + +int main () +{ + std::ofstream logfile("fe_nothing_11/output"); + logfile.precision(2); + + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test<1> (); + test<2> (); + test<3> (); + + deallog << "OK" << std::endl; +}