From: Martin Kronbichler Date: Tue, 18 May 2021 14:05:49 +0000 (+0200) Subject: Refactor FEPointEvaluation X-Git-Tag: v9.3.0-rc1~38^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12236%2Fhead;p=dealii.git Refactor FEPointEvaluation --- diff --git a/examples/step-19/step-19.cc b/examples/step-19/step-19.cc index e3af6b4d97..4acbb2034b 100644 --- a/examples/step-19/step-19.cc +++ b/examples/step-19/step-19.cc @@ -144,7 +144,7 @@ namespace Step19 void output_results() const; Triangulation triangulation; - MappingQ mapping; + MappingQGeneric mapping; FE_Q fe; DoFHandler dof_handler; AffineConstraints constraints; @@ -652,7 +652,7 @@ namespace Step19 const double dt = time.get_next_step_size(); Vector solution_values(fe.n_dofs_per_cell()); - FEPointEvaluation<1, dim> evaluator(mapping, fe); + FEPointEvaluation<1, dim> evaluator(mapping, fe, update_gradients); for (const auto &cell : dof_handler.active_cell_iterators()) if (particle_handler.n_particles_in_cell(cell) > 0) @@ -670,9 +670,8 @@ namespace Step19 // Then we can ask the FEPointEvaluation object for the gradients of // the solution (i.e., the electric field $\mathbf E$) at these // locations and loop over the individual particles: - evaluator.evaluate(cell, - particle_positions, - make_array_view(solution_values), + evaluator.reinit(cell, particle_positions); + evaluator.evaluate(make_array_view(solution_values), EvaluationFlags::gradients); { diff --git a/include/deal.II/fe/fe_point_evaluation.h b/include/deal.II/fe/fe_point_evaluation.h index 75213d9640..8acf9d16c2 100644 --- a/include/deal.II/fe/fe_point_evaluation.h +++ b/include/deal.II/fe/fe_point_evaluation.h @@ -1,18 +1,17 @@ -/* --------------------------------------------------------------------- - * - * Copyright (C) 2020 - 2021 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.md at - * the top level directory of deal.II. - * - * --------------------------------------------------------------------- - */ +// --------------------------------------------------------------------- +// +// Copyright (C) 2020 - 2021 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.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- #ifndef dealii_fe_point_evaluation_h #define dealii_fe_point_evaluation_h @@ -22,6 +21,7 @@ #include #include #include +#include #include #include @@ -365,6 +365,14 @@ namespace internal * well to the location. The two typical use cases are evaluations on * non-matching grids and particle simulations. * + * The use of this class is similar to FEValues or FEEvaluation: The class is + * first initialized to a cell by calling `FEPointEvaluation::reinit(cell, + * unit_points)`, with the main difference to the other concepts that the + * underlying points in reference coordinates need to be passed along. Then, + * upon call to evaluate() or integrate(), the user can compute information at + * the give points. Eventually, the access functions get_value() or + * get_gradient() allow to query this information at a specific point index. + * * The functionality is similar to creating an FEValues object with a * Quadrature object on the `unit_points` on every cell separately and then * calling FEValues::get_function_values or FEValues::get_function_gradients, @@ -399,23 +407,38 @@ public: * @param fe The FiniteElement object that is used for the evaluation, which * is typically the same on all cells to be evaluated. * + * @param update_flags Specify the quantities to be computed by the mapping + * during the call of reinit(). During evaluate() or integrate(), this data + * is queried to produce the desired result (e.g., the gradient of a finite + * element solution). + * * @param first_selected_component For multi-component FiniteElement * objects, this parameter allows to select a range of `n_components` * components starting from this parameter. */ FEPointEvaluation(const Mapping & mapping, const FiniteElement &fe, + const UpdateFlags update_flags, const unsigned int first_selected_component = 0); /** - * This function interpolates the finite element solution, represented by - * `solution_values` on the given cell, to the `unit_points` passed to the - * function. + * Set up the mapping information for the given cell, e.g., by computing the + * Jacobian of the mapping the given points if gradients of the functions + * are requested. * - * @param[in] cell An iterator to the current cell in question + * @param[in] cell An iterator to the current cell * * @param[in] unit_points List of points in the reference locations of the - * current cell where the FiniteElement object should be evaluated + * current cell where the FiniteElement object should be + * evaluated/integrated in the evaluate() and integrate() functions. + */ + void + reinit(const typename Triangulation::cell_iterator &cell, + const ArrayView> &unit_points); + + /** + * This function interpolates the finite element solution, represented by + * `solution_values`, on the cell and `unit_points` passed to reinit(). * * @param[in] solution_values This array is supposed to contain the unknown * values on the element as returned by `cell->get_dof_values(global_vector, @@ -425,9 +448,7 @@ public: * evaluated at the points. */ void - evaluate(const typename Triangulation::cell_iterator &cell, - const ArrayView> & unit_points, - const ArrayView & solution_values, + evaluate(const ArrayView & solution_values, const EvaluationFlags::EvaluationFlags &evaluation_flags); /** @@ -441,11 +462,6 @@ public: * multiplication of a `JxW` information of the data given to * submit_value(), the integration can also be represented by this class. * - * @param[in] cell An iterator to the current cell in question - * - * @param[in] unit_points List of points in the reference locations of the - * current cell where the FiniteElement object should be evaluated - * * @param[out] solution_values This array will contain the result of the * integral, which can be used to during * `cell->set_dof_values(solution_values, global_vector)` or @@ -459,60 +475,101 @@ public: * */ void - integrate(const typename Triangulation::cell_iterator &cell, - const ArrayView> & unit_points, - const ArrayView & solution_values, + integrate(const ArrayView & solution_values, const EvaluationFlags::EvaluationFlags &integration_flags); /** - * Return the value at quadrature point number @p q_point after a call to + * Return the value at quadrature point number @p point_index after a call to * FEPointEvaluation::evaluate() with EvaluationFlags::value set, or * the value that has been stored there with a call to * FEPointEvaluation::submit_value(). If the object is vector-valued, a - * vector-valued return argument is given. Note that when - * vectorization is enabled, values from several points are grouped together. + * vector-valued return argument is given. */ const value_type & - get_value(const unsigned int q_point) const; + get_value(const unsigned int point_index) const; /** * Write a value to the field containing the values on points - * with component q_point. Access to the same field as through get_value(). - * If applied before the function FEPointEvaluation::integrate() + * with component point_index. Access to the same field as through + * get_value(). If applied before the function FEPointEvaluation::integrate() * with EvaluationFlags::values set is called, this specifies the value * which is tested by all basis function on the current cell and * integrated over. */ void - submit_value(const value_type &value, const unsigned int q_point); + submit_value(const value_type &value, const unsigned int point_index); /** - * Return the gradient at quadrature point number @p q_point after a call to - * FEPointEvaluation::evaluate() with EvaluationFlags::gradient set, or - * the gradient that has been stored there with a call to - * FEPointEvaluation::submit_gradient(). If the object is vector-valued, a - * vector-valued return argument is given. Note that when - * vectorization is enabled, values from several points are grouped together. + * Return the gradient in real coordinates at the point with index + * `point_index` after a call to FEPointEvaluation::evaluate() with + * EvaluationFlags::gradient set, or the gradient that has been stored there + * with a call to FEPointEvaluation::submit_gradient(). The gradient in real + * coordinates is obtained by taking the unit gradient (also accessible via + * get_unit_gradient()) and applying the inverse Jacobian of the mapping. If + * the object is vector-valued, a vector-valued return argument is given. */ const gradient_type & - get_gradient(const unsigned int q_point) const; + get_gradient(const unsigned int point_index) const; + + /** + * Return the gradient in unit coordinates at the point with index + * `point_index` after a call to FEPointEvaluation::evaluate() with + * EvaluationFlags::gradient set, or the gradient that has been stored there + * with a call to FEPointEvaluation::submit_gradient(). If the object is + * vector-valued, a vector-valued return argument is given. Note that when + * vectorization is enabled, values from several points are grouped + * together. + */ + const gradient_type & + get_unit_gradient(const unsigned int point_index) const; /** * Write a contribution that is tested by the gradient to the field - * containing the values on points with component q_point. Access to the same - * field as through get_gradient(). If applied before the function - * FEPointEvaluation::integrate(EvaluationFlags::gradients) is called, - * this specifies what is tested by all basis function gradients on the - * current cell and integrated over. + * containing the values on points with the given `point_index`. Access to + * the same field as through get_gradient(). If applied before the function + * FEPointEvaluation::integrate(EvaluationFlags::gradients) is called, this + * specifies what is tested by all basis function gradients on the current + * cell and integrated over. */ void - submit_gradient(const gradient_type &, const unsigned int q_point); + submit_gradient(const gradient_type &, const unsigned int point_index); + + /** + * Return the Jacobian of the transformation on the current cell with the + * given point index. Prerequisite: This class needs to be constructed with + * UpdateFlags containing `update_jacobian`. + */ + DerivativeForm<1, dim, spacedim> + jacobian(const unsigned int point_index) const; + + /** + * Return the inverse of the Jacobian of the transformation on the current + * cell with the given point index. Prerequisite: This class needs to be + * constructed with UpdateFlags containing `update_inverse_jacobian` or + * `update_gradients`. + */ + DerivativeForm<1, spacedim, dim> + inverse_jacobian(const unsigned int point_index) const; + + /** + * Return the position in real coordinates of the given point index among + * the points passed to reinit(). + */ + Point + real_point(const unsigned int point_index) const; + + /** + * Return the position in unit/reference coordinates of the given point + * index, i.e., the respective point passed to the reinit() function. + */ + Point + unit_point(const unsigned int point_index) const; private: /** * Pointer to the Mapping object passed to the constructor. */ - SmartPointer> mapping; + SmartPointer> mapping; /** * Pointer to MappingQGeneric class that enables the fast path of this @@ -568,7 +625,12 @@ private: std::vector values; /** - * Temporary array to store the gradients at the points. + * Temporary array to store the gradients in unit coordinates at the points. + */ + std::vector unit_gradients; + + /** + * Temporary array to store the gradients in real coordinates at the points. */ std::vector gradients; @@ -584,6 +646,33 @@ private: * components. */ std::vector> nonzero_shape_function_component; + + /** + * The desired update flags for the evaluation. + */ + UpdateFlags update_flags; + + /** + * The update flags specific for the mapping in the fast evaluation path. + */ + UpdateFlags update_flags_mapping; + + /** + * The FEValues object underlying the slow evaluation path. + */ + std::shared_ptr> fe_values; + + /** + * Array to store temporary data computed by the mapping for the fast + * evaluation path. + */ + internal::FEValuesImplementation::MappingRelatedData + mapping_data; + + /** + * The reference points specified at reinit(). + */ + std::vector> unit_points; }; // ----------------------- template and inline function ---------------------- @@ -593,11 +682,14 @@ template FEPointEvaluation::FEPointEvaluation( const Mapping & mapping, const FiniteElement &fe, + const UpdateFlags update_flags, const unsigned int first_selected_component) : mapping(&mapping) , mapping_q_generic( dynamic_cast *>(&mapping)) , fe(&fe) + , update_flags(update_flags) + , update_flags_mapping(update_default) { bool same_base_element = true; unsigned int base_element_number = 0; @@ -649,25 +741,70 @@ FEPointEvaluation::FEPointEvaluation( } } } + + // translate update flags + if (update_flags & update_jacobians) + update_flags_mapping |= update_jacobians; + if (update_flags & update_gradients || + update_flags & update_inverse_jacobians) + update_flags_mapping |= update_inverse_jacobians; + if (update_flags & update_quadrature_points) + update_flags_mapping |= update_quadrature_points; } template void -FEPointEvaluation::evaluate( +FEPointEvaluation::reinit( const typename Triangulation::cell_iterator &cell, - const ArrayView> & unit_points, - const ArrayView & solution_values, - const EvaluationFlags::EvaluationFlags & evaluation_flag) + const ArrayView> & unit_points) { - if (unit_points.size() == 0) // no evaluation points provided + this->unit_points.resize(unit_points.size()); + std::copy(unit_points.begin(), unit_points.end(), this->unit_points.begin()); + + if (!poly.empty()) + mapping_q_generic->fill_mapping_data_for_generic_points( + cell, unit_points, update_flags_mapping, mapping_data); + else { - values.clear(); - gradients.clear(); - return; + fe_values = std::make_shared>( + *mapping, + *fe, + Quadrature( + std::vector>(unit_points.begin(), unit_points.end())), + update_flags | update_flags_mapping); + fe_values->reinit(cell); + mapping_data.initialize(unit_points.size(), update_flags_mapping); + if (update_flags_mapping & update_jacobians) + for (unsigned int q = 0; q < unit_points.size(); ++q) + mapping_data.jacobians[q] = fe_values->jacobian(q); + if (update_flags_mapping & update_inverse_jacobians) + for (unsigned int q = 0; q < unit_points.size(); ++q) + mapping_data.inverse_jacobians[q] = fe_values->inverse_jacobian(q); + if (update_flags_mapping & update_quadrature_points) + for (unsigned int q = 0; q < unit_points.size(); ++q) + mapping_data.quadrature_points[q] = fe_values->quadrature_point(q); } + if (update_flags & update_values) + values.resize(unit_points.size(), numbers::signaling_nan()); + if (update_flags & update_gradients) + gradients.resize(unit_points.size(), + numbers::signaling_nan()); +} + + + +template +void +FEPointEvaluation::evaluate( + const ArrayView & solution_values, + const EvaluationFlags::EvaluationFlags &evaluation_flag) +{ + if (unit_points.empty()) + return; + AssertDimension(solution_values.size(), fe->dofs_per_cell); if (((evaluation_flag & EvaluationFlags::values) || (evaluation_flag & EvaluationFlags::gradients)) && @@ -684,10 +821,10 @@ FEPointEvaluation::evaluate( comp, solution_renumbered[i]); - if (evaluation_flag & EvaluationFlags::values) - values.resize(unit_points.size()); - if (evaluation_flag & EvaluationFlags::gradients) - gradients.resize(unit_points.size()); + // unit gradients are currently only implemented with the fast tensor + // path + unit_gradients.resize(unit_points.size(), + numbers::signaling_nan()); const std::size_t n_points = unit_points.size(); const std::size_t n_lanes = VectorizedArray::size(); @@ -714,41 +851,34 @@ FEPointEvaluation::evaluate( EvaluatorTypeTraits::set_value( val_and_grad.first, j, values[i + j]); if (evaluation_flag & EvaluationFlags::gradients) - for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j) - internal::FEPointEvaluation:: - EvaluatorTypeTraits::set_gradient( - val_and_grad.second, j, gradients[i + j]); - } - - // let mapping compute the transformation - if (evaluation_flag & EvaluationFlags::gradients) - { - Assert(mapping_q_generic != nullptr, ExcInternalError()); - mapping_q_generic->transform_variable( - cell, - mapping_covariant, - /* apply_from_left */ true, - unit_points, - ArrayView(gradients.data(), gradients.size()), - ArrayView(gradients.data(), gradients.size())); + { + Assert(update_flags & update_gradients || + update_flags & update_inverse_jacobians, + ExcNotInitialized()); + for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j) + { + Assert(update_flags_mapping & update_inverse_jacobians, + ExcNotInitialized()); + internal::FEPointEvaluation::EvaluatorTypeTraits< + dim, + n_components, + Number>::set_gradient(val_and_grad.second, + j, + unit_gradients[i + j]); + gradients[i + j] = apply_transformation( + mapping_data.inverse_jacobians[i + j].transpose(), + unit_gradients[i + j]); + } + } } } else if ((evaluation_flag & EvaluationFlags::values) || (evaluation_flag & EvaluationFlags::gradients)) { // slow path with FEValues - const UpdateFlags flags = - ((evaluation_flag & EvaluationFlags::values) ? update_values : - update_default) | - ((evaluation_flag & EvaluationFlags::gradients) ? update_gradients : - update_default); - FEValues fe_values( - *mapping, - *fe, - Quadrature( - std::vector>(unit_points.begin(), unit_points.end())), - flags); - fe_values.reinit(cell); + Assert(fe_values.get() != nullptr, + ExcMessage( + "Not initialized. Please call FEPointEvaluation::reinit()!")); if (evaluation_flag & EvaluationFlags::values) { @@ -763,13 +893,13 @@ FEPointEvaluation::evaluate( for (unsigned int q = 0; q < unit_points.size(); ++q) internal::FEPointEvaluation:: EvaluatorTypeTraits::access( - values[q], d) += fe_values.shape_value(i, q) * value; + values[q], d) += fe_values->shape_value(i, q) * value; else if (nonzero_shape_function_component[i][d]) for (unsigned int q = 0; q < unit_points.size(); ++q) internal::FEPointEvaluation:: EvaluatorTypeTraits::access( values[q], d) += - fe_values.shape_value_component(i, q, d) * value; + fe_values->shape_value_component(i, q, d) * value; } } @@ -786,13 +916,13 @@ FEPointEvaluation::evaluate( for (unsigned int q = 0; q < unit_points.size(); ++q) internal::FEPointEvaluation:: EvaluatorTypeTraits::access( - gradients[q], d) += fe_values.shape_grad(i, q) * value; + gradients[q], d) += fe_values->shape_grad(i, q) * value; else if (nonzero_shape_function_component[i][d]) for (unsigned int q = 0; q < unit_points.size(); ++q) internal::FEPointEvaluation:: EvaluatorTypeTraits::access( gradients[q], d) += - fe_values.shape_grad_component(i, q, d) * value; + fe_values->shape_grad_component(i, q, d) * value; } } } @@ -803,10 +933,8 @@ FEPointEvaluation::evaluate( template void FEPointEvaluation::integrate( - const typename Triangulation::cell_iterator &cell, - const ArrayView> & unit_points, - const ArrayView & solution_values, - const EvaluationFlags::EvaluationFlags & integration_flags) + const ArrayView & solution_values, + const EvaluationFlags::EvaluationFlags &integration_flags) { if (unit_points.size() == 0) // no evaluation points provided { @@ -821,20 +949,6 @@ FEPointEvaluation::integrate( { // fast path with tensor product integration - // let mapping apply the transformation - if (integration_flags & EvaluationFlags::gradients) - { - Assert(mapping_q_generic != nullptr, ExcInternalError()); - - mapping_q_generic->transform_variable( - cell, - mapping_covariant, - /* apply_from_left */ false, - unit_points, - ArrayView(gradients.data(), gradients.size()), - ArrayView(gradients.data(), gradients.size())); - } - if (integration_flags & EvaluationFlags::values) AssertIndexRange(unit_points.size(), values.size() + 1); if (integration_flags & EvaluationFlags::gradients) @@ -876,9 +990,16 @@ FEPointEvaluation::integrate( value, j, values[i + j]); if (integration_flags & EvaluationFlags::gradients) for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j) - internal::FEPointEvaluation:: - EvaluatorTypeTraits::get_gradient( - gradient, j, gradients[i + j]); + { + Assert(update_flags_mapping & update_inverse_jacobians, + ExcNotInitialized()); + gradients[i + j] = + apply_transformation(mapping_data.inverse_jacobians[i + j], + gradients[i + j]); + internal::FEPointEvaluation:: + EvaluatorTypeTraits::get_gradient( + gradient, j, gradients[i + j]); + } // compute internal::integrate_add_tensor_product_value_and_gradient( @@ -909,19 +1030,10 @@ FEPointEvaluation::integrate( (integration_flags & EvaluationFlags::gradients)) { // slow path with FEValues - const UpdateFlags flags = - ((integration_flags & EvaluationFlags::values) ? update_values : - update_default) | - ((integration_flags & EvaluationFlags::gradients) ? update_gradients : - update_default); - FEValues fe_values( - *mapping, - *fe, - Quadrature( - std::vector>(unit_points.begin(), unit_points.end())), - flags); - fe_values.reinit(cell); + Assert(fe_values.get() != nullptr, + ExcMessage( + "Not initialized. Please call FEPointEvaluation::reinit()!")); std::fill(solution_values.begin(), solution_values.end(), 0.0); if (integration_flags & EvaluationFlags::values) @@ -934,14 +1046,14 @@ FEPointEvaluation::integrate( (fe->is_primitive(i) || fe->is_primitive())) for (unsigned int q = 0; q < unit_points.size(); ++q) solution_values[i] += - fe_values.shape_value(i, q) * + fe_values->shape_value(i, q) * internal::FEPointEvaluation:: EvaluatorTypeTraits::access( values[q], d); else if (nonzero_shape_function_component[i][d]) for (unsigned int q = 0; q < unit_points.size(); ++q) solution_values[i] += - fe_values.shape_value_component(i, q, d) * + fe_values->shape_value_component(i, q, d) * internal::FEPointEvaluation:: EvaluatorTypeTraits::access( values[q], d); @@ -958,14 +1070,14 @@ FEPointEvaluation::integrate( (fe->is_primitive(i) || fe->is_primitive())) for (unsigned int q = 0; q < unit_points.size(); ++q) solution_values[i] += - fe_values.shape_grad(i, q) * + fe_values->shape_grad(i, q) * internal::FEPointEvaluation:: EvaluatorTypeTraits::access( gradients[q], d); else if (nonzero_shape_function_component[i][d]) for (unsigned int q = 0; q < unit_points.size(); ++q) solution_values[i] += - fe_values.shape_grad_component(i, q, d) * + fe_values->shape_grad_component(i, q, d) * internal::FEPointEvaluation:: EvaluatorTypeTraits::access( gradients[q], d); @@ -980,10 +1092,10 @@ template inline const typename FEPointEvaluation:: value_type & FEPointEvaluation::get_value( - const unsigned int q_point) const + const unsigned int point_index) const { - AssertIndexRange(q_point, values.size()); - return values[q_point]; + AssertIndexRange(point_index, values.size()); + return values[point_index]; } @@ -992,10 +1104,26 @@ template inline const typename FEPointEvaluation:: gradient_type & FEPointEvaluation::get_gradient( - const unsigned int q_point) const + const unsigned int point_index) const +{ + AssertIndexRange(point_index, gradients.size()); + return gradients[point_index]; +} + + + +template +inline const typename FEPointEvaluation:: + gradient_type & + FEPointEvaluation::get_unit_gradient( + const unsigned int point_index) const { - AssertIndexRange(q_point, gradients.size()); - return gradients[q_point]; + Assert(!poly.empty(), + ExcMessage("Unit gradients are currently only implemented for tensor " + "product finite elements combined with MappingQGeneric " + "mappings")); + AssertIndexRange(point_index, unit_gradients.size()); + return unit_gradients[point_index]; } @@ -1004,12 +1132,10 @@ template inline void FEPointEvaluation::submit_value( const value_type & value, - const unsigned int q_point) + const unsigned int point_index) { - if (values.size() <= q_point) - values.resize(values.size() + 1); - - values[q_point] = value; + AssertIndexRange(point_index, unit_points.size()); + values[point_index] = value; } @@ -1018,12 +1144,59 @@ template inline void FEPointEvaluation::submit_gradient( const gradient_type &gradient, - const unsigned int q_point) + const unsigned int point_index) { - if (gradients.size() <= q_point) - gradients.resize(gradients.size() + 1); + AssertIndexRange(point_index, unit_points.size()); + gradients[point_index] = gradient; +} + + + +template +inline DerivativeForm<1, dim, spacedim> +FEPointEvaluation::jacobian( + const unsigned int point_index) const +{ + Assert(update_flags_mapping & update_jacobians, ExcNotInitialized()); + AssertIndexRange(point_index, mapping_data.jacobians.size()); + return mapping_data.jacobians[point_index]; +} + - gradients[q_point] = gradient; + +template +inline DerivativeForm<1, spacedim, dim> +FEPointEvaluation::inverse_jacobian( + const unsigned int point_index) const +{ + Assert(update_flags_mapping & update_inverse_jacobians || + update_flags_mapping & update_gradients, + ExcNotInitialized()); + AssertIndexRange(point_index, mapping_data.inverse_jacobians.size()); + return mapping_data.inverse_jacobians[point_index]; +} + + + +template +inline Point +FEPointEvaluation::real_point( + const unsigned int point_index) const +{ + Assert(update_flags_mapping & update_quadrature_points, ExcNotInitialized()); + AssertIndexRange(point_index, mapping_data.quadrature_points.size()); + return mapping_data.quadrature_points[point_index]; +} + + + +template +inline Point +FEPointEvaluation::unit_point( + const unsigned int point_index) const +{ + AssertIndexRange(point_index, unit_points.size()); + return unit_points[point_index]; } DEAL_II_NAMESPACE_CLOSE diff --git a/include/deal.II/fe/mapping_q_generic.h b/include/deal.II/fe/mapping_q_generic.h index c941236ea9..ffabffb281 100644 --- a/include/deal.II/fe/mapping_q_generic.h +++ b/include/deal.II/fe/mapping_q_generic.h @@ -241,52 +241,12 @@ public: const typename Mapping::InternalDataBase &internal, const ArrayView> &output) const override; - /** - * As compared to the other transform functions that rely on pre-computed - * information of InternalDataBase, this function chooses the flexible - * evaluation path on the cell and points passed in to the current - * function. - * - * @param cell The cell where to evaluate the mapping - * - * @param kind Select the kind of the mapping to be applied; currently, this - * class only implements `mapping_covariant`. - * - * @param apply_from_left If true, the mapping is applied to a input - * vector from the left, the usual choice for the transformation of field - * variables. If false, the mapping is applied to the vector from the right, - * representing the transpose of the initial operation; this is the choice - * to be used for implementing the action by a test function in an - * integration step. - * - * @param unit_points The points in reference coordinates where the - * transformation should be computed and applied to the vector. - * - * @param input The array of vectors (e.g., gradients for - * `mapping_covariant`) to be transformed. - * - * @param output The array where the result will be stored. The types - * `Number` and `Number2` of the input and output arrays must be such that - * `Number2 = apply_transformation(DerivativeForm<1, spacedim, dim>, - * Number)`. In case the two number types match, this array can be the same - * as input array. - */ - template - void - transform_variable( - const typename Triangulation::cell_iterator &cell, - const MappingKind kind, - const bool apply_from_left, - const ArrayView> & unit_points, - const ArrayView & input, - const ArrayView & output) const; - /** * @} */ /** - * @name Interface with FEValues + * @name Interface with FEValues and friends * @{ */ @@ -644,6 +604,32 @@ public: dealii::internal::FEValuesImplementation::MappingRelatedData &output_data) const override; + + /** + * As opposed to the other fill_fe_values() and fill_fe_face_values() + * functions that rely on pre-computed information of InternalDataBase, this + * function chooses the flexible evaluation path on the cell and points + * passed in to the current function. + * + * @param[in] cell The cell where to evaluate the mapping + * + * @param[in] unit_points The points in reference coordinates where the + * transformation (Jacobians, positions) should be computed. + * + * @param[in] update_flags The kind of information that should be computed. + * + * @param[out] output_data A struct containing the evaluated quantities such + * as the Jacobian resulting from application of the mapping on the given + * cell with its underlying manifolds. + */ + void + fill_mapping_data_for_generic_points( + const typename Triangulation::cell_iterator &cell, + const ArrayView> & unit_points, + const UpdateFlags update_flags, + dealii::internal::FEValuesImplementation::MappingRelatedData + &output_data) const; + /** * @} */ @@ -952,99 +938,6 @@ MappingQGeneric::preserves_vertex_locations() const return true; } - - -template -template -inline void -MappingQGeneric::transform_variable( - const typename Triangulation::cell_iterator &cell, - const MappingKind kind, - const bool apply_from_left, - const ArrayView> & unit_points, - const ArrayView & input, - const ArrayView & output) const -{ - AssertDimension(unit_points.size(), output.size()); - AssertDimension(unit_points.size(), input.size()); - - const std::vector> support_points = - this->compute_mapping_support_points(cell); - - const unsigned int n_points = unit_points.size(); - const unsigned int n_lanes = VectorizedArray::size(); - - if (kind != mapping_covariant) - Assert(false, ExcNotImplemented()); - - // Use the more heavy VectorizedArray code path if there is more than - // one point left to compute - for (unsigned int i = 0; i < n_points; i += n_lanes) - if (n_points - i > 1) - { - Point> p_vec; - for (unsigned int j = 0; j < n_lanes; ++j) - if (i + j < n_points) - for (unsigned int d = 0; d < spacedim; ++d) - p_vec[d][j] = unit_points[i + j][d]; - else - for (unsigned int d = 0; d < spacedim; ++d) - p_vec[d][j] = unit_points[i][d]; - - const DerivativeForm<1, spacedim, dim, VectorizedArray> grad = - internal::evaluate_tensor_product_value_and_gradient( - polynomials_1d, - support_points, - p_vec, - polynomial_degree == 1, - renumber_lexicographic_to_hierarchic) - .second; - - if (apply_from_left) - { - const DerivativeForm<1, spacedim, dim, VectorizedArray> - jac = grad.transpose().covariant_form(); - for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j) - { - DerivativeForm<1, spacedim, dim> jac_j; - for (unsigned int d = 0; d < spacedim; ++d) - for (unsigned int e = 0; e < dim; ++e) - jac_j[d][e] = jac[d][e][j]; - output[i + j] = apply_transformation(jac_j, input[i + j]); - } - } - else - { - const DerivativeForm<1, dim, spacedim, VectorizedArray> - jac = grad.covariant_form(); - for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j) - { - DerivativeForm<1, dim, spacedim> jac_j; - for (unsigned int d = 0; d < dim; ++d) - for (unsigned int e = 0; e < spacedim; ++e) - jac_j[d][e] = jac[d][e][j]; - output[i + j] = apply_transformation(jac_j, input[i + j]); - } - } - } - else - { - const DerivativeForm<1, spacedim, dim> grad = - internal::evaluate_tensor_product_value_and_gradient( - polynomials_1d, - support_points, - unit_points[i], - polynomial_degree == 1, - renumber_lexicographic_to_hierarchic) - .second; - if (apply_from_left) - output[i] = - apply_transformation(grad.transpose().covariant_form(), input[i]); - else - output[i] = apply_transformation(grad.covariant_form(), input[i]); - } -} - #endif // DOXYGEN /* -------------- declaration of explicit specializations ------------- */ diff --git a/include/deal.II/numerics/vector_tools_evaluate.h b/include/deal.II/numerics/vector_tools_evaluate.h index 6864b832c8..43041180e3 100644 --- a/include/deal.II/numerics/vector_tools_evaluate.h +++ b/include/deal.II/numerics/vector_tools_evaluate.h @@ -216,7 +216,9 @@ namespace VectorTools if (evaluators[active_fe_index] == nullptr) evaluators[active_fe_index] = std::make_unique>( - cache.get_mapping(), dof_handler.get_fe(active_fe_index)); + cache.get_mapping(), + dof_handler.get_fe(active_fe_index), + update_values); return *evaluators[active_fe_index]; }; @@ -243,9 +245,8 @@ namespace VectorTools auto &evaluator = get_evaluator(cell->active_fe_index()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, dealii::EvaluationFlags::values); for (unsigned int q = 0; q < unit_points.size(); ++q) diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index 4d904aa4a6..e8b328364f 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -1235,6 +1235,107 @@ MappingQGeneric::fill_fe_subface_values( +template +inline void +MappingQGeneric::fill_mapping_data_for_generic_points( + const typename Triangulation::cell_iterator &cell, + const ArrayView> & unit_points, + const UpdateFlags update_flags, + dealii::internal::FEValuesImplementation::MappingRelatedData + &output_data) const +{ + if (update_flags == update_default) + return; + + Assert(update_flags & update_inverse_jacobians || + update_flags & update_jacobians || + update_flags & update_quadrature_points, + ExcNotImplemented()); + + output_data.initialize(unit_points.size(), update_flags); + const std::vector> support_points = + this->compute_mapping_support_points(cell); + + const unsigned int n_points = unit_points.size(); + const unsigned int n_lanes = VectorizedArray::size(); + + // Use the more heavy VectorizedArray code path if there is more than + // one point left to compute + for (unsigned int i = 0; i < n_points; i += n_lanes) + if (n_points - i > 1) + { + Point> p_vec; + for (unsigned int j = 0; j < n_lanes; ++j) + if (i + j < n_points) + for (unsigned int d = 0; d < spacedim; ++d) + p_vec[d][j] = unit_points[i + j][d]; + else + for (unsigned int d = 0; d < spacedim; ++d) + p_vec[d][j] = unit_points[i][d]; + + const auto result = + internal::evaluate_tensor_product_value_and_gradient( + polynomials_1d, + support_points, + p_vec, + polynomial_degree == 1, + renumber_lexicographic_to_hierarchic); + + if (update_flags & update_quadrature_points) + for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j) + for (unsigned int d = 0; d < spacedim; ++d) + output_data.quadrature_points[i + j][d] = result.first[d][j]; + + if (update_flags & update_jacobians) + for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j) + for (unsigned int d = 0; d < dim; ++d) + for (unsigned int e = 0; e < spacedim; ++e) + output_data.jacobians[i + j][d][e] = result.second[e][d][j]; + + if (update_flags & update_inverse_jacobians) + { + DerivativeForm<1, spacedim, dim, VectorizedArray> jac( + result.second); + const DerivativeForm<1, spacedim, dim, VectorizedArray> + inv_jac = jac.covariant_form(); + for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j) + for (unsigned int d = 0; d < spacedim; ++d) + for (unsigned int e = 0; e < dim; ++e) + output_data.inverse_jacobians[i + j][d][e] = inv_jac[d][e][j]; + } + } + else + { + const auto result = + internal::evaluate_tensor_product_value_and_gradient( + polynomials_1d, + support_points, + unit_points[i], + polynomial_degree == 1, + renumber_lexicographic_to_hierarchic); + + if (update_flags & update_quadrature_points) + output_data.quadrature_points[i] = result.first; + + if (update_flags & update_jacobians) + { + DerivativeForm<1, spacedim, dim> jac = result.second; + output_data.jacobians[i] = jac.transpose(); + } + + if (update_flags & update_inverse_jacobians) + { + DerivativeForm<1, spacedim, dim> jac(result.second); + DerivativeForm<1, spacedim, dim> inv_jac = jac.covariant_form(); + for (unsigned int d = 0; d < spacedim; ++d) + for (unsigned int e = 0; e < dim; ++e) + output_data.inverse_jacobians[i][d][e] = inv_jac[d][e]; + } + } +} + + + template void MappingQGeneric::transform( diff --git a/tests/fe/point_evaluation_01.cc b/tests/fe/point_evaluation_01.cc index 41b32e31a2..7467fb8325 100644 --- a/tests/fe/point_evaluation_01.cc +++ b/tests/fe/point_evaluation_01.cc @@ -73,7 +73,8 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation<1, dim, dim, Number> evaluator(mapping, fe); + FEPointEvaluation<1, dim, dim, Number> evaluator( + mapping, fe, update_values | update_gradients); Tensor<1, dim, Number> exponents; exponents[0] = 1.; @@ -101,9 +102,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -124,9 +124,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_02.cc b/tests/fe/point_evaluation_02.cc index 20b50fdf98..14650173c1 100644 --- a/tests/fe/point_evaluation_02.cc +++ b/tests/fe/point_evaluation_02.cc @@ -73,7 +73,9 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation<1, dim> evaluator(mapping, fe); + FEPointEvaluation<1, dim> evaluator(mapping, + fe, + update_values | update_gradients); Tensor<1, dim> exponents; exponents[0] = 1.; @@ -96,9 +98,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -116,9 +117,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_03.cc b/tests/fe/point_evaluation_03.cc index 4ab2ae247c..a344c05ef8 100644 --- a/tests/fe/point_evaluation_03.cc +++ b/tests/fe/point_evaluation_03.cc @@ -91,7 +91,9 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation evaluator(mapping, fe); + FEPointEvaluation evaluator(mapping, + fe, + update_values | update_gradients); VectorTools::interpolate(mapping, dof_handler, MyFunction(), vector); @@ -111,9 +113,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -132,9 +133,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_04.cc b/tests/fe/point_evaluation_04.cc index 7e747e9649..d9004d7463 100644 --- a/tests/fe/point_evaluation_04.cc +++ b/tests/fe/point_evaluation_04.cc @@ -94,8 +94,14 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation evaluator(mapping, fe, 0); - FEPointEvaluation<1, dim> evaluator_scalar(mapping, fe, dim); + FEPointEvaluation evaluator(mapping, + fe, + update_values | update_gradients, + 0); + FEPointEvaluation<1, dim> evaluator_scalar(mapping, + fe, + update_values | update_gradients, + dim); VectorTools::interpolate(mapping, dof_handler, MyFunction(), vector); @@ -121,14 +127,12 @@ test(const unsigned int degree) cell->get_dof_values(vector, solution_values.begin(), solution_values.end()); + evaluator.reinit(cell, unit_points); + evaluator_scalar.reinit(cell, unit_points); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); - evaluator_scalar.evaluate(cell, - unit_points, - solution_values, + evaluator_scalar.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); @@ -156,18 +160,14 @@ test(const unsigned int degree) evaluator_scalar.submit_gradient(evaluator_scalar.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) deallog << i << " "; deallog << std::endl; - evaluator_scalar.integrate(cell, - unit_points, - solution_values, + evaluator_scalar.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); diff --git a/tests/fe/point_evaluation_05.cc b/tests/fe/point_evaluation_05.cc index 06f5dd3515..c487eb2e9d 100644 --- a/tests/fe/point_evaluation_05.cc +++ b/tests/fe/point_evaluation_05.cc @@ -81,7 +81,9 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation<1, dim> evaluator(mapping, fe); + FEPointEvaluation<1, dim> evaluator(mapping, + fe, + update_values | update_gradients); Tensor<1, dim> exponents; exponents[0] = 1.; @@ -104,9 +106,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -124,9 +125,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_06.cc b/tests/fe/point_evaluation_06.cc index af0992f37c..e01aae2018 100644 --- a/tests/fe/point_evaluation_06.cc +++ b/tests/fe/point_evaluation_06.cc @@ -82,7 +82,9 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation<1, dim> evaluator(mapping, fe); + FEPointEvaluation<1, dim> evaluator(mapping, + fe, + update_values | update_gradients); Tensor<1, dim> exponents; exponents[0] = 1.; @@ -105,9 +107,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -125,9 +126,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_07.cc b/tests/fe/point_evaluation_07.cc index 718e91905b..d1fca88c17 100644 --- a/tests/fe/point_evaluation_07.cc +++ b/tests/fe/point_evaluation_07.cc @@ -98,7 +98,9 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation evaluator(mapping, fe); + FEPointEvaluation evaluator(mapping, + fe, + update_values | update_gradients); VectorTools::interpolate(mapping, dof_handler, MyFunction(), vector); @@ -118,9 +120,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -139,9 +140,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_08.cc b/tests/fe/point_evaluation_08.cc index c2e92d451b..ae90d70076 100644 --- a/tests/fe/point_evaluation_08.cc +++ b/tests/fe/point_evaluation_08.cc @@ -101,8 +101,14 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation evaluator(mapping, fe, 0); - FEPointEvaluation<1, dim> evaluator_scalar(mapping, fe, dim); + FEPointEvaluation evaluator(mapping, + fe, + update_values | update_gradients, + 0); + FEPointEvaluation<1, dim> evaluator_scalar(mapping, + fe, + update_values | update_gradients, + dim); VectorTools::interpolate(mapping, dof_handler, MyFunction(), vector); @@ -129,13 +135,11 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator_scalar.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); - evaluator_scalar.evaluate(cell, - unit_points, - solution_values, + evaluator_scalar.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); @@ -163,18 +167,14 @@ test(const unsigned int degree) evaluator_scalar.submit_gradient(evaluator_scalar.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) deallog << i << " "; deallog << std::endl; - evaluator_scalar.integrate(cell, - unit_points, - solution_values, + evaluator_scalar.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); diff --git a/tests/fe/point_evaluation_09.cc b/tests/fe/point_evaluation_09.cc index 69adc2acea..88bcf04904 100644 --- a/tests/fe/point_evaluation_09.cc +++ b/tests/fe/point_evaluation_09.cc @@ -91,7 +91,9 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation evaluator(mapping, fe); + FEPointEvaluation evaluator(mapping, + fe, + update_values | update_gradients); VectorTools::interpolate(mapping, dof_handler, MyFunction(), vector); @@ -111,9 +113,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -140,9 +141,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_10.cc b/tests/fe/point_evaluation_10.cc index 8e311f3d63..7661f051ce 100644 --- a/tests/fe/point_evaluation_10.cc +++ b/tests/fe/point_evaluation_10.cc @@ -75,7 +75,9 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation<1, dim> evaluator(mapping, fe); + FEPointEvaluation<1, dim> evaluator(mapping, + fe, + update_values | update_gradients); Tensor<1, dim> exponents; exponents[0] = 1.; @@ -98,9 +100,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -118,9 +119,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_11.cc b/tests/fe/point_evaluation_11.cc index 63f45a4484..df0fb92662 100644 --- a/tests/fe/point_evaluation_11.cc +++ b/tests/fe/point_evaluation_11.cc @@ -75,7 +75,9 @@ test(const unsigned int degree) dof_handler.distribute_dofs(fe); Vector vector(dof_handler.n_dofs()); - FEPointEvaluation<1, dim> evaluator(mapping, fe); + FEPointEvaluation<1, dim> evaluator(mapping, + fe, + update_values | update_gradients); // FE_DGQHermite is not interpolatory, so we just set up some arbitrary // content in the vector for the sake of comparison @@ -96,9 +98,8 @@ test(const unsigned int degree) solution_values.begin(), solution_values.end()); - evaluator.evaluate(cell, - unit_points, - solution_values, + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); deallog << "Cell with center " << cell->center(true) << std::endl; @@ -116,9 +117,7 @@ test(const unsigned int degree) evaluator.submit_gradient(evaluator.get_gradient(i), i); } - evaluator.integrate(cell, - unit_points, - solution_values, + evaluator.integrate(solution_values, EvaluationFlags::values | EvaluationFlags::gradients); for (const auto i : solution_values) diff --git a/tests/fe/point_evaluation_12.cc b/tests/fe/point_evaluation_12.cc new file mode 100644 index 0000000000..aabd4dc3b3 --- /dev/null +++ b/tests/fe/point_evaluation_12.cc @@ -0,0 +1,122 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2021 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.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- + + +// check FEPointEvaluation::real_point(), FEPointEvaluation::unit_point(), +// FEPointEvaluation::jacobian(), FEPointEvaluation::inverse_jacobian(), +// FEPointEvaluation::get_unit_gradient(). + +#include + +#include + +#include +#include +#include + +#include +#include + +#include + +#include + +#include + +#include "../tests.h" + + + +template +void +test(const unsigned int degree) +{ + using namespace dealii; + Triangulation tria; + + if (dim > 1) + GridGenerator::hyper_shell(tria, Point(), 0.5, 1, 6); + else + GridGenerator::subdivided_hyper_cube(tria, 2, 0, 1); + + MappingQGeneric mapping(degree); + deallog << "Mapping of degree " << degree << std::endl; + + std::vector> unit_points; + for (unsigned int i = 0; i < 7; ++i) + { + Point p; + for (unsigned int d = 0; d < dim; ++d) + p[d] = static_cast(i) / 17. + 0.015625 * d; + unit_points.push_back(p); + } + + FE_Q fe(degree); + + DoFHandler dof_handler(tria); + dof_handler.distribute_dofs(fe); + Vector vector(dof_handler.n_dofs()); + + Tensor<1, dim> exponents; + exponents[0] = 1.; + VectorTools::interpolate(mapping, + dof_handler, + Functions::Monomial(exponents), + vector); + + FEPointEvaluation<1, dim> evaluator(mapping, + fe, + update_values | update_gradients | + update_quadrature_points | + update_jacobians); + std::vector solution_values(fe.dofs_per_cell); + + for (const auto &cell : dof_handler.active_cell_iterators()) + { + cell->get_dof_values(vector, + solution_values.begin(), + solution_values.end()); + + evaluator.reinit(cell, unit_points); + evaluator.evaluate(solution_values, + EvaluationFlags::values | EvaluationFlags::gradients); + + deallog << "Cell with center " << cell->center(true) << std::endl; + for (unsigned int i = 0; i < unit_points.size(); ++i) + deallog << "unit point " << unit_points[i] << std::endl + << "unit point via evaluator: " << evaluator.unit_point(i) + << std::endl + << "real point: " << evaluator.real_point(i) << std::endl + << "jacobian: " << Tensor<2, dim>(evaluator.jacobian(i)) + << std::endl + << "inverse jacobian: " + << Tensor<2, dim>(evaluator.inverse_jacobian(i)) << std::endl + << std::endl; + } +} + + + +int +main() +{ + initlog(); + deallog << std::setprecision(10); + + test<1>(3); + test<2>(2); + test<2>(6); + test<3>(5); +} diff --git a/tests/fe/point_evaluation_12.output b/tests/fe/point_evaluation_12.output new file mode 100644 index 0000000000..63b8743ac1 --- /dev/null +++ b/tests/fe/point_evaluation_12.output @@ -0,0 +1,865 @@ + +DEAL::Mapping of degree 3 +DEAL::Cell with center 0.2500000000 +DEAL::unit point 0.000000000 +DEAL::unit point via evaluator: 0.000000000 +DEAL::real point: 0.000000000 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.05882352941 +DEAL::unit point via evaluator: 0.05882352941 +DEAL::real point: 0.02941176471 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.1176470588 +DEAL::unit point via evaluator: 0.1176470588 +DEAL::real point: 0.05882352941 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.1764705882 +DEAL::unit point via evaluator: 0.1764705882 +DEAL::real point: 0.08823529412 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.2352941176 +DEAL::unit point via evaluator: 0.2352941176 +DEAL::real point: 0.1176470588 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.2941176471 +DEAL::unit point via evaluator: 0.2941176471 +DEAL::real point: 0.1470588235 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.3529411765 +DEAL::unit point via evaluator: 0.3529411765 +DEAL::real point: 0.1764705882 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::Cell with center 0.7500000000 +DEAL::unit point 0.000000000 +DEAL::unit point via evaluator: 0.000000000 +DEAL::real point: 0.5000000000 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.05882352941 +DEAL::unit point via evaluator: 0.05882352941 +DEAL::real point: 0.5294117647 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.1176470588 +DEAL::unit point via evaluator: 0.1176470588 +DEAL::real point: 0.5588235294 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.1764705882 +DEAL::unit point via evaluator: 0.1764705882 +DEAL::real point: 0.5882352941 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.2352941176 +DEAL::unit point via evaluator: 0.2352941176 +DEAL::real point: 0.6176470588 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.2941176471 +DEAL::unit point via evaluator: 0.2941176471 +DEAL::real point: 0.6470588235 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::unit point 0.3529411765 +DEAL::unit point via evaluator: 0.3529411765 +DEAL::real point: 0.6764705882 +DEAL::jacobian: 0.5000000000 +DEAL::inverse jacobian: 2.000000000 +DEAL:: +DEAL::Mapping of degree 2 +DEAL::Cell with center 0.6495190528 0.3750000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: 0.9921875000 0.000000000 +DEAL::jacobian: -0.03561792873 -0.5000000000 1.125115420 0.000000000 +DEAL::inverse jacobian: 0.000000000 0.8887977024 -2.000000000 -0.06331426644 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: 0.9591965610 0.06332871922 +DEAL::jacobian: -0.08712983197 -0.4981412212 1.061413228 -0.03288861409 +DEAL::inverse jacobian: -0.06186730589 0.9370615382 -1.996641655 -0.1639013414 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: 0.9234265460 0.1210574346 +DEAL::jacobian: -0.1354299593 -0.4946765544 0.9995653559 -0.06485006834 +DEAL::inverse jacobian: -0.1288640184 0.9829751956 -1.986243218 -0.2691138069 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: 0.8851608469 0.1733497625 +DEAL::jacobian: -0.1805183108 -0.4896059997 0.9395718035 -0.09588436276 +DEAL::inverse jacobian: -0.2008769377 1.025720473 -1.968395067 -0.3781843507 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: 0.8446828558 0.2203693193 +DEAL::jacobian: -0.2223948864 -0.4829295571 0.8814325707 -0.1259914973 +DEAL::inverse jacobian: -0.2777041131 1.064449008 -1.942809281 -0.4901916080 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: 0.8022759646 0.2622797217 +DEAL::jacobian: -0.2610596861 -0.4746472265 0.8251476577 -0.1551714721 +DEAL::inverse jacobian: -0.3590576923 1.098305865 -1.909343321 -0.6040768138 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: 0.7582235654 0.2992445859 +DEAL::jacobian: -0.2965127099 -0.4647590080 0.7707170643 -0.1834242870 +DEAL::inverse jacobian: -0.4445729729 1.126455483 -1.868018582 -0.7186700251 +DEAL:: +DEAL::Cell with center 4.592425497e-17 0.7500000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: 0.4960937500 0.8592595803 +DEAL::jacobian: -0.9921875000 -0.2500000000 0.5317116787 -0.4330127019 +DEAL::inverse jacobian: -0.7697213891 0.4443988512 -0.9451682368 -1.763707941 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: 0.4247540009 0.8623529487 +DEAL::jacobian: -0.9627757353 -0.2205882353 0.4552499661 -0.4478472593 +DEAL::inverse jacobian: -0.8424527499 0.4149521105 -0.8563781019 -1.811093066 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: 0.3568744593 0.8602395646 +DEAL::jacobian: -0.9333639706 -0.1911764706 0.3824968927 -0.4608274970 +DEAL::inverse jacobian: -0.9157134999 0.3798880842 -0.7600622156 -1.854693988 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: 0.2924551254 0.8532466611 +DEAL::jacobian: -0.9039522059 -0.1617647059 0.3134524587 -0.4719534150 +DEAL::inverse jacobian: -0.9887384555 0.3388957053 -0.6566802784 -1.893772308 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: 0.2314959991 0.8417014709 +DEAL::jacobian: -0.8745404412 -0.1323529412 0.2481166641 -0.4812250133 +DEAL::inverse jacobian: -1.060691938 0.2917256872 -0.5468862550 -1.927617996 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: 0.1739970804 0.8259312270 +DEAL::jacobian: -0.8451286765 -0.1029411765 0.1864895088 -0.4886422920 +DEAL::inverse jacobian: -1.130689626 0.2381998493 -0.4315257937 -1.955578227 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: 0.1199583694 0.8062631623 +DEAL::jacobian: -0.8157169118 -0.07352941176 0.1285709928 -0.4942052510 +DEAL::inverse jacobian: -1.197825551 0.1782162532 -0.3116227923 -1.977086559 +DEAL:: +DEAL::Cell with center -0.6495190528 0.3750000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: -0.4960937500 0.8592595803 +DEAL::jacobian: -0.9565695713 0.2500000000 -0.5934037410 -0.4330127019 +DEAL::inverse jacobian: -0.7697213891 -0.4443988512 1.054831763 -1.700393674 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: -0.5344425601 0.7990242294 +DEAL::jacobian: -0.8756459033 0.2775529859 -0.6061632619 -0.4149586452 +DEAL::inverse jacobian: -0.7805854440 -0.5221094277 1.140263553 -1.647191724 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: -0.5665520866 0.7391821301 +DEAL::jacobian: -0.7979340113 0.3035000838 -0.6170684631 -0.3959774286 +DEAL::inverse jacobian: -0.7868494815 -0.6030871114 1.226181002 -1.585580181 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: -0.5927057215 0.6798968986 +DEAL::jacobian: -0.7234338951 0.3278412938 -0.6261193447 -0.3760690522 +DEAL::inverse jacobian: -0.7878615178 -0.6868247675 1.311714788 -1.515587957 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: -0.6131868567 0.6213321516 +DEAL::jacobian: -0.6521455548 0.3505766159 -0.6333159067 -0.3552335160 +DEAL::inverse jacobian: -0.7829878252 -0.7727233205 1.395923026 -1.437426388 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: -0.6282788842 0.5636515054 +DEAL::jacobian: -0.5840689904 0.3717060500 -0.6386581489 -0.3334708199 +DEAL::inverse jacobian: -0.7716319337 -0.8601060153 1.477817527 -1.351501413 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: -0.6382651960 0.5070185764 +DEAL::jacobian: -0.5192042018 0.3912295962 -0.6421460715 -0.3107809640 +DEAL::inverse jacobian: -0.7532525782 -0.9482392299 1.556395790 -1.258416534 +DEAL:: +DEAL::Cell with center -0.6495190528 -0.3750000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: -0.9921875000 1.215079246e-16 +DEAL::jacobian: 0.03561792873 0.5000000000 -1.125115420 -6.123233996e-17 +DEAL::inverse jacobian: -1.088463261e-16 -0.8887977024 2.000000000 0.06331426644 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: -0.9591965610 -0.06332871922 +DEAL::jacobian: 0.08712983197 0.4981412212 -1.061413228 0.03288861409 +DEAL::inverse jacobian: 0.06186730589 -0.9370615382 1.996641655 0.1639013414 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: -0.9234265460 -0.1210574346 +DEAL::jacobian: 0.1354299593 0.4946765544 -0.9995653559 0.06485006834 +DEAL::inverse jacobian: 0.1288640184 -0.9829751956 1.986243218 0.2691138069 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: -0.8851608469 -0.1733497625 +DEAL::jacobian: 0.1805183108 0.4896059997 -0.9395718035 0.09588436276 +DEAL::inverse jacobian: 0.2008769377 -1.025720473 1.968395067 0.3781843507 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: -0.8446828558 -0.2203693193 +DEAL::jacobian: 0.2223948864 0.4829295571 -0.8814325707 0.1259914973 +DEAL::inverse jacobian: 0.2777041131 -1.064449008 1.942809281 0.4901916080 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: -0.8022759646 -0.2622797217 +DEAL::jacobian: 0.2610596861 0.4746472265 -0.8251476577 0.1551714721 +DEAL::inverse jacobian: 0.3590576923 -1.098305865 1.909343321 0.6040768138 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: -0.7582235654 -0.2992445859 +DEAL::jacobian: 0.2965127099 0.4647590080 -0.7707170643 0.1834242870 +DEAL::inverse jacobian: 0.4445729729 -1.126455483 1.868018582 0.7186700251 +DEAL:: +DEAL::Cell with center -1.377727649e-16 -0.7500000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: -0.4960937500 -0.8592595803 +DEAL::jacobian: 0.9921875000 0.2500000000 -0.5317116787 0.4330127019 +DEAL::inverse jacobian: 0.7697213891 -0.4443988512 0.9451682368 1.763707941 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: -0.4247540009 -0.8623529487 +DEAL::jacobian: 0.9627757353 0.2205882353 -0.4552499661 0.4478472593 +DEAL::inverse jacobian: 0.8424527499 -0.4149521105 0.8563781019 1.811093066 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: -0.3568744593 -0.8602395646 +DEAL::jacobian: 0.9333639706 0.1911764706 -0.3824968927 0.4608274970 +DEAL::inverse jacobian: 0.9157134999 -0.3798880842 0.7600622156 1.854693988 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: -0.2924551254 -0.8532466611 +DEAL::jacobian: 0.9039522059 0.1617647059 -0.3134524587 0.4719534150 +DEAL::inverse jacobian: 0.9887384555 -0.3388957053 0.6566802784 1.893772308 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: -0.2314959991 -0.8417014709 +DEAL::jacobian: 0.8745404412 0.1323529412 -0.2481166641 0.4812250133 +DEAL::inverse jacobian: 1.060691938 -0.2917256872 0.5468862550 1.927617996 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: -0.1739970804 -0.8259312270 +DEAL::jacobian: 0.8451286765 0.1029411765 -0.1864895088 0.4886422920 +DEAL::inverse jacobian: 1.130689626 -0.2381998493 0.4315257937 1.955578227 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: -0.1199583694 -0.8062631623 +DEAL::jacobian: 0.8157169118 0.07352941176 -0.1285709928 0.4942052510 +DEAL::inverse jacobian: 1.197825551 -0.1782162532 0.3116227923 1.977086559 +DEAL:: +DEAL::Cell with center 0.6495190528 -0.3750000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: 0.4960937500 -0.8592595803 +DEAL::jacobian: 0.9565695713 -0.2500000000 0.5934037410 0.4330127019 +DEAL::inverse jacobian: 0.7697213891 0.4443988512 -1.054831763 1.700393674 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: 0.5344425601 -0.7990242294 +DEAL::jacobian: 0.8756459033 -0.2775529859 0.6061632619 0.4149586452 +DEAL::inverse jacobian: 0.7805854440 0.5221094277 -1.140263553 1.647191724 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: 0.5665520866 -0.7391821301 +DEAL::jacobian: 0.7979340113 -0.3035000838 0.6170684631 0.3959774286 +DEAL::inverse jacobian: 0.7868494815 0.6030871114 -1.226181002 1.585580181 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: 0.5927057215 -0.6798968986 +DEAL::jacobian: 0.7234338951 -0.3278412938 0.6261193447 0.3760690522 +DEAL::inverse jacobian: 0.7878615178 0.6868247675 -1.311714788 1.515587957 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: 0.6131868567 -0.6213321516 +DEAL::jacobian: 0.6521455548 -0.3505766159 0.6333159067 0.3552335160 +DEAL::inverse jacobian: 0.7829878252 0.7727233205 -1.395923026 1.437426388 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: 0.6282788842 -0.5636515054 +DEAL::jacobian: 0.5840689904 -0.3717060500 0.6386581489 0.3334708199 +DEAL::inverse jacobian: 0.7716319337 0.8601060153 -1.477817527 1.351501413 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: 0.6382651960 -0.5070185764 +DEAL::jacobian: 0.5192042018 -0.3912295962 0.6421460715 0.3107809640 +DEAL::inverse jacobian: 0.7532525782 0.9482392299 -1.556395790 1.258416534 +DEAL:: +DEAL::Mapping of degree 6 +DEAL::Cell with center 0.6495190528 0.3750000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: 0.9921875000 0.000000000 +DEAL::jacobian: -9.027502264e-07 -0.5000000000 1.039018151 0.000000000 +DEAL::inverse jacobian: 0.000000000 0.9624470938 -2.000000000 -1.737698664e-06 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: 0.9609496573 0.05926936446 +DEAL::jacobian: -0.06206642921 -0.4990516597 1.006303564 -0.03078046231 +DEAL::inverse jacobian: -0.06105927420 0.9899699305 -1.996206704 -0.1231213190 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: 0.9262895583 0.1146994816 +DEAL::jacobian: -0.1201127551 -0.4962102607 0.9700075994 -0.06144413389 +DEAL::inverse jacobian: -0.1257277156 1.015351321 -1.984841056 -0.2457761443 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: 0.8885607198 0.1661007475 +DEAL::jacobian: -0.1739403651 -0.4914865598 0.9304986651 -0.09187473986 +DEAL::inverse jacobian: -0.1941118236 1.038406776 -1.965946167 -0.3674990700 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: 0.8481266485 0.2133123969 +DEAL::jacobian: -0.2233804861 -0.4848984727 0.8881566160 -0.1219568512 +DEAL::inverse jacobian: -0.2663345041 1.058941691 -1.939593795 -0.4878277063 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: 0.8053586039 0.2562030323 +DEAL::jacobian: -0.2682954279 -0.4764709957 0.8433700312 -0.1515763454 +DEAL::inverse jacobian: -0.3425387569 1.076749688 -1.905883938 -0.6063055690 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: 0.7606333492 0.2946709691 +DEAL::jacobian: -0.3085787825 -0.4662361036 0.7965335697 -0.1806208532 +DEAL::inverse jacobian: -0.4228922287 1.091610528 -1.864944444 -0.7224834052 +DEAL:: +DEAL::Cell with center 4.592425497e-17 0.7500000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: 0.4960937500 0.8592595803 +DEAL::jacobian: -0.8998165653 -0.2500000000 0.5195082938 -0.4330127019 +DEAL::inverse jacobian: -0.8335036330 0.4812235469 -0.9999984951 -1.732051676 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: 0.4291460533 0.8618414972 +DEAL::jacobian: -0.9025176646 -0.2228691676 0.4494006774 -0.4475816463 +DEAL::inverse jacobian: -0.8878687459 0.4421060826 -0.8914771621 -1.790326377 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: 0.3638121143 0.8595400296 +DEAL::jacobian: -0.9001076005 -0.1948929495 0.3809831025 -0.4604527583 +DEAL::inverse jacobian: -0.9421838957 0.3987922650 -0.7795721433 -1.841810849 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: 0.3004328929 0.8525665299 +DEAL::jacobian: -0.8928056647 -0.1661774212 0.3146125577 -0.4715772163 +DEAL::inverse jacobian: -0.9963425589 0.3510976174 -0.6647095532 -1.886308858 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: 0.2393293696 0.8411554217 +DEAL::jacobian: -0.8808564350 -0.1368315050 0.2506251323 -0.4809128212 +DEAL::inverse jacobian: -1.050237658 0.2988183991 -0.5473257113 -1.923651353 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: 0.1808009674 0.8255625263 +DEAL::jacobian: -0.8645275857 -0.1069665321 0.1893343593 -0.4884241591 +DEAL::inverse jacobian: -1.103761961 0.2417275786 -0.4278659439 -1.953696692 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: 0.1251241296 0.8060632879 +DEAL::jacobian: -0.8441076976 -0.07669580451 0.1310297202 -0.4940827365 +DEAL::inverse jacobian: -1.156808563 0.1795698510 -0.3067832392 -1.976330968 +DEAL:: +DEAL::Cell with center -0.6495190528 0.3750000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: -0.4960937500 0.8592595803 +DEAL::jacobian: -0.8998156625 0.2500000000 -0.5195098574 -0.4330127019 +DEAL::inverse jacobian: -0.8335036330 -0.4812235469 1.000001505 -1.732049939 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: -0.5318036039 0.8025721327 +DEAL::jacobian: -0.8404512354 0.2761824922 -0.5569028862 -0.4168011840 +DEAL::inverse jacobian: -0.8268094717 -0.5478638478 1.104729542 -1.667205058 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: -0.5624774440 0.7448405480 +DEAL::jacobian: -0.7799948454 0.3013173112 -0.5890244970 -0.3990086244 +DEAL::inverse jacobian: -0.8164561801 -0.6165590563 1.205268912 -1.596034705 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: -0.5881278268 0.6864657824 +DEAL::jacobian: -0.7188652996 0.3253091386 -0.6158861075 -0.3797024765 +DEAL::inverse jacobian: -0.8022307353 -0.6873091582 1.301236614 -1.518809788 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: -0.6087972789 0.6278430248 +DEAL::jacobian: -0.6574759489 0.3480669677 -0.6375314837 -0.3589559700 +DEAL::inverse jacobian: -0.7839031537 -0.7601232921 1.392268084 -1.435823647 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: -0.6245576365 0.5693594940 +DEAL::jacobian: -0.5962321579 0.3695044636 -0.6540356718 -0.3368478137 +DEAL::inverse jacobian: -0.7612232046 -0.8350221091 1.478017994 -1.347391123 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: -0.6355092196 0.5113923188 +DEAL::jacobian: -0.5355289151 0.3895402991 -0.6655038496 -0.3134618833 +DEAL::inverse jacobian: -0.7339163343 -0.9120406773 1.558161205 -1.253847562 +DEAL:: +DEAL::Cell with center -0.6495190528 -0.3750000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: -0.9921875000 1.215079246e-16 +DEAL::jacobian: 9.027502238e-07 0.5000000000 -1.039018151 -6.123233996e-17 +DEAL::inverse jacobian: -1.178657753e-16 -0.9624470938 2.000000000 1.737698659e-06 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: -0.9609496573 -0.05926936446 +DEAL::jacobian: 0.06206642921 0.4990516597 -1.006303564 0.03078046231 +DEAL::inverse jacobian: 0.06105927420 -0.9899699305 1.996206704 0.1231213190 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: -0.9262895583 -0.1146994816 +DEAL::jacobian: 0.1201127551 0.4962102607 -0.9700075994 0.06144413389 +DEAL::inverse jacobian: 0.1257277156 -1.015351321 1.984841056 0.2457761443 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: -0.8885607198 -0.1661007475 +DEAL::jacobian: 0.1739403651 0.4914865598 -0.9304986651 0.09187473986 +DEAL::inverse jacobian: 0.1941118236 -1.038406776 1.965946167 0.3674990700 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: -0.8481266485 -0.2133123969 +DEAL::jacobian: 0.2233804861 0.4848984727 -0.8881566160 0.1219568512 +DEAL::inverse jacobian: 0.2663345041 -1.058941691 1.939593795 0.4878277063 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: -0.8053586039 -0.2562030323 +DEAL::jacobian: 0.2682954279 0.4764709957 -0.8433700312 0.1515763454 +DEAL::inverse jacobian: 0.3425387569 -1.076749688 1.905883938 0.6063055690 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: -0.7606333492 -0.2946709691 +DEAL::jacobian: 0.3085787825 0.4662361036 -0.7965335697 0.1806208532 +DEAL::inverse jacobian: 0.4228922287 -1.091610528 1.864944444 0.7224834052 +DEAL:: +DEAL::Cell with center -1.377727649e-16 -0.7500000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: -0.4960937500 -0.8592595803 +DEAL::jacobian: 0.8998165653 0.2500000000 -0.5195082938 0.4330127019 +DEAL::inverse jacobian: 0.8335036330 -0.4812235469 0.9999984951 1.732051676 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: -0.4291460533 -0.8618414972 +DEAL::jacobian: 0.9025176646 0.2228691676 -0.4494006774 0.4475816463 +DEAL::inverse jacobian: 0.8878687459 -0.4421060826 0.8914771621 1.790326377 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: -0.3638121143 -0.8595400296 +DEAL::jacobian: 0.9001076005 0.1948929495 -0.3809831025 0.4604527583 +DEAL::inverse jacobian: 0.9421838957 -0.3987922650 0.7795721433 1.841810849 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: -0.3004328929 -0.8525665299 +DEAL::jacobian: 0.8928056647 0.1661774212 -0.3146125577 0.4715772163 +DEAL::inverse jacobian: 0.9963425589 -0.3510976174 0.6647095532 1.886308858 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: -0.2393293696 -0.8411554217 +DEAL::jacobian: 0.8808564350 0.1368315050 -0.2506251323 0.4809128212 +DEAL::inverse jacobian: 1.050237658 -0.2988183991 0.5473257113 1.923651353 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: -0.1808009674 -0.8255625263 +DEAL::jacobian: 0.8645275857 0.1069665321 -0.1893343593 0.4884241591 +DEAL::inverse jacobian: 1.103761961 -0.2417275786 0.4278659439 1.953696692 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: -0.1251241296 -0.8060632879 +DEAL::jacobian: 0.8441076976 0.07669580451 -0.1310297202 0.4940827365 +DEAL::inverse jacobian: 1.156808563 -0.1795698510 0.3067832392 1.976330968 +DEAL:: +DEAL::Cell with center 0.6495190528 -0.3750000000 +DEAL::unit point 0.000000000 0.01562500000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 +DEAL::real point: 0.4960937500 -0.8592595803 +DEAL::jacobian: 0.8998156625 -0.2500000000 0.5195098574 0.4330127019 +DEAL::inverse jacobian: 0.8335036330 0.4812235469 -1.000001505 1.732049939 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 +DEAL::real point: 0.5318036039 -0.8025721327 +DEAL::jacobian: 0.8404512354 -0.2761824922 0.5569028862 0.4168011840 +DEAL::inverse jacobian: 0.8268094717 0.5478638478 -1.104729542 1.667205058 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 +DEAL::real point: 0.5624774440 -0.7448405480 +DEAL::jacobian: 0.7799948454 -0.3013173112 0.5890244970 0.3990086244 +DEAL::inverse jacobian: 0.8164561801 0.6165590563 -1.205268912 1.596034705 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 +DEAL::real point: 0.5881278268 -0.6864657824 +DEAL::jacobian: 0.7188652996 -0.3253091386 0.6158861075 0.3797024765 +DEAL::inverse jacobian: 0.8022307353 0.6873091582 -1.301236614 1.518809788 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 +DEAL::real point: 0.6087972789 -0.6278430248 +DEAL::jacobian: 0.6574759489 -0.3480669677 0.6375314837 0.3589559700 +DEAL::inverse jacobian: 0.7839031537 0.7601232921 -1.392268084 1.435823647 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 +DEAL::real point: 0.6245576365 -0.5693594940 +DEAL::jacobian: 0.5962321579 -0.3695044636 0.6540356718 0.3368478137 +DEAL::inverse jacobian: 0.7612232046 0.8350221091 -1.478017994 1.347391123 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 +DEAL::real point: 0.6355092196 -0.5113923188 +DEAL::jacobian: 0.5355289151 -0.3895402991 0.6655038496 0.3134618833 +DEAL::inverse jacobian: 0.7339163343 0.9120406773 -1.558161205 1.253847562 +DEAL:: +DEAL::Mapping of degree 5 +DEAL::Cell with center 0.000000000 0.000000000 -0.7500000000 +DEAL::unit point 0.000000000 0.01562500000 0.03125000000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 0.03125000000 +DEAL::real point: -0.5759520655 -0.5527659841 -0.5759520655 +DEAL::jacobian: 0.9932949273 -0.4810928393 0.2925470809 -0.4900391566 1.002647066 0.2807700237 -0.5228092329 -0.4810928393 0.2925470809 +DEAL::inverse jacobian: 0.6595852886 1.218523384e-17 -0.6595852886 -0.005280458384 0.6828863238 -0.6501149354 1.170057438 1.123004610 1.170399924 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 0.09007352941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 0.09007352941 +DEAL::real point: -0.5254898676 -0.5029040719 -0.6187865537 +DEAL::jacobian: 1.037405033 -0.4002384750 0.2751361771 -0.4064388523 1.046213796 0.2633106979 -0.5506948150 -0.5104515766 0.3239844901 +DEAL::inverse jacobian: 0.6648345215 -0.01513003720 -0.5522984384 -0.01871332739 0.6848552177 -0.5407079577 1.100573290 1.053301633 1.295885751 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 0.1488970588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 0.1488970588 +DEAL::real point: -0.4685426073 -0.4464599093 -0.6616551149 +DEAL::jacobian: 1.088836811 -0.3181348005 0.2531153708 -0.3221900894 1.096787213 0.2411858894 -0.5536495675 -0.5148162251 0.3574383143 +DEAL::inverse jacobian: 0.6760207313 -0.02173209823 -0.4640514348 -0.02405671824 0.6932146327 -0.4507196239 1.012465038 0.9647711502 1.429730188 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 0.2077205882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 0.2077205882 +DEAL::real point: -0.4051542510 -0.3835292107 -0.7012978956 +DEAL::jacobian: 1.141244729 -0.2378005610 0.2260552949 -0.2402500526 1.148115327 0.2139896314 -0.5278693567 -0.4904587613 0.3912882617 +DEAL::inverse jacobian: 0.6922100600 -0.02226054094 -0.3877300679 -0.02367108777 0.7068064864 -0.3728665004 0.9041589572 0.8559131697 1.565223382 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 0.2665441176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 0.2665441176 +DEAL::real point: -0.3359932318 -0.3148223149 -0.7343028440 +DEAL::jacobian: 1.187783350 -0.1633915354 0.1938285452 -0.1647137707 1.193430317 0.1816154182 -0.4728258418 -0.4368631650 0.4236063066 +DEAL::inverse jacobian: 0.7126931310 -0.01884176531 -0.3180271765 -0.01961650330 0.7247734685 -0.3017608479 0.7752717482 0.7264244017 1.694498694 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 0.3253676471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 0.3253676471 +DEAL::real point: -0.2623766962 -0.2416891159 -0.7575161861 +DEAL::jacobian: 1.221968679 -0.09929977922 0.1566771929 -0.09990231236 1.226312391 0.1443236872 -0.3914095984 -0.3568979662 0.4523477555 +DEAL::inverse jacobian: 0.7368730683 -0.01337022555 -0.2509608200 -0.01373408717 0.7464163031 -0.2333906460 0.6267689417 0.5773461297 1.809393038 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 0.3841911765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 0.3841911765 +DEAL::real point: -0.1861925434 -0.1660412603 -0.7684224851 +DEAL::jacobian: 1.238466131 -0.04935596242 0.1152317902 -0.04956217801 1.241479999 0.1027604615 -0.2894857844 -0.2563937576 0.4755652240 +DEAL::inverse jacobian: 0.7642443370 -0.007524989645 -0.1835541526 -0.007654990883 0.7711557040 -0.1647770143 0.4610832929 0.4111762620 1.902190990 +DEAL:: +DEAL::Cell with center 0.7500000000 0.000000000 -4.163336342e-17 +DEAL::unit point 0.000000000 0.01562500000 0.03125000000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 0.03125000000 +DEAL::real point: 0.5879922187 -0.5879922187 -0.5412602679 +DEAL::jacobian: 0.5550460846 -0.2963110393 0.4711038208 1.004782175 0.2963110393 -0.4711038208 -0.4883767092 0.2727610799 1.023604617 +DEAL::inverse jacobian: 0.6410962192 0.6410962192 7.800063003e-16 -1.185413181 1.185116730 1.091012759 0.6217547579 -0.009923027903 0.6862163082 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 0.09007352941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 0.09007352941 +DEAL::real point: 0.6317656581 -0.5359927398 -0.4904247681 +DEAL::jacobian: 0.5797037152 -0.3280959599 0.4986727806 1.051491509 0.2783580434 -0.3905472313 -0.4024407294 0.2546931493 1.069124072 +DEAL::inverse jacobian: 0.5388639874 0.6484024354 -0.01448384475 -1.312323510 1.113451647 1.018848513 0.5154692874 -0.02118085086 0.6871769082 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 0.1488970588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 0.1488970588 +DEAL::real point: 0.6752050943 -0.4774156808 -0.4328300536 +DEAL::jacobian: 0.5785019225 -0.3617051416 0.5002867842 1.105024971 0.2557500053 -0.3086687551 -0.3163772708 0.2318656319 1.120856490 +DEAL::inverse jacobian: 0.4542739492 0.6612172294 -0.02067182943 -1.446811969 1.022981696 0.9274901855 0.4275194264 -0.02498107035 0.6944749950 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 0.2077205882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 0.2077205882 +DEAL::real point: 0.7149693757 -0.4123477836 -0.3686646352 +DEAL::jacobian: 0.5479223586 -0.3954685718 0.4725600224 1.158807388 0.2280805229 -0.2287595979 -0.2333564143 0.2039182120 1.172410808 +DEAL::inverse jacobian: 0.3806387880 0.6787516066 -0.02098558751 -1.581952197 0.9122476719 0.8156294447 0.3509122942 -0.02356927527 0.7069033952 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 0.2665441176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 0.2665441176 +DEAL::real point: 0.7476112822 -0.3415220448 -0.2987437738 +DEAL::jacobian: 0.4878516218 -0.4274309380 0.4153914837 1.205868584 0.1952580057 -0.1551457988 -0.1575804546 0.1708004340 1.216969612 +DEAL::inverse jacobian: 0.3129422341 0.7003817901 -0.01752898873 -1.709791615 0.7809966984 0.6831733712 0.2804891150 -0.01892248906 0.7235607667 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 0.3253676471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 0.3253676471 +DEAL::real point: 0.7699931685 -0.2663289165 -0.2245218407 +DEAL::jacobian: 0.4016256421 -0.4555478887 0.3320666220 1.239712092 0.1575670806 -0.09229031966 -0.09336607936 0.1328329324 1.248162813 +DEAL::inverse jacobian: 0.2474133225 0.7255683474 -0.01217370955 -1.822183573 0.6303475295 0.5313900653 0.2124290168 -0.01280877677 0.7437149049 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 0.3841911765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 0.3841911765 +DEAL::real point: 0.7796633598 -0.1887262238 -0.1480024603 +DEAL::jacobian: 0.2955123214 -0.4779006961 0.2287822553 1.255093517 0.1156812009 -0.04400762446 -0.04435470718 0.09071925451 1.260850488 +DEAL::inverse jacobian: 0.1812302280 0.7538503665 -0.006572624228 -1.911526562 0.4628982642 0.3630045080 0.1439113361 -0.006786667621 0.7667657538 +DEAL:: +DEAL::Cell with center 0.000000000 -4.163336342e-17 0.7500000000 +DEAL::unit point 0.000000000 0.01562500000 0.03125000000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 0.03125000000 +DEAL::real point: -0.5879922187 -0.5412602679 0.5879922187 +DEAL::jacobian: 1.004782175 0.2963110393 -0.4711038208 -0.4883767092 0.2727610799 1.023604617 0.5550460846 -0.2963110393 0.4711038208 +DEAL::inverse jacobian: 0.6410962192 -3.849108776e-18 0.6410962192 1.185116730 1.091012759 -1.185413181 -0.009923027903 0.6862163082 0.6217547579 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 0.09007352941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 0.09007352941 +DEAL::real point: -0.5359927398 -0.4904247681 0.6317656581 +DEAL::jacobian: 1.051491509 0.2783580434 -0.3905472313 -0.4024407294 0.2546931493 1.069124072 0.5797037152 -0.3280959599 0.4986727806 +DEAL::inverse jacobian: 0.6484024354 -0.01448384475 0.5388639874 1.113451647 1.018848513 -1.312323510 -0.02118085086 0.6871769082 0.5154692874 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 0.1488970588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 0.1488970588 +DEAL::real point: -0.4774156808 -0.4328300536 0.6752050943 +DEAL::jacobian: 1.105024971 0.2557500053 -0.3086687551 -0.3163772708 0.2318656319 1.120856490 0.5785019225 -0.3617051416 0.5002867842 +DEAL::inverse jacobian: 0.6612172294 -0.02067182943 0.4542739492 1.022981696 0.9274901855 -1.446811969 -0.02498107035 0.6944749950 0.4275194264 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 0.2077205882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 0.2077205882 +DEAL::real point: -0.4123477836 -0.3686646352 0.7149693757 +DEAL::jacobian: 1.158807388 0.2280805229 -0.2287595979 -0.2333564143 0.2039182120 1.172410808 0.5479223586 -0.3954685718 0.4725600224 +DEAL::inverse jacobian: 0.6787516066 -0.02098558751 0.3806387880 0.9122476719 0.8156294447 -1.581952197 -0.02356927527 0.7069033952 0.3509122942 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 0.2665441176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 0.2665441176 +DEAL::real point: -0.3415220448 -0.2987437738 0.7476112822 +DEAL::jacobian: 1.205868584 0.1952580057 -0.1551457988 -0.1575804546 0.1708004340 1.216969612 0.4878516218 -0.4274309380 0.4153914837 +DEAL::inverse jacobian: 0.7003817901 -0.01752898873 0.3129422341 0.7809966984 0.6831733712 -1.709791615 -0.01892248906 0.7235607667 0.2804891150 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 0.3253676471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 0.3253676471 +DEAL::real point: -0.2663289165 -0.2245218407 0.7699931685 +DEAL::jacobian: 1.239712092 0.1575670806 -0.09229031966 -0.09336607936 0.1328329324 1.248162813 0.4016256421 -0.4555478887 0.3320666220 +DEAL::inverse jacobian: 0.7255683474 -0.01217370955 0.2474133225 0.6303475295 0.5313900653 -1.822183573 -0.01280877677 0.7437149049 0.2124290168 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 0.3841911765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 0.3841911765 +DEAL::real point: -0.1887262238 -0.1480024603 0.7796633598 +DEAL::jacobian: 1.255093517 0.1156812009 -0.04400762446 -0.04435470718 0.09071925451 1.260850488 0.2955123214 -0.4779006961 0.2287822553 +DEAL::inverse jacobian: 0.7538503665 -0.006572624228 0.1812302280 0.4628982642 0.3630045080 -1.911526562 -0.006786667621 0.7667657538 0.1439113361 +DEAL:: +DEAL::Cell with center -0.7500000000 0.000000000 0.000000000 +DEAL::unit point 0.000000000 0.01562500000 0.03125000000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 0.03125000000 +DEAL::real point: -0.6012515503 -0.5766780283 -0.5531118850 +DEAL::jacobian: 0.3006257752 -0.5451047218 -0.5028021231 0.2883390141 1.028078186 -0.4708742132 0.2765559425 -0.4792241836 1.037544546 +DEAL::inverse jacobian: 1.202614899 1.153285796 1.106198158 -0.6140001023 0.6448553041 -0.004891183772 -0.6041514042 -0.009558899059 0.6666994247 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 0.09007352941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 0.09007352941 +DEAL::real point: -0.6458946236 -0.5236491363 -0.5006487306 +DEAL::jacobian: 0.3327335940 -0.5678322357 -0.5269785406 0.2697586460 1.076593717 -0.3878215644 0.2579099521 -0.3935342121 1.085414032 +DEAL::inverse jacobian: 1.330868371 1.079070735 1.031703977 -0.5145985457 0.6511581627 -0.01718165854 -0.5028093568 -0.02031489048 0.6699302618 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 0.1488970588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 0.1488970588 +DEAL::real point: -0.6898189280 -0.4638689601 -0.4413495827 +DEAL::jacobian: 0.3664663055 -0.5637263832 -0.5242861733 0.2464303850 1.131109442 -0.3040364983 0.2344669658 -0.3077064276 1.138987341 +DEAL::inverse jacobian: 1.465870590 0.9857044091 0.9378732850 -0.4318328778 0.6629346266 -0.02181559325 -0.4184207888 -0.02381578386 0.6790127251 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 0.2077205882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 0.2077205882 +DEAL::real point: -0.7296048967 -0.3975220470 -0.3754490693 +DEAL::jacobian: 0.4001059111 -0.5296580578 -0.4916531675 0.2179959612 1.184918213 -0.2230067743 0.2058914251 -0.2251684199 1.191647942 +DEAL::inverse jacobian: 1.600505328 0.8719163056 0.8235123164 -0.3592752276 0.6793347847 -0.02109897043 -0.3444203139 -0.02228456050 0.6929018420 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 0.2665441176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 0.2665441176 +DEAL::real point: -0.7617762381 -0.3254496235 -0.3038288032 +DEAL::jacobian: 0.4316732016 -0.4659549502 -0.4294079675 0.1844214533 1.231013199 -0.1491492850 0.1721696551 -0.1502736993 1.236464183 +DEAL::inverse jacobian: 1.726751520 0.7376654204 0.6886597629 -0.2921224514 0.6996853324 -0.01705034513 -0.2759421097 -0.01767887668 0.7107941176 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 0.3253676471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 0.3253676471 +DEAL::real point: -0.7832188522 -0.2491480826 -0.2280163559 +DEAL::jacobian: 0.4591282926 -0.3763793530 -0.3412849877 0.1460523243 1.262962747 -0.08690735607 0.1336647603 -0.08739008956 1.267066627 +DEAL::inverse jacobian: 1.836493511 0.5842998699 0.5347371699 -0.2267845592 0.7234108402 -0.01146620211 -0.2093758783 -0.01174473673 0.7320234249 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 0.3841911765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 0.3841911765 +DEAL::real point: -0.7915521155 -0.1706669598 -0.1500833118 +DEAL::jacobian: 0.4805852130 -0.2675621625 -0.2338790353 0.1036192256 1.275678587 -0.03997720271 0.09112201076 -0.04012484930 1.278418478 +DEAL::inverse jacobian: 1.922257990 0.4146454377 0.3646319393 -0.1605904368 0.7500277440 -0.005925074928 -0.1420533913 -0.006014130722 0.7560405912 +DEAL:: +DEAL::Cell with center 0.000000000 -0.7500000000 -4.163336342e-17 +DEAL::unit point 0.000000000 0.01562500000 0.03125000000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 0.03125000000 +DEAL::real point: -0.5879922187 -0.5879922187 -0.5412602679 +DEAL::jacobian: 1.004782175 0.2963110393 -0.4711038208 -0.5550460846 0.2963110393 -0.4711038208 -0.4883767092 0.2727610799 1.023604617 +DEAL::inverse jacobian: 0.6410962192 -0.6410962192 -7.800063003e-16 1.185116730 1.185413181 1.091012759 -0.009923027903 -0.6217547579 0.6862163082 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 0.09007352941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 0.09007352941 +DEAL::real point: -0.5359927398 -0.6317656581 -0.4904247681 +DEAL::jacobian: 1.051491509 0.2783580434 -0.3905472313 -0.5797037152 0.3280959599 -0.4986727806 -0.4024407294 0.2546931493 1.069124072 +DEAL::inverse jacobian: 0.6484024354 -0.5388639874 -0.01448384475 1.113451647 1.312323510 1.018848513 -0.02118085086 -0.5154692874 0.6871769082 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 0.1488970588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 0.1488970588 +DEAL::real point: -0.4774156808 -0.6752050943 -0.4328300536 +DEAL::jacobian: 1.105024971 0.2557500053 -0.3086687551 -0.5785019225 0.3617051416 -0.5002867842 -0.3163772708 0.2318656319 1.120856490 +DEAL::inverse jacobian: 0.6612172294 -0.4542739492 -0.02067182943 1.022981696 1.446811969 0.9274901855 -0.02498107035 -0.4275194264 0.6944749950 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 0.2077205882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 0.2077205882 +DEAL::real point: -0.4123477836 -0.7149693757 -0.3686646352 +DEAL::jacobian: 1.158807388 0.2280805229 -0.2287595979 -0.5479223586 0.3954685718 -0.4725600224 -0.2333564143 0.2039182120 1.172410808 +DEAL::inverse jacobian: 0.6787516066 -0.3806387880 -0.02098558751 0.9122476719 1.581952197 0.8156294447 -0.02356927527 -0.3509122942 0.7069033952 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 0.2665441176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 0.2665441176 +DEAL::real point: -0.3415220448 -0.7476112822 -0.2987437738 +DEAL::jacobian: 1.205868584 0.1952580057 -0.1551457988 -0.4878516218 0.4274309380 -0.4153914837 -0.1575804546 0.1708004340 1.216969612 +DEAL::inverse jacobian: 0.7003817901 -0.3129422341 -0.01752898873 0.7809966984 1.709791615 0.6831733712 -0.01892248906 -0.2804891150 0.7235607667 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 0.3253676471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 0.3253676471 +DEAL::real point: -0.2663289165 -0.7699931685 -0.2245218407 +DEAL::jacobian: 1.239712092 0.1575670806 -0.09229031966 -0.4016256421 0.4555478887 -0.3320666220 -0.09336607936 0.1328329324 1.248162813 +DEAL::inverse jacobian: 0.7255683474 -0.2474133225 -0.01217370955 0.6303475295 1.822183573 0.5313900653 -0.01280877677 -0.2124290168 0.7437149049 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 0.3841911765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 0.3841911765 +DEAL::real point: -0.1887262238 -0.7796633598 -0.1480024603 +DEAL::jacobian: 1.255093517 0.1156812009 -0.04400762446 -0.2955123214 0.4779006961 -0.2287822553 -0.04435470718 0.09071925451 1.260850488 +DEAL::inverse jacobian: 0.7538503665 -0.1812302280 -0.006572624228 0.4628982642 1.911526562 0.3630045080 -0.006786667621 -0.1439113361 0.7667657538 +DEAL:: +DEAL::Cell with center 0.000000000 0.7500000000 0.000000000 +DEAL::unit point 0.000000000 0.01562500000 0.03125000000 +DEAL::unit point via evaluator: 0.000000000 0.01562500000 0.03125000000 +DEAL::real point: -0.5766780283 0.6012515503 -0.5531118850 +DEAL::jacobian: 0.2883390141 1.028078186 -0.4708742132 -0.3006257752 0.5451047218 0.5028021231 0.2765559425 -0.4792241836 1.037544546 +DEAL::inverse jacobian: 1.153285796 -1.202614899 1.106198158 0.6448553041 0.6140001023 -0.004891183772 -0.009558899059 0.6041514042 0.6666994247 +DEAL:: +DEAL::unit point 0.05882352941 0.07444852941 0.09007352941 +DEAL::unit point via evaluator: 0.05882352941 0.07444852941 0.09007352941 +DEAL::real point: -0.5236491363 0.6458946236 -0.5006487306 +DEAL::jacobian: 0.2697586460 1.076593717 -0.3878215644 -0.3327335940 0.5678322357 0.5269785406 0.2579099521 -0.3935342121 1.085414032 +DEAL::inverse jacobian: 1.079070735 -1.330868371 1.031703977 0.6511581627 0.5145985457 -0.01718165854 -0.02031489048 0.5028093568 0.6699302618 +DEAL:: +DEAL::unit point 0.1176470588 0.1332720588 0.1488970588 +DEAL::unit point via evaluator: 0.1176470588 0.1332720588 0.1488970588 +DEAL::real point: -0.4638689601 0.6898189280 -0.4413495827 +DEAL::jacobian: 0.2464303850 1.131109442 -0.3040364983 -0.3664663055 0.5637263832 0.5242861733 0.2344669658 -0.3077064276 1.138987341 +DEAL::inverse jacobian: 0.9857044091 -1.465870590 0.9378732850 0.6629346266 0.4318328778 -0.02181559325 -0.02381578386 0.4184207888 0.6790127251 +DEAL:: +DEAL::unit point 0.1764705882 0.1920955882 0.2077205882 +DEAL::unit point via evaluator: 0.1764705882 0.1920955882 0.2077205882 +DEAL::real point: -0.3975220470 0.7296048967 -0.3754490693 +DEAL::jacobian: 0.2179959612 1.184918213 -0.2230067743 -0.4001059111 0.5296580578 0.4916531675 0.2058914251 -0.2251684199 1.191647942 +DEAL::inverse jacobian: 0.8719163056 -1.600505328 0.8235123164 0.6793347847 0.3592752276 -0.02109897043 -0.02228456050 0.3444203139 0.6929018420 +DEAL:: +DEAL::unit point 0.2352941176 0.2509191176 0.2665441176 +DEAL::unit point via evaluator: 0.2352941176 0.2509191176 0.2665441176 +DEAL::real point: -0.3254496235 0.7617762381 -0.3038288032 +DEAL::jacobian: 0.1844214533 1.231013199 -0.1491492850 -0.4316732016 0.4659549502 0.4294079675 0.1721696551 -0.1502736993 1.236464183 +DEAL::inverse jacobian: 0.7376654204 -1.726751520 0.6886597629 0.6996853324 0.2921224514 -0.01705034513 -0.01767887668 0.2759421097 0.7107941176 +DEAL:: +DEAL::unit point 0.2941176471 0.3097426471 0.3253676471 +DEAL::unit point via evaluator: 0.2941176471 0.3097426471 0.3253676471 +DEAL::real point: -0.2491480826 0.7832188522 -0.2280163559 +DEAL::jacobian: 0.1460523243 1.262962747 -0.08690735607 -0.4591282926 0.3763793530 0.3412849877 0.1336647603 -0.08739008956 1.267066627 +DEAL::inverse jacobian: 0.5842998699 -1.836493511 0.5347371699 0.7234108402 0.2267845592 -0.01146620211 -0.01174473673 0.2093758783 0.7320234249 +DEAL:: +DEAL::unit point 0.3529411765 0.3685661765 0.3841911765 +DEAL::unit point via evaluator: 0.3529411765 0.3685661765 0.3841911765 +DEAL::real point: -0.1706669598 0.7915521155 -0.1500833118 +DEAL::jacobian: 0.1036192256 1.275678587 -0.03997720271 -0.4805852130 0.2675621625 0.2338790353 0.09112201076 -0.04012484930 1.278418478 +DEAL::inverse jacobian: 0.4146454377 -1.922257990 0.3646319393 0.7500277440 0.1605904368 -0.005925074928 -0.006014130722 0.1420533913 0.7560405912 +DEAL:: diff --git a/tests/remote_point_evaluation/remote_point_evaluation_01.cc b/tests/remote_point_evaluation/remote_point_evaluation_01.cc index 656fc793a6..882be509ef 100644 --- a/tests/remote_point_evaluation/remote_point_evaluation_01.cc +++ b/tests/remote_point_evaluation/remote_point_evaluation_01.cc @@ -349,7 +349,8 @@ compute_force_vector_sharp_interface( AffineConstraints constraints; // TODO: use the right ones FEPointEvaluation phi_force(mapping, - dof_handler.get_fe()); + dof_handler.get_fe(), + update_values); std::vector buffer; std::vector local_dof_indices; @@ -378,10 +379,12 @@ compute_force_vector_sharp_interface( cell_data.reference_point_ptrs[i + 1] - cell_data.reference_point_ptrs[i]); + phi_force.reinit(cell, unit_points); + for (unsigned int q = 0; q < unit_points.size(); ++q) phi_force.submit_value(force_JxW[q], q); - phi_force.integrate(cell, unit_points, buffer, EvaluationFlags::values); + phi_force.integrate(buffer, EvaluationFlags::values); constraints.distribute_local_to_global(buffer, local_dof_indices, diff --git a/tests/remote_point_evaluation/remote_point_evaluation_02.cc b/tests/remote_point_evaluation/remote_point_evaluation_02.cc index b7e23cf7b4..912abba920 100644 --- a/tests/remote_point_evaluation/remote_point_evaluation_02.cc +++ b/tests/remote_point_evaluation/remote_point_evaluation_02.cc @@ -230,11 +230,15 @@ compute_force_vector_sharp_interface( const auto fu = [&](const auto &values, const auto &cell_data) { AffineConstraints constraints; // TODO: use the right ones - FEPointEvaluation<1, spacedim> phi_curvature(mapping, dof_handler.get_fe()); + FEPointEvaluation<1, spacedim> phi_curvature(mapping, + dof_handler.get_fe(), + update_values); FEPointEvaluation phi_normal(mapping, - dof_handler_dim.get_fe()); + dof_handler_dim.get_fe(), + update_values); FEPointEvaluation phi_force(mapping, - dof_handler_dim.get_fe()); + dof_handler_dim.get_fe(), + update_values); std::vector buffer; std::vector buffer_dim; @@ -278,9 +282,8 @@ compute_force_vector_sharp_interface( buffer.begin(), buffer.end()); - phi_curvature.evaluate(cell, - unit_points, - make_array_view(buffer), + phi_curvature.reinit(cell, unit_points); + phi_curvature.evaluate(make_array_view(buffer), EvaluationFlags::values); } @@ -296,13 +299,13 @@ compute_force_vector_sharp_interface( buffer_dim.begin(), buffer_dim.end()); - phi_normal.evaluate(cell_dim, - unit_points, - make_array_view(buffer_dim), + phi_normal.reinit(cell_dim, unit_points); + phi_normal.evaluate(make_array_view(buffer_dim), EvaluationFlags::values); } // perform operation on quadrature points + phi_force.reinit(cell_dim, unit_points); for (unsigned int q = 0; q < unit_points.size(); ++q) phi_force.submit_value(surface_tension * phi_normal.get_value(q) * phi_curvature.get_value(q) * JxW[q], @@ -310,10 +313,7 @@ compute_force_vector_sharp_interface( // integrate_scatter force { - phi_force.integrate(cell_dim, - unit_points, - buffer_dim, - EvaluationFlags::values); + phi_force.integrate(buffer_dim, EvaluationFlags::values); constraints.distribute_local_to_global(buffer_dim, local_dof_indices_dim, diff --git a/tests/remote_point_evaluation/remote_point_evaluation_03.cc b/tests/remote_point_evaluation/remote_point_evaluation_03.cc index 05215e12b6..59f35847f3 100644 --- a/tests/remote_point_evaluation/remote_point_evaluation_03.cc +++ b/tests/remote_point_evaluation/remote_point_evaluation_03.cc @@ -208,9 +208,11 @@ test_1(const Triangulation &surface_mesh, AffineConstraints constraints; // TODO: use the right ones FEPointEvaluation phi_normal(mapping, - dof_handler_dim.get_fe()); + dof_handler_dim.get_fe(), + update_values); FEPointEvaluation phi_force(mapping, - dof_handler_dim.get_fe()); + dof_handler_dim.get_fe(), + update_values); std::vector buffer; std::vector buffer_dim; @@ -248,9 +250,8 @@ test_1(const Triangulation &surface_mesh, buffer_dim.begin(), buffer_dim.end()); - phi_normal.evaluate(cell_dim, - unit_points, - make_array_view(buffer_dim), + phi_normal.reinit(cell_dim, unit_points); + phi_normal.evaluate(make_array_view(buffer_dim), EvaluationFlags::values); }