From: Wolfgang Bangerth Date: Mon, 11 Jul 2016 12:46:48 +0000 (-0500) Subject: Add a test. X-Git-Tag: v8.5.0-rc1~886^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87927779f2b399e07887a13c8f8a541e99385201;p=dealii.git Add a test. --- diff --git a/tests/mappings/mapping_q_generic_cell_cache.cc b/tests/mappings/mapping_q_generic_cell_cache.cc new file mode 100644 index 0000000000..436cdb0847 --- /dev/null +++ b/tests/mappings/mapping_q_generic_cell_cache.cc @@ -0,0 +1,56 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2016 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. +// +// --------------------------------------------------------------------- + +// Test high order MappingQ on a ChartManifold. + +#include "../tests.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + +using namespace dealii; + + +int main() +{ + initlog (); + + Triangulation<2> triangulation; + FE_DGQ<2> fe(0); + QMidpoint<2> qf_cell; + + GridGenerator::hyper_cube(triangulation, 0.0, 1.0); + FEValues<2> fe_values (fe, qf_cell, update_JxW_values); + + // compute the volume of the mesh + fe_values.reinit(triangulation.begin_active()); + const double volume_before = fe_values.JxW(0); + deallog << volume_before << std::endl; + + // shrink the mesh + GridTools::scale (0.5, triangulation); + + // Now we measure the volume again: + fe_values.reinit(triangulation.begin_active()); + const double volume_after = fe_values.JxW(0); + deallog << volume_after << std::endl; +} diff --git a/tests/mappings/mapping_q_generic_cell_cache.output b/tests/mappings/mapping_q_generic_cell_cache.output new file mode 100644 index 0000000000..57cbd70922 --- /dev/null +++ b/tests/mappings/mapping_q_generic_cell_cache.output @@ -0,0 +1,3 @@ + +DEAL::1.00000 +DEAL::0.250000