From fee2dd67821837b2caef10797b2b29ea4075f434 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Wed, 25 Apr 2018 15:00:42 +0200 Subject: [PATCH] Failing test in mapping q eulerian. --- tests/mappings/mapping_q_eulerian_10.cc | 71 +++++++++++++++++++++ tests/mappings/mapping_q_eulerian_10.output | 21 ++++++ 2 files changed, 92 insertions(+) create mode 100644 tests/mappings/mapping_q_eulerian_10.cc create mode 100644 tests/mappings/mapping_q_eulerian_10.output diff --git a/tests/mappings/mapping_q_eulerian_10.cc b/tests/mappings/mapping_q_eulerian_10.cc new file mode 100644 index 0000000000..a72e3b6635 --- /dev/null +++ b/tests/mappings/mapping_q_eulerian_10.cc @@ -0,0 +1,71 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2001 - 2018 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. +// +// --------------------------------------------------------------------- + +// Check that it is possible to perform two consecutive distribute dofs +// when using MappingQEulerian + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void test() +{ + Triangulation tria; + GridGenerator::hyper_cube (tria); + + FESystem fe(FE_Q(1), spacedim); + DoFHandler dh(tria); + + dh.distribute_dofs(fe); + + deallog << "dim, spacedim: " << dim << ", " << spacedim << std::endl + << "cells: " << tria.n_active_cells() << ", dofs: " + << dh.n_dofs() < map_vector(dh.n_dofs()); + MappingQEulerian,spacedim> mapping(1, dh, map_vector); + + tria.refine_global (1); + + dh.distribute_dofs(fe); + + deallog << "After refine:" << std::endl + << "cells: " << tria.n_active_cells() << ", dofs: " + << dh.n_dofs() <(); + test<1,2>(); + test<2,2>(); + test<2,3>(); + test<3,3>(); +} diff --git a/tests/mappings/mapping_q_eulerian_10.output b/tests/mappings/mapping_q_eulerian_10.output new file mode 100644 index 0000000000..562627c06e --- /dev/null +++ b/tests/mappings/mapping_q_eulerian_10.output @@ -0,0 +1,21 @@ + +DEAL::dim, spacedim: 1, 1 +DEAL::cells: 1, dofs: 2 +DEAL::After refine: +DEAL::cells: 2, dofs: 3 +DEAL::dim, spacedim: 1, 2 +DEAL::cells: 1, dofs: 4 +DEAL::After refine: +DEAL::cells: 2, dofs: 6 +DEAL::dim, spacedim: 2, 2 +DEAL::cells: 1, dofs: 8 +DEAL::After refine: +DEAL::cells: 4, dofs: 18 +DEAL::dim, spacedim: 2, 3 +DEAL::cells: 1, dofs: 12 +DEAL::After refine: +DEAL::cells: 4, dofs: 27 +DEAL::dim, spacedim: 3, 3 +DEAL::cells: 1, dofs: 24 +DEAL::After refine: +DEAL::cells: 8, dofs: 81 -- 2.39.5