From 66946fb53a53ba906d19fd56d5157e52b5be96a3 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 22 Jul 2013 23:55:08 +0000 Subject: [PATCH] Add a test that currently fails. git-svn-id: https://svn.dealii.org/trunk@30120 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fe/face_to_cell_01.cc | 54 ++++++++++++++++++++++++++++ tests/fe/face_to_cell_01/cmp/generic | 3 ++ 2 files changed, 57 insertions(+) create mode 100644 tests/fe/face_to_cell_01.cc create mode 100644 tests/fe/face_to_cell_01/cmp/generic diff --git a/tests/fe/face_to_cell_01.cc b/tests/fe/face_to_cell_01.cc new file mode 100644 index 0000000000..d5bf6365f5 --- /dev/null +++ b/tests/fe/face_to_cell_01.cc @@ -0,0 +1,54 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 1998 - 2013 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +// it turns out that FE_Q::face_to_cell_index() had a bug for elements beyond +// Q2 when using the face flip flag. this test is for the 2d case + + +#include "../tests.h" +#include +#include + +#include +#include + +template +void test() +{ + FE_Q fe(3); + const unsigned int dofs_per_face = fe.dofs_per_face; + + for (unsigned int i = 0; i < dofs_per_face; ++i) + deallog << fe.face_to_cell_index(i, 0, true, false, false) << " - "; + deallog << std::endl; + for (unsigned int i = 0; i < dofs_per_face; ++i) + deallog << fe.face_to_cell_index(i, 0, true, true, false) << " - "; + deallog << std::endl; +} + +int main() +{ + std::ofstream logfile("face_to_cell_01/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test<2>(); +} + + + diff --git a/tests/fe/face_to_cell_01/cmp/generic b/tests/fe/face_to_cell_01/cmp/generic new file mode 100644 index 0000000000..af7817b8d7 --- /dev/null +++ b/tests/fe/face_to_cell_01/cmp/generic @@ -0,0 +1,3 @@ + +DEAL::0 - 2 - 4 - 5 - +DEAL::2 - 0 - 5 - 4 - -- 2.39.5