From 7eaf246aa926f7eb2ae057c8e74025ba0dbcf1d3 Mon Sep 17 00:00:00 2001 From: alberto sartori Date: Thu, 3 Mar 2016 16:08:30 +0100 Subject: [PATCH] Mapping Manifold Test 03 --- tests/fe/mapping_manifold_03.cc | 114 ++++++++++++++++++++++++++++ tests/fe/mapping_manifold_03.output | 0 2 files changed, 114 insertions(+) create mode 100644 tests/fe/mapping_manifold_03.cc create mode 100644 tests/fe/mapping_manifold_03.output diff --git a/tests/fe/mapping_manifold_03.cc b/tests/fe/mapping_manifold_03.cc new file mode 100644 index 0000000000..ef42c5e987 --- /dev/null +++ b/tests/fe/mapping_manifold_03.cc @@ -0,0 +1,114 @@ +// --------------------------------------------------------------------- +// +// 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. +// +// --------------------------------------------------------------------- + + +// Check that the quadrature points obtained through transform_unit_to_real +// are the same of those given by FEValues + + +#include "../tests.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +void test() +{ + deallog << "dim=" << dim << ", spacedim=" << spacedim << std::endl; + + Triangulation triangulation; + + Point center; + for (unsigned int i=0; i manifold(center); + + triangulation.set_all_manifold_ids(0); + triangulation.set_manifold (0, manifold); + + const QGauss quad(3); + + FE_Q fe(1); + + DoFHandler dof(triangulation); + dof.distribute_dofs(fe); + + MappingManifold mapping_manifold; + MappingQGeneric mapping_q(1); + + FEValues fe_values_mapping (mapping_manifold, + fe, quad, + update_jacobians); + + FEValues fe_values_q (mapping_q, + fe, quad, + update_jacobians); + + typename Triangulation::active_cell_iterator cell= triangulation.begin_active(); + + fe_values_mapping.reinit(cell); + fe_values_q.reinit(cell); + std::vector > jac_from_mapping_manifold = fe_values_mapping.get_jacobians(); + + std::vector > jac_from_mapping_q = fe_values_q.get_jacobians(); + + AssertThrow(jac_from_mapping_q.size() == jac_from_mapping_manifold.size(), ExcInternalError()); + + for (unsigned int q=0; q(); + test<3,3>(); + + return 0; +} + + + diff --git a/tests/fe/mapping_manifold_03.output b/tests/fe/mapping_manifold_03.output new file mode 100644 index 0000000000..e69de29bb2 -- 2.39.5