From: kayser-herold Date: Thu, 27 Jul 2006 19:10:33 +0000 (+0000) Subject: Added another testcase for the FE::face_to_equivalent_cell_index X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5523dff7e86e2c407f008e9e5a3c5c3c0176a009;p=dealii-svn.git Added another testcase for the FE::face_to_equivalent_cell_index method. The test verifies that the method gives the same results as the FE::face_to_cell_index method. git-svn-id: https://svn.dealii.org/trunk@13451 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/fe_tools_14.cc b/tests/bits/fe_tools_14.cc new file mode 100644 index 0000000000..2ca1ba2b8e --- /dev/null +++ b/tests/bits/fe_tools_14.cc @@ -0,0 +1,47 @@ +// $Id: fe_tools_13.cc 12738 2006-03-28 23:25:03Z wolf $ +// 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. +// +//---------------------------- fe_tools_13.cc --------------------------- + +#include "../tests.h" +#include "fe_tools_common.cc" + +// comparison of the results of +// FE::face_to_equivalent_cell_index (i) +// and +// FE::face_to_cell_index (i, 0) +// According to the documentation they should be the same! + + +std::string output_file_name = "fe_tools_14/output"; + + +template +void +check_this (const FiniteElement &fe1, + const FiniteElement &fe2) +{ + bool ok = true; + + for (unsigned int i = 0; i < fe1.dofs_per_face; ++i) + { + if (fe1.face_to_equivalent_cell_index (i) != + fe1.face_to_cell_index (i, 0)) + ok = false; + + if (fe2.face_to_equivalent_cell_index (i) != + fe2.face_to_cell_index (i, 0)) + ok = false; + } + + ok ? deallog << "OK" << std::endl : + deallog << "Error!" << std::endl; +} +