From: Luca Heltai Date: Thu, 3 Mar 2016 09:46:32 +0000 (+0100) Subject: Removed a couple of functions. X-Git-Tag: v8.5.0-rc1~1131^2~25 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ce9819942ed3d384702bbd24c92f842f10ff62f;p=dealii.git Removed a couple of functions. --- diff --git a/include/deal.II/fe/mapping_manifold.h b/include/deal.II/fe/mapping_manifold.h index 9d2c5b111a..b7b7b26dfe 100644 --- a/include/deal.II/fe/mapping_manifold.h +++ b/include/deal.II/fe/mapping_manifold.h @@ -205,18 +205,17 @@ public: void compute_manifold_quadrature_weights(const Quadrature &quadrature); - /** * Return an estimate (in bytes) or the memory consumption of this object. */ virtual std::size_t memory_consumption () const; /** - * Values of manifold quadrature formulas. + * Store the current cell. * * Computed each. */ - std::vector > cell_manifold_quadratures; + typename Triangulation::cell_iterator current_cell; /** * Values of quadrature weights for manifold quadrature formulas. diff --git a/source/fe/mapping_manifold.cc b/source/fe/mapping_manifold.cc index 22ec5554bc..2ae478fe97 100644 --- a/source/fe/mapping_manifold.cc +++ b/source/fe/mapping_manifold.cc @@ -78,13 +78,10 @@ initialize (const UpdateFlags update_flags, const unsigned int n_q_points = q.size(); - // Update the weights used in the Manifold Quadrature formulas - compute_manifold_quadrature_weights(q); - // see if we need the (transformation) shape function values // and/or gradients and resize the necessary arrays if (this->update_each & update_quadrature_points) - cell_manifold_quadratures.resize(q.size()); + compute_manifold_quadrature_weights(q); // if (this->update_each & (update_covariant_transformation // | update_contravariant_transformation @@ -127,7 +124,6 @@ initialize (const UpdateFlags update_flags, } - template void MappingManifold::InternalData:: @@ -377,23 +373,26 @@ namespace internal */ template void - maybe_compute_q_points (const typename QProjector::DataSetDescriptor data_set, + maybe_compute_q_points (const typename dealii::Triangulation::cell_iterator &cell, + const typename QProjector::DataSetDescriptor data_set, const typename dealii::MappingManifold::InternalData &data, std::vector > &quadrature_points) { const UpdateFlags update_flags = data.update_each; + AssertDimension(quadrature_points.size(), + data.cell_manifold_quadratures_weights.size()); + + std::vector > vertices; + for (unsigned int v=0; v::vertices_per_cell; ++v) + vertices[v] = cell->vertex(v); + if (update_flags & update_quadrature_points) { for (unsigned int point=0; point result = (shape[0] * - data.mapping_support_points[0]); - for (unsigned int k=1; kget_manifold(). + get_new_point(Quadrature(vertices, data.cell_manifold_quadratures_weights[point])); } } } @@ -919,31 +918,18 @@ fill_fe_values (const typename Triangulation::cell_iterator &cell, const typename Mapping::InternalDataBase &internal_data, internal::FEValues::MappingRelatedData &output_data) const { -// // ensure that the following static_cast is really correct: -// Assert (dynamic_cast(&internal_data) != 0, -// ExcInternalError()); -// const InternalData &data = static_cast(internal_data); + // ensure that the following static_cast is really correct: + Assert (dynamic_cast(&internal_data) != 0, + ExcInternalError()); + const InternalData &data = static_cast(internal_data); -// const unsigned int n_q_points=quadrature.size(); + const unsigned int n_q_points=quadrature.size(); -// // if necessary, recompute the support points of the transformation of this cell -// // (note that we need to first check the triangulation pointer, since otherwise -// // the second test might trigger an exception if the triangulations are not the -// // same) -// if ((data.mapping_support_points.size() == 0) -// || -// (&cell->get_triangulation() != -// &data.cell_of_current_support_points->get_triangulation()) -// || -// (cell != data.cell_of_current_support_points)) -// { -// data.mapping_support_points = this->compute_mapping_support_points(cell); -// data.cell_of_current_support_points = cell; -// } + internal::maybe_compute_q_points (cell, + QProjector::DataSetDescriptor::cell (), + data, + output_data.quadrature_points); -// internal::maybe_compute_q_points (QProjector::DataSetDescriptor::cell (), -// data, -// output_data.quadrature_points); // internal::maybe_update_Jacobians (cell_similarity, // QProjector::DataSetDescriptor::cell (), // data); @@ -1258,7 +1244,8 @@ namespace internal const typename dealii::MappingManifold::InternalData &data, internal::FEValues::MappingRelatedData &output_data) { - maybe_compute_q_points (data_set, + maybe_compute_q_points (cell, + data_set, data, output_data.quadrature_points); maybe_update_Jacobians (CellSimilarity::none, diff --git a/tests/fe/mapping_manifold_02.cc b/tests/fe/mapping_manifold_02.cc index 2bb80f5bba..4fc61bb517 100644 --- a/tests/fe/mapping_manifold_02.cc +++ b/tests/fe/mapping_manifold_02.cc @@ -84,10 +84,11 @@ void test() { const Point pq = map_manifold.transform_unit_to_real_cell(cell,q_points_from_quadrature[q]); - if(pq.distance(q_points_from_fe_values[q]) > 1e-10) { - deallog << "Expected: " << pq << ", got: " - << q_points_from_fe_values[q] << std::endl; - } + if (pq.distance(q_points_from_fe_values[q]) > 1e-10) + { + deallog << "Expected: " << pq << ", got: " + << q_points_from_fe_values[q] << std::endl; + } } } deallog << "OK" << std::endl;