From af47fc178727c00dc47990ecf034733c9863561c Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Thu, 3 Mar 2016 14:58:53 +0100 Subject: [PATCH] Fixed name, fixed bug. --- include/deal.II/fe/mapping_manifold.h | 8 ++++---- source/fe/mapping_manifold.cc | 17 ++++++++++------- tests/fe/mapping_manifold_02.cc | 2 ++ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/deal.II/fe/mapping_manifold.h b/include/deal.II/fe/mapping_manifold.h index b7b7b26dfe..ccf5ea2c6d 100644 --- a/include/deal.II/fe/mapping_manifold.h +++ b/include/deal.II/fe/mapping_manifold.h @@ -222,7 +222,7 @@ public: * * Computed once. */ - std::vector > cell_manifold_quadratures_weights; + std::vector > cell_manifold_quadrature_weights; // /** // * Values of shape function derivatives. Access by function @p derivative. @@ -582,13 +582,13 @@ inline void MappingManifold::InternalData::compute_manifold_quadrature_weights (const Quadrature &quad) { - static FE_Q fe_q(1); - cell_manifold_quadratures_weights.resize(quad.size(), std::vector(GeometryInfo::vertices_per_cell)); + FE_Q fe_q(1); + cell_manifold_quadrature_weights.resize(quad.size(), std::vector(GeometryInfo::vertices_per_cell)); for (unsigned int q=0; q::vertices_per_cell; ++i) { - cell_manifold_quadratures_weights[q][i] = fe_q.shape_value(i, quad.point(q)); + cell_manifold_quadrature_weights[q][i] = fe_q.shape_value(i, quad.point(q)); } } } diff --git a/source/fe/mapping_manifold.cc b/source/fe/mapping_manifold.cc index 2ae478fe97..ba3eff3796 100644 --- a/source/fe/mapping_manifold.cc +++ b/source/fe/mapping_manifold.cc @@ -380,19 +380,22 @@ namespace internal { 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) { + + AssertDimension(quadrature_points.size(), + data.cell_manifold_quadrature_weights.size()); + + std::vector > vertices; + for (unsigned int v=0; v::vertices_per_cell; ++v) + vertices.push_back(cell->vertex(v)); + for (unsigned int point=0; pointget_manifold(). - get_new_point(Quadrature(vertices, data.cell_manifold_quadratures_weights[point])); + get_new_point(Quadrature(vertices, + data.cell_manifold_quadrature_weights[point])); } } } diff --git a/tests/fe/mapping_manifold_02.cc b/tests/fe/mapping_manifold_02.cc index 4fc61bb517..9ef5c321ba 100644 --- a/tests/fe/mapping_manifold_02.cc +++ b/tests/fe/mapping_manifold_02.cc @@ -76,6 +76,7 @@ void test() cell = triangulation.begin_active(); + std::ofstream two_be_plotted("plot.txt"); for (; cell!=endc; ++cell) { fe_values.reinit(cell); @@ -89,6 +90,7 @@ void test() deallog << "Expected: " << pq << ", got: " << q_points_from_fe_values[q] << std::endl; } + two_be_plotted << pq << " " << q_points_from_fe_values[q] << std::endl; } } deallog << "OK" << std::endl; -- 2.39.5