From: Martin Kronbichler Date: Fri, 23 Jan 2015 09:38:10 +0000 (+0100) Subject: Fill jacobians in FEFaceValues. X-Git-Tag: v8.3.0-rc1~521^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F465%2Fhead;p=dealii.git Fill jacobians in FEFaceValues. The previous code did not fill the Jacobian transformations on FEFaceValues and FESubfaceValues. This is now fixed for the various mappings. --- diff --git a/doc/news/changes.h b/doc/news/changes.h index 9a5f4ff10c..47b6ba62e4 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -254,6 +254,13 @@ inconvenience this causes.

Specific improvements

    +
  1. Fixed: FEFaceValues and FESubfaceValues did not fill the + jacobians and inverse jacobians if requested via the update flags. + This is now fixed. +
    + (Martin Kronbichler, 2015/01/23) +
  2. +
  3. Fixed: ParameterHandler::read_input() now checks that 'subsection'/'end' are balanced in the input.
    diff --git a/include/deal.II/fe/mapping.h b/include/deal.II/fe/mapping.h index 713d579d96..101fbeabfe 100644 --- a/include/deal.II/fe/mapping.h +++ b/include/deal.II/fe/mapping.h @@ -679,15 +679,15 @@ private: */ virtual void fill_fe_values (const typename Triangulation::cell_iterator &cell, - const Quadrature &quadrature, - InternalDataBase &internal, - std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &jacobians, - std::vector > &jacobian_grads, - std::vector > &inverse_jacobians, - std::vector > &cell_normal_vectors, - CellSimilarity::Similarity &cell_similarity + const Quadrature &quadrature, + InternalDataBase &internal, + std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &jacobians, + std::vector > &jacobian_grads, + std::vector > &inverse_jacobians, + std::vector > &cell_normal_vectors, + CellSimilarity::Similarity &cell_similarity ) const=0; @@ -704,27 +704,31 @@ private: */ virtual void fill_fe_face_values (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const Quadrature &quadrature, - InternalDataBase &internal, - std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &boundary_form, - std::vector > &normal_vectors) const = 0; + const unsigned int face_no, + const Quadrature &quadrature, + InternalDataBase &internal, + std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &boundary_form, + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const = 0; /** * See above. */ virtual void fill_fe_subface_values (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, - const Quadrature &quadrature, - InternalDataBase &internal, - std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &boundary_form, - std::vector > &normal_vectors) const = 0; + const unsigned int face_no, + const unsigned int sub_no, + const Quadrature &quadrature, + InternalDataBase &internal, + std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &boundary_form, + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const = 0; /** * Give class @p FEValues access to the private get_...data and diff --git a/include/deal.II/fe/mapping_cartesian.h b/include/deal.II/fe/mapping_cartesian.h index 03524ab5a9..dc7b3baa83 100644 --- a/include/deal.II/fe/mapping_cartesian.h +++ b/include/deal.II/fe/mapping_cartesian.h @@ -71,36 +71,40 @@ public: virtual void fill_fe_values (const typename Triangulation::cell_iterator &cell, - const Quadrature &quadrature, - typename Mapping::InternalDataBase &mapping_data, - std::vector > &quadrature_points, - std::vector &JxW_values, + const Quadrature &quadrature, + typename Mapping::InternalDataBase &mapping_data, + std::vector > &quadrature_points, + std::vector &JxW_values, std::vector > &jacobians, - std::vector > &jacobian_grads, - std::vector > &inverse_jacobians, + std::vector > &jacobian_grads, + std::vector > &inverse_jacobians, std::vector > &, - CellSimilarity::Similarity &cell_similarity) const ; + CellSimilarity::Similarity &cell_similarity) const ; virtual void fill_fe_face_values (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const Quadrature& quadrature, + const unsigned int face_no, + const Quadrature& quadrature, typename Mapping::InternalDataBase &mapping_data, std::vector > &quadrature_points, std::vector &JxW_values, - std::vector > &boundary_form, - std::vector > &normal_vectors) const ; + std::vector > &boundary_form, + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const ; virtual void fill_fe_subface_values (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, - const Quadrature& quadrature, + const unsigned int face_no, + const unsigned int sub_no, + const Quadrature& quadrature, typename Mapping::InternalDataBase &mapping_data, std::vector > &quadrature_points, std::vector &JxW_values, - std::vector > &boundary_form, - std::vector > &normal_vectors) const ; + std::vector > &boundary_form, + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const ; virtual void transform (const VectorSlice > > input, diff --git a/include/deal.II/fe/mapping_q.h b/include/deal.II/fe/mapping_q.h index a16cd5d43e..87a8e628ee 100644 --- a/include/deal.II/fe/mapping_q.h +++ b/include/deal.II/fe/mapping_q.h @@ -195,42 +195,46 @@ protected: */ virtual void fill_fe_values (const typename Triangulation::cell_iterator &cell, - const Quadrature &quadrature, - typename Mapping::InternalDataBase &mapping_data, - typename std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &jacobians, - std::vector > &jacobian_grads, - std::vector > &inverse_jacobians, - std::vector > &cell_normal_vectors, - CellSimilarity::Similarity &cell_similarity) const ; + const Quadrature &quadrature, + typename Mapping::InternalDataBase &mapping_data, + typename std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &jacobians, + std::vector > &jacobian_grads, + std::vector > &inverse_jacobians, + std::vector > &cell_normal_vectors, + CellSimilarity::Similarity &cell_similarity) const ; /** * Implementation of the interface in Mapping. */ virtual void fill_fe_face_values (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const Quadrature& quadrature, + const unsigned int face_no, + const Quadrature& quadrature, typename Mapping::InternalDataBase &mapping_data, - typename std::vector > &quadrature_points, - std::vector &JxW_values, - typename std::vector > &exterior_form, - typename std::vector > &normal_vectors) const ; + typename std::vector > &quadrature_points, + std::vector &JxW_values, + typename std::vector > &exterior_form, + typename std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const ; /** * Implementation of the interface in Mapping. */ virtual void fill_fe_subface_values (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, - const Quadrature& quadrature, + const unsigned int face_no, + const unsigned int sub_no, + const Quadrature& quadrature, typename Mapping::InternalDataBase &mapping_data, - typename std::vector > &quadrature_points, - std::vector &JxW_values, - typename std::vector > &exterior_form, - typename std::vector > &normal_vectors) const ; + typename std::vector > &quadrature_points, + std::vector &JxW_values, + typename std::vector > &exterior_form, + typename std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const ; /** * For dim=2,3. Append the support points of all shape functions diff --git a/include/deal.II/fe/mapping_q1.h b/include/deal.II/fe/mapping_q1.h index 82d11cf8dc..856864c407 100644 --- a/include/deal.II/fe/mapping_q1.h +++ b/include/deal.II/fe/mapping_q1.h @@ -306,42 +306,46 @@ public: */ virtual void fill_fe_values (const typename Triangulation::cell_iterator &cell, - const Quadrature &quadrature, - typename Mapping::InternalDataBase &mapping_data, - typename std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &jacobians, - std::vector > &jacobian_grads, - std::vector > &inverse_jacobians, - std::vector > &cell_normal_vectors, - CellSimilarity::Similarity &cell_similarity) const; + const Quadrature &quadrature, + typename Mapping::InternalDataBase &mapping_data, + typename std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &jacobians, + std::vector > &jacobian_grads, + std::vector > &inverse_jacobians, + std::vector > &cell_normal_vectors, + CellSimilarity::Similarity &cell_similarity) const; /** * Implementation of the interface in Mapping. */ virtual void fill_fe_face_values (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const Quadrature &quadrature, + const unsigned int face_no, + const Quadrature &quadrature, typename Mapping::InternalDataBase &mapping_data, - typename std::vector > &quadrature_points, - std::vector &JxW_values, - typename std::vector > &boundary_form, - typename std::vector > &normal_vectors) const ; + typename std::vector > &quadrature_points, + std::vector &JxW_values, + typename std::vector > &boundary_form, + typename std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const ; /** * Implementation of the interface in Mapping. */ virtual void fill_fe_subface_values (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, - const Quadrature& quadrature, + const unsigned int face_no, + const unsigned int sub_no, + const Quadrature& quadrature, typename Mapping::InternalDataBase &mapping_data, - typename std::vector > &quadrature_points, - std::vector &JxW_values, - typename std::vector > &boundary_form, - typename std::vector > &normal_vectors) const ; + typename std::vector > &quadrature_points, + std::vector &JxW_values, + typename std::vector > &boundary_form, + typename std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const ; /** * Compute shape values and/or derivatives. @@ -388,16 +392,18 @@ public: * Do the computation for the fill_* functions. */ void compute_fill_face (const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const unsigned int subface_no, - const unsigned int npts, - const DataSetDescriptor data_set, - const std::vector &weights, - InternalData &mapping_data, + const unsigned int face_no, + const unsigned int subface_no, + const unsigned int npts, + const DataSetDescriptor data_set, + const std::vector &weights, + InternalData &mapping_data, std::vector > &quadrature_points, - std::vector &JxW_values, + std::vector &JxW_values, std::vector > &boundary_form, - std::vector > &normal_vectors) const; + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const; /** * Compute shape values and/or derivatives. diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 9aec4f7190..d133464e5e 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -3702,19 +3702,22 @@ void FEFaceValues::reinit (const typename Triangulation void FEFaceValues::do_reinit (const unsigned int face_no) { - // first of all, set the - // present_face_index (if - // available) + // first of all, set the present_face_index (if available) const typename Triangulation::cell_iterator cell=*this->present_cell; this->present_face_index=cell->face_index(face_no); + Assert(!(this->update_flags & update_jacobian_grads), + ExcNotImplemented()); + this->get_mapping().fill_fe_face_values(*this->present_cell, face_no, this->quadrature, *this->mapping_data, this->quadrature_points, this->JxW_values, this->boundary_forms, - this->normal_vectors); + this->normal_vectors, + this->jacobians, + this->inverse_jacobians); this->get_fe().fill_fe_face_values(this->get_mapping(), *this->present_cell, face_no, @@ -3947,8 +3950,10 @@ void FESubfaceValues::do_reinit (const unsigned int face_no, this->present_face_index=subface_index; } - // now ask the mapping and the finite element - // to do the actual work + Assert(!(this->update_flags & update_jacobian_grads), + ExcNotImplemented()); + + // now ask the mapping and the finite element to do the actual work this->get_mapping().fill_fe_subface_values(*this->present_cell, face_no, subface_no, this->quadrature, @@ -3956,7 +3961,9 @@ void FESubfaceValues::do_reinit (const unsigned int face_no, this->quadrature_points, this->JxW_values, this->boundary_forms, - this->normal_vectors); + this->normal_vectors, + this->jacobians, + this->inverse_jacobians); this->get_fe().fill_fe_subface_values(this->get_mapping(), *this->present_cell, diff --git a/source/fe/mapping_cartesian.cc b/source/fe/mapping_cartesian.cc index c8fb5b03ac..02c7a0814d 100644 --- a/source/fe/mapping_cartesian.cc +++ b/source/fe/mapping_cartesian.cc @@ -390,88 +390,19 @@ fill_fe_values (const typename Triangulation::cell_iterator &cell, -// template <> -// void -// MappingCartesian<1,1>::fill_fe_face_values ( -// const typename Triangulation<1,1>::cell_iterator &, -// const unsigned int, -// const Quadrature<0>&, -// typename Mapping<1,1>::InternalDataBase&, -// std::vector >&, -// std::vector&, -// std::vector >&, -// std::vector >&) const -// { -// Assert(false, ExcNotImplemented()); -// } - - -// template <> -// void -// MappingCartesian<1,2>::fill_fe_face_values ( -// const typename Triangulation<1,2>::cell_iterator &, -// const unsigned int, -// const Quadrature<0>&, -// typename Mapping<1,2>::InternalDataBase&, -// std::vector >&, -// std::vector&, -// std::vector >&, -// std::vector >&) const -// { -// Assert(false, ExcNotImplemented()); -// } - - - -// template <> -// void -// MappingCartesian<1,1>::fill_fe_subface_values ( -// const typename Triangulation<1,1>::cell_iterator &, -// const unsigned int, -// const unsigned int, -// const Quadrature<0>&, -// typename Mapping<1,1>::InternalDataBase&, -// std::vector >&, -// std::vector&, -// std::vector >&, -// std::vector >&) const -// { -// Assert(false, ExcNotImplemented()); -// } - - - -// template <> -// void -// MappingCartesian<1,2>::fill_fe_subface_values ( -// const typename Triangulation<1,2>::cell_iterator &, -// const unsigned int, -// const unsigned int, -// const Quadrature<0>&, -// typename Mapping<1,2>::InternalDataBase&, -// std::vector >&, -// std::vector&, -// std::vector >&, -// std::vector >&) const -// { -// Assert(false, ExcNotImplemented()); -// } - - - -// Implementation for dim != 1 - template void MappingCartesian::fill_fe_face_values ( const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const Quadrature &q, + const unsigned int face_no, + const Quadrature &q, typename Mapping::InternalDataBase &mapping_data, - std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &boundary_forms, - std::vector > &normal_vectors) const + std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &boundary_forms, + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const { // convert data object to internal // data for this class. fails with @@ -511,6 +442,22 @@ MappingCartesian::fill_fe_face_values ( J *= data.length[d]; data.volume_element = J; } + + if (data.current_update_flags() & update_jacobians) + for (unsigned int i=0; i(); + for (unsigned int d=0; d(); + for (unsigned int d=0; d void MappingCartesian::fill_fe_subface_values ( const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, - const Quadrature &q, + const unsigned int face_no, + const unsigned int sub_no, + const Quadrature &q, typename Mapping::InternalDataBase &mapping_data, - std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &boundary_forms, - std::vector > &normal_vectors) const + std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &boundary_forms, + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const { // convert data object to internal // data for this class. fails with @@ -580,6 +529,22 @@ MappingCartesian::fill_fe_subface_values ( J *= data.length[d]; data.volume_element = J; } + + if (data.current_update_flags() & update_jacobians) + for (unsigned int i=0; i(); + for (unsigned int d=0; d(); + for (unsigned int d=0; d void MappingQ::fill_fe_face_values ( const typename Triangulation::cell_iterator &cell, - const unsigned int face_no, - const Quadrature &q, + const unsigned int face_no, + const Quadrature &q, typename Mapping::InternalDataBase &mapping_data, - std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &exterior_forms, - std::vector > &normal_vectors) const + std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &exterior_forms, + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const { // convert data object to internal data for this class. fails with an // exception if that is not possible @@ -391,7 +393,8 @@ MappingQ::fill_fe_face_values ( q.get_weights(), *p_data, quadrature_points, JxW_values, - exterior_forms, normal_vectors); + exterior_forms, normal_vectors, jacobians, + inverse_jacobians); } @@ -405,7 +408,9 @@ MappingQ::fill_fe_subface_values (const typename Triangulation > &quadrature_points, std::vector &JxW_values, std::vector > &exterior_forms, - std::vector > &normal_vectors) const + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const { // convert data object to internal data for this class. fails with an // exception if that is not possible @@ -443,7 +448,8 @@ MappingQ::fill_fe_subface_values (const typename Triangulation void MappingQ1::fill_fe_values ( const typename Triangulation::cell_iterator &cell, - const Quadrature &q, - typename Mapping::InternalDataBase &mapping_data, - std::vector > &quadrature_points, - std::vector &JxW_values, - std::vector > &jacobians, - std::vector > &jacobian_grads, - std::vector > &inverse_jacobians, - std::vector > &normal_vectors, - CellSimilarity::Similarity &cell_similarity) const + const Quadrature &q, + typename Mapping::InternalDataBase &mapping_data, + std::vector > &quadrature_points, + std::vector &JxW_values, + std::vector > &jacobians, + std::vector > &jacobian_grads, + std::vector > &inverse_jacobians, + std::vector > &normal_vectors, + CellSimilarity::Similarity &cell_similarity) const { // ensure that the following static_cast is really correct: Assert (dynamic_cast(&mapping_data) != 0, @@ -924,7 +924,9 @@ namespace internal typename dealii::MappingQ1::InternalData &data, std::vector &JxW_values, std::vector > &boundary_forms, - std::vector > &normal_vectors) + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) { const UpdateFlags update_flags(data.current_update_flags()); @@ -1039,6 +1041,14 @@ namespace internal if (update_flags & update_normal_vectors) normal_vectors[i] = boundary_forms[i] / boundary_forms[i].norm(); } + + if (update_flags & update_jacobians) + for (unsigned int point=0; point::compute_fill_face ( const DataSetDescriptor data_set, const std::vector &weights, InternalData &data, - std::vector > &quadrature_points, + std::vector > &quadrature_points, std::vector &JxW_values, std::vector > &boundary_forms, - std::vector > &normal_vectors) const + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const { compute_fill (cell, n_q_points, data_set, CellSimilarity::none, data, quadrature_points); internal::compute_fill_face (*this, cell, face_no, subface_no, n_q_points, weights, data, - JxW_values, boundary_forms, normal_vectors); + JxW_values, boundary_forms, normal_vectors, + jacobians, inverse_jacobians); } @@ -1078,10 +1091,12 @@ fill_fe_face_values (const typename Triangulation::cell_iterator & const unsigned int face_no, const Quadrature &q, typename Mapping::InternalDataBase &mapping_data, - std::vector > &quadrature_points, + std::vector > &quadrature_points, std::vector &JxW_values, - std::vector > &boundary_forms, - std::vector > &normal_vectors) const + std::vector > &boundary_forms, + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const { // ensure that the following cast // is really correct: @@ -1103,7 +1118,9 @@ fill_fe_face_values (const typename Triangulation::cell_iterator & quadrature_points, JxW_values, boundary_forms, - normal_vectors); + normal_vectors, + jacobians, + inverse_jacobians); } @@ -1117,9 +1134,11 @@ fill_fe_subface_values (const typename Triangulation::cell_iterato const Quadrature &q, typename Mapping::InternalDataBase &mapping_data, std::vector > &quadrature_points, - std::vector &JxW_values, + std::vector &JxW_values, std::vector > &boundary_forms, - std::vector > &normal_vectors) const + std::vector > &normal_vectors, + std::vector > &jacobians, + std::vector > &inverse_jacobians) const { // ensure that the following cast // is really correct: @@ -1142,7 +1161,9 @@ fill_fe_subface_values (const typename Triangulation::cell_iterato quadrature_points, JxW_values, boundary_forms, - normal_vectors); + normal_vectors, + jacobians, + inverse_jacobians); } diff --git a/tests/fe/jacobians_face.cc b/tests/fe/jacobians_face.cc new file mode 100644 index 0000000000..62ea558ef6 --- /dev/null +++ b/tests/fe/jacobians_face.cc @@ -0,0 +1,123 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2012 - 2014 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. +// +// --------------------------------------------------------------------- + + +// Show the Jacobians and inverse Jacobians of FEFaceValues and +// FESubfaceValues on a hyperball mesh with one quadrature point + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include + +template +void test() +{ + Triangulation tria; + GridGenerator::hyper_ball (tria); + static const HyperBallBoundary boundary; + tria.set_boundary (0, boundary); + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement(); + + MappingQ mapping(3); + FE_Nothing dummy; + // choose a point that is not right in the middle of the cell so that the + // Jacobian contains many nonzero entries + Point quad_p; + for (int d=0; d quad(quad_p); + FEFaceValues fe_val (mapping, dummy, quad, + update_jacobians | update_inverse_jacobians); + FESubfaceValues fe_sub_val (mapping, dummy, quad, + update_jacobians | update_inverse_jacobians); + deallog << dim << "d Jacobians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d(); + test<3>(); + + return 0; +} diff --git a/tests/fe/jacobians_face.output b/tests/fe/jacobians_face.output new file mode 100644 index 0000000000..7c4bebce0f --- /dev/null +++ b/tests/fe/jacobians_face.output @@ -0,0 +1,301 @@ + +DEAL::2d Jacobians: +DEAL::1.2396 -0.1855 0.1241 1.5579 +DEAL::0.5337 0 0.0751 0.5858 +DEAL::0.4142 -0.2889 0.4142 1.0601 +DEAL::0.4142 0.2889 -0.4142 1.0601 +DEAL::0.5858 0 0 0.5858 +DEAL::0.5858 0 0 0.5858 +DEAL::0.5858 0 0 0.5858 +DEAL::0.5858 0 0 0.5858 +DEAL::0.2889 -0.4142 1.0601 0.4142 +DEAL::-0.2889 -0.4142 1.0601 -0.4142 +DEAL::0.1855 -1.2396 1.5579 0.1241 +DEAL::0 -0.5337 0.5858 0.0751 +DEAL::0.1241 1.5579 -1.2396 0.1855 +DEAL::0.0751 0.5858 -0.5337 0 +DEAL::0.4142 1.0601 -0.4142 0.2889 +DEAL::-0.4142 1.0601 -0.4142 -0.2889 +DEAL::0.5904 0.2071 -0.3010 0.2071 +DEAL::0.4142 -0.6003 0.4142 1.1510 +DEAL::0.6484 0 -0.1611 0.3536 +DEAL::0.7056 0.2097 -0.3449 0.4656 +DEAL::0.5000 0.1332 -0.1464 0.2971 +DEAL::0.6484 0 0.1611 0.3536 +DEAL::0.5904 -0.2071 0.3010 0.2071 +DEAL::0.6003 -0.4142 1.1510 0.4142 +DEAL::0.7428 -0.1629 0.2551 0.4947 +DEAL::0.5000 -0.0979 0.1464 0.3214 +DEAL::0.4130 0.2071 -0.0849 0.2071 +DEAL::0.4142 -0.1053 0.4142 0.8181 +DEAL::0.4130 0 -0.0849 0.3536 +DEAL::0.5000 0.1201 -0.1464 0.2686 +DEAL::0.2929 0.1201 0 0.2686 +DEAL::0.5858 0 0 0.5858 +DEAL::0.4130 0 0.0849 0.3536 +DEAL::0.4130 -0.2071 0.0849 0.2071 +DEAL::0.1053 -0.4142 0.8181 0.4142 +DEAL::0.5000 -0.0870 0.1464 0.2920 +DEAL::0.2929 -0.0870 0 0.2920 +DEAL::0.5858 0 0 0.5858 +DEAL:: +DEAL::2d inverse Jacobians: +DEAL::0.7972 0.0949 -0.0635 0.6343 +DEAL::1.8738 0 -0.2403 1.7071 +DEAL::1.8971 0.5171 -0.7413 0.7413 +DEAL::1.8971 -0.5171 0.7413 0.7413 +DEAL::1.7071 0 0 1.7071 +DEAL::1.7071 0 0 1.7071 +DEAL::1.7071 0 0 1.7071 +DEAL::1.7071 0 0 1.7071 +DEAL::0.7413 0.7413 -1.8971 0.5171 +DEAL::-0.7413 0.7413 -1.8971 -0.5171 +DEAL::0.0635 0.6343 -0.7972 0.0949 +DEAL::0.2403 1.7071 -1.8738 0 +DEAL::0.0949 -0.7972 0.6343 0.0635 +DEAL::0 -1.8738 1.7071 0.2403 +DEAL::0.5171 -1.8971 0.7413 0.7413 +DEAL::-0.5171 -1.8971 0.7413 -0.7413 +DEAL::1.1218 -1.1218 1.6305 3.1980 +DEAL::1.5867 0.8275 -0.5710 0.5710 +DEAL::1.5424 0 0.7030 2.8284 +DEAL::1.1615 -0.5233 0.8604 1.7603 +DEAL::1.7679 -0.7923 0.8715 2.9754 +DEAL::1.5424 0 -0.7030 2.8284 +DEAL::1.1218 1.1218 -1.6305 3.1980 +DEAL::0.5710 0.5710 -1.5867 0.8275 +DEAL::1.2096 0.3982 -0.6237 1.8162 +DEAL::1.8362 0.5594 -0.8367 2.8565 +DEAL::2.0082 -2.0082 0.8236 4.0048 +DEAL::2.1389 0.2753 -1.0830 1.0830 +DEAL::2.4212 0 0.5817 2.8284 +DEAL::1.7684 -0.7908 0.9641 3.2917 +DEAL::3.4142 -1.5268 0 3.7228 +DEAL::1.7071 0 0 1.7071 +DEAL::2.4212 0 -0.5817 2.8284 +DEAL::2.0082 2.0082 -0.8236 4.0048 +DEAL::1.0830 1.0830 -2.1389 0.2753 +DEAL::1.8395 0.5479 -0.9224 3.1494 +DEAL::3.4142 1.0169 0 3.4241 +DEAL::1.7071 0 0 1.7071 +DEAL:: +DEAL::3d Jacobians: +DEAL::0.8135 -0.0139 0.4404 -0.0123 0.7662 0.0586 -0.1278 -0.0139 0.4404 +DEAL::0.8135 0.0139 -0.4404 0.0123 0.7662 0.0586 0.1278 -0.0139 0.4404 +DEAL::0.8487 0.0077 -0.0231 0.0077 0.9111 0.4803 0.0077 -0.2042 0.4803 +DEAL::0.8487 -0.0077 -0.0231 -0.0077 0.9111 -0.4803 0.0077 0.2042 0.4803 +DEAL::1.5498 0.0063 0.1758 0.0093 1.6994 -0.0880 -0.1757 0.0651 1.6471 +DEAL::0.4226 0 0.0764 0 0.4226 -0.0323 0 0 0.5391 +DEAL::0.2042 -0.4803 -0.0077 0.9111 0.4803 0.0077 0.0077 -0.0231 0.8487 +DEAL::-0.2042 -0.4803 -0.0077 0.9111 -0.4803 -0.0077 -0.0077 -0.0231 0.8487 +DEAL::-0.0651 -1.6471 0.1757 1.6994 -0.0880 0.0093 0.0063 0.1758 1.5498 +DEAL::0 -0.5391 0 0.4226 0.0864 0 0 -0.0286 0.4226 +DEAL::0.0139 -0.4404 0.1278 0.7662 0.0586 -0.0123 -0.0139 0.4404 0.8135 +DEAL::0.0139 -0.4404 -0.1278 0.7662 0.0586 0.0123 0.0139 -0.4404 0.8135 +DEAL::0.9111 0.4803 0.0077 0.0077 -0.0231 0.8487 0.2042 -0.4803 -0.0077 +DEAL::0.8204 -0.4404 0.0139 0.0134 0.0586 0.7662 -0.1278 -0.4404 0.0139 +DEAL::1.6994 -0.0880 0.0093 0.0063 0.1758 1.5498 -0.0651 -1.6471 0.1757 +DEAL::0.4226 0.0864 0 0 -0.0286 0.4226 0 -0.5391 0 +DEAL::0.7662 0.0586 -0.0123 -0.0139 0.4404 0.8135 0.0139 -0.4404 0.1278 +DEAL::0.7662 0.0586 0.0123 0.0139 -0.4404 0.8135 0.0139 -0.4404 -0.1278 +DEAL::1.6471 -0.1757 0.0651 0.1758 1.5498 0.0063 -0.0880 0.0093 1.6994 +DEAL::0.5391 0 0 0.0764 0.4226 0 -0.0323 0 0.4226 +DEAL::0.4404 -0.1278 -0.0139 0.4404 0.8135 -0.0139 0.0586 -0.0123 0.7662 +DEAL::0.4404 0.1278 -0.0139 -0.4404 0.8135 0.0139 0.0586 0.0123 0.7662 +DEAL::0.4404 -0.0139 -0.1278 0.0586 0.7662 -0.0134 0.4404 -0.0139 0.8204 +DEAL::0.4803 0.0077 0.2042 -0.0231 0.8487 -0.0077 -0.4803 -0.0077 0.9111 +DEAL::0.8204 0.4404 -0.0139 -0.1278 0.4404 -0.0139 -0.0134 0.0586 0.7662 +DEAL::0.9111 -0.4803 -0.0077 0.2042 0.4803 0.0077 -0.0077 -0.0231 0.8487 +DEAL::1.6994 -0.0880 0.0093 0.0651 1.6471 -0.1757 0.0063 0.1758 1.5498 +DEAL::0.4226 -0.0323 0 0 0.5391 0 0 0.0764 0.4226 +DEAL::0.8487 -0.0231 0.0075 0.0077 0.4803 -0.2042 0.0077 0.4803 0.9092 +DEAL::0.7662 0.0586 0.0123 -0.0139 0.4404 0.1278 0.0139 -0.4404 0.8135 +DEAL::0.1758 1.5498 0.0063 -1.6471 0.1757 -0.0651 -0.0880 0.0093 1.6994 +DEAL::-0.0286 0.4226 0 -0.5391 0 0 0.0864 0 0.4226 +DEAL::0.4404 0.8135 -0.0139 -0.4404 0.1278 0.0139 0.0586 -0.0123 0.7662 +DEAL::-0.4803 0.9092 -0.0077 -0.4803 -0.2042 -0.0077 -0.0231 -0.0075 0.8487 +DEAL::-0.0231 0.8487 0.0077 -0.4803 -0.0077 0.2042 0.4803 0.0077 0.9111 +DEAL::0.0586 0.7662 0.0134 -0.4404 0.0139 -0.1278 -0.4404 0.0139 0.8204 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4796 0 0 0.2569 0.4226 0 0.2223 0 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 0.2223 0 0 0.4796 0 0 0.2569 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 0 0.2569 0 0.4226 0.2223 0 0 0.4796 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0 -0.4796 0 0.4226 0.2761 0 0 0.2067 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 -0.2478 0 0 0.4737 0 0 0.2543 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 0 -0.1895 0 0.4226 0.2320 0 0 0.4968 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4968 0 0 -0.1895 0.4226 0 0.2320 0 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2067 0.4226 0 -0.4796 0 0 0.2761 0 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 0 0.2543 0 0.4226 -0.2478 0 0 0.4737 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0 -0.4968 0 0.4226 -0.2068 0 0 0.2127 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::-0.2316 0.4226 0 -0.4737 0 0 0.2720 0 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 0 -0.1875 0 0.4226 -0.2582 0 0 0.4902 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4737 0 0 0.2543 0.4226 0 -0.2478 0 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 0.2320 0 0 0.4968 0 0 -0.1895 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 0.2761 0 0 0.2067 0.4226 0 -0.4796 0 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0 -0.4737 0 0.4226 0.2720 0 0 -0.2316 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 -0.2582 0 0 0.4902 0 0 -0.1875 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 -0.2068 0 0 0.2127 0.4226 0 -0.4968 0 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4902 0 0 -0.1875 0.4226 0 -0.2582 0 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2127 0.4226 0 -0.4968 0 0 -0.2068 0 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 0.2720 0 0 -0.2316 0.4226 0 -0.4737 0 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0 -0.4902 0 0.4226 -0.2035 0 0 -0.2381 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::-0.2381 0.4226 0 -0.4902 0 0 -0.2035 0 0.4226 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.2113 0 0 0 0.2113 0 0 0 0.2113 +DEAL::0.4226 -0.2035 0 0 -0.2381 0.4226 0 -0.4902 0 +DEAL:: +DEAL::3d inverse Jacobians: +DEAL::1.0623 0 -1.0623 -0.0066 1.3019 -0.1668 0.3081 0.0411 1.9570 +DEAL::1.0623 0 1.0623 0.0066 1.3019 -0.1668 -0.3081 0.0411 1.9570 +DEAL::1.1777 0.0023 0.0544 0 0.8966 -0.8966 -0.0189 0.3813 1.7000 +DEAL::1.1777 -0.0023 0.0544 0 0.8966 0.8966 -0.0189 -0.3813 1.7000 +DEAL::0.6375 0.0002 -0.0680 0.0000 0.5872 0.0314 0.0680 -0.0232 0.5986 +DEAL::2.3660 0 -0.3353 0 2.3660 0.1420 0 0 1.8549 +DEAL::0.8966 0.8966 0 -1.7000 0.3813 -0.0189 -0.0544 0.0023 1.1777 +DEAL::-0.8966 0.8966 0 -1.7000 -0.3813 -0.0189 -0.0544 -0.0023 1.1777 +DEAL::-0.0314 0.5872 0.0000 -0.5986 -0.0232 0.0680 0.0680 0.0002 0.6375 +DEAL::0.3790 2.3660 0 -1.8549 0 0 -0.1256 0 2.3660 +DEAL::0.1668 1.3019 -0.0066 -1.9570 0.0411 0.3081 1.0623 0 1.0623 +DEAL::0.1668 1.3019 0.0066 -1.9570 0.0411 -0.3081 -1.0623 0 1.0623 +DEAL::0.8966 0 0.8966 0.3813 -0.0189 -1.7000 0.0023 1.1777 -0.0544 +DEAL::1.0545 0 -1.0545 -0.3059 0.0411 -1.9592 0.0050 1.3019 0.1684 +DEAL::0.5872 0.0000 -0.0314 -0.0232 0.0680 -0.5986 0.0002 0.6375 0.0680 +DEAL::2.3660 0 0.3790 0 0 -1.8549 0 2.3660 -0.1256 +DEAL::1.3019 -0.0066 0.1668 0.0411 0.3081 -1.9570 0 1.0623 1.0623 +DEAL::1.3019 0.0066 0.1668 0.0411 -0.3081 -1.9570 0 1.0623 -1.0623 +DEAL::0.5986 0.0680 -0.0232 -0.0680 0.6375 0.0002 0.0314 0.0000 0.5872 +DEAL::1.8549 0 0 -0.3353 2.3660 0 0.1420 0 2.3660 +DEAL::1.9570 0.3081 0.0411 -1.0623 1.0623 0 -0.1668 -0.0066 1.3019 +DEAL::1.9570 -0.3081 0.0411 1.0623 1.0623 0 -0.1668 0.0066 1.3019 +DEAL::1.9592 0.0411 0.3059 -0.1684 1.3019 -0.0050 -1.0545 0 1.0545 +DEAL::1.7000 -0.0189 -0.3813 0.0544 1.1777 -0.0023 0.8966 0 0.8966 +DEAL::1.0545 -1.0545 0 0.3059 1.9592 0.0411 -0.0050 -0.1684 1.3019 +DEAL::0.8966 0.8966 0 -0.3813 1.7000 -0.0189 -0.0023 0.0544 1.1777 +DEAL::0.5872 0.0314 0.0000 -0.0232 0.5986 0.0680 0.0002 -0.0680 0.6375 +DEAL::2.3660 0.1420 0 0 1.8549 0 0 -0.3353 2.3660 +DEAL::1.1777 0.0543 0.0024 -0.0189 1.6994 0.3819 0 -0.8981 0.8981 +DEAL::1.3019 -0.1668 0.0066 0.0411 1.9570 -0.3081 0 1.0623 1.0623 +DEAL::0.0680 -0.5986 -0.0232 0.6375 0.0680 0.0002 0.0000 -0.0314 0.5872 +DEAL::0 -1.8549 0 2.3660 -0.1256 0 0 0.3790 2.3660 +DEAL::0.3081 -1.9570 0.0411 1.0623 1.0623 0 -0.0066 0.1668 1.3019 +DEAL::-0.3819 -1.6994 -0.0189 0.8981 -0.8981 0 -0.0024 -0.0543 1.1777 +DEAL::-0.0189 -1.7000 0.3813 1.1777 -0.0544 0.0023 0 0.8966 0.8966 +DEAL::0.0411 -1.9592 -0.3059 1.3019 0.1684 0.0050 0 -1.0545 1.0545 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.0849 0 0 -1.2674 2.3660 0 -1.0966 0 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 -1.0966 0 0 2.0849 0 0 -1.2674 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 0 -1.2674 0 2.3660 -1.0966 0 0 2.0849 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::1.3621 2.3660 0 -2.0849 0 0 1.0199 0 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 1.2378 0 0 2.1111 0 0 -1.2703 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 0 0.9027 0 2.3660 -1.1048 0 0 2.0129 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.0129 0 0 0.9027 2.3660 0 -1.1048 0 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::0 -2.0849 0 2.3660 1.0199 0 0 1.3621 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 0 -1.2703 0 2.3660 1.2378 0 0 2.1111 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::-0.9849 2.3660 0 -2.0129 0 0 1.0129 0 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::0 -2.1111 0 2.3660 -1.1569 0 0 1.3588 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 0 0.9052 0 2.3660 1.2464 0 0 2.0401 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.1111 0 0 -1.2703 2.3660 0 1.2378 0 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 -1.1048 0 0 2.0129 0 0 0.9027 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 0 1.3621 0 0 -2.0849 0 2.3660 1.0199 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::1.3588 2.3660 0 -2.1111 0 0 -1.1569 0 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 1.2464 0 0 2.0401 0 0 0.9052 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 0 -0.9849 0 0 -2.0129 0 2.3660 1.0129 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.0401 0 0 0.9052 2.3660 0 1.2464 0 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::0 -2.0129 0 2.3660 1.0129 0 0 -0.9849 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 0 1.3588 0 0 -2.1111 0 2.3660 -1.1569 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::-0.9820 2.3660 0 -2.0401 0 0 -1.1494 0 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::0 -2.0401 0 2.3660 -1.1494 0 0 -0.9820 2.3660 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::4.7321 0 0 0 4.7321 0 0 0 4.7321 +DEAL::2.3660 0 -0.9820 0 0 -2.0401 0 2.3660 -1.1494 +DEAL:: diff --git a/tests/fe/jacobians_face_cartesian.cc b/tests/fe/jacobians_face_cartesian.cc new file mode 100644 index 0000000000..e2ba285fb6 --- /dev/null +++ b/tests/fe/jacobians_face_cartesian.cc @@ -0,0 +1,122 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2012 - 2014 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. +// +// --------------------------------------------------------------------- + + +// Show the Jacobians and inverse Jacobians of FEFaceValues and +// FESubfaceValues on a Cartesian mesh with MappingCartesian with one +// quadrature point + +#include "../tests.h" +#include +#include +#include +#include +#include +#include + +template +void test() +{ + Triangulation tria; + GridGenerator::hyper_cube (tria); + tria.refine_global(1); + tria.begin_active()->set_refine_flag(); + tria.execute_coarsening_and_refinement(); + + MappingCartesian mapping; + FE_Nothing dummy; + // choose a point that is not right in the middle of the cell so that the + // Jacobian contains many nonzero entries + Point quad_p; + for (int d=0; d quad(quad_p); + FEFaceValues fe_val (mapping, dummy, quad, + update_jacobians | update_inverse_jacobians); + FESubfaceValues fe_sub_val (mapping, dummy, quad, + update_jacobians | update_inverse_jacobians); + deallog << dim << "d Jacobians:" << std::endl; + typename Triangulation::active_cell_iterator + cell = tria.begin_active(), endc = tria.end(); + for ( ; cell != endc; ++cell) + for (unsigned int f=0; f::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d::faces_per_cell; ++f) + { + fe_val.reinit (cell, f); + + for (unsigned int d=0; dat_boundary(f) == false && + cell->neighbor(f)->level() < cell->level()) + { + fe_sub_val.reinit(cell->neighbor(f), cell->neighbor_face_no(f), + cell->neighbor_of_coarser_neighbor(f).second); + + for (unsigned int d=0; d(); + test<3>(); + + return 0; +} diff --git a/tests/fe/jacobians_face_cartesian.output b/tests/fe/jacobians_face_cartesian.output new file mode 100644 index 0000000000..7df785fb1b --- /dev/null +++ b/tests/fe/jacobians_face_cartesian.output @@ -0,0 +1,277 @@ + +DEAL::2d Jacobians: +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.5000 0 0 0.5000 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.5000 0 0 0.5000 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.5000 0 0 0.5000 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.5000 0 0 0.5000 +DEAL::0.2500 0 0 0.2500 +DEAL::0.2500 0 0 0.2500 +DEAL::0.5000 0 0 0.5000 +DEAL:: +DEAL::2d inverse Jacobians: +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::2.0000 0 0 2.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::4.0000 0 0 4.0000 +DEAL::2.0000 0 0 2.0000 +DEAL:: +DEAL::3d Jacobians: +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.2500 0 0 0 0.2500 0 0 0 0.2500 +DEAL::0.5000 0 0 0 0.5000 0 0 0 0.5000 +DEAL:: +DEAL::3d inverse Jacobians: +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::4.0000 0 0 0 4.0000 0 0 0 4.0000 +DEAL::2.0000 0 0 0 2.0000 0 0 0 2.0000 +DEAL::