From: Luca Heltai Date: Mon, 28 Mar 2016 09:31:48 +0000 (+0200) Subject: Added check on Jacobians on faces for FlatManifold. X-Git-Tag: v8.5.0-rc1~1131^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cad44d1f0420f6451a30b6233a99c660eacbe2c6;p=dealii.git Added check on Jacobians on faces for FlatManifold. --- diff --git a/tests/fe/mapping_manifold_05.cc b/tests/fe/mapping_manifold_05.cc new file mode 100644 index 0000000000..923e20eb1e --- /dev/null +++ b/tests/fe/mapping_manifold_05.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 Jacobian obtained through MappingManifold and +// MappingQ1 are the same on a FlatManifold, with non-trivial cells, +// on the faces + + +#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 quad(3); + + FE_Q fe(1); + + DoFHandler dof(triangulation); + dof.distribute_dofs(fe); + + MappingManifold mapping_manifold; + MappingQGeneric mapping_q(1); + + FEFaceValues fe_values_mapping (mapping_manifold, + fe, quad, + update_jacobians); + + FEFaceValues fe_values_q (mapping_q, + fe, quad, + update_jacobians); + + typename Triangulation::active_cell_iterator cell= triangulation.begin_active(); + for(unsigned int f=0; f::faces_per_cell; ++f) { + fe_values_mapping.reinit(cell,f); + fe_values_q.reinit(cell,f); + 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 1e-10) + { + deallog << "Jacobian from mapping manifold at point "<< q << std::endl; + for (unsigned int d=0; d(); + test<3,3>(); + + return 0; +} + + + diff --git a/tests/fe/mapping_manifold_05.output b/tests/fe/mapping_manifold_05.output new file mode 100644 index 0000000000..7a5a965113 --- /dev/null +++ b/tests/fe/mapping_manifold_05.output @@ -0,0 +1,13 @@ + +DEAL::dim=2, spacedim=2 +DEAL::OK +DEAL::OK +DEAL::OK +DEAL::OK +DEAL::dim=3, spacedim=3 +DEAL::OK +DEAL::OK +DEAL::OK +DEAL::OK +DEAL::OK +DEAL::OK