From 847250b652be5562546f48db1a199db482c44ae5 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 23 Jul 2015 17:10:57 -0500 Subject: [PATCH] Move a member variable to derived classes. The variable isn't used in the base class, and not all derived classes use it either. --- include/deal.II/fe/mapping.h | 6 ------ include/deal.II/fe/mapping_fe_field.h | 6 ++++++ include/deal.II/fe/mapping_q1.h | 6 ++++++ source/fe/mapping_fe_field.cc | 1 + source/fe/mapping_q1.cc | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/deal.II/fe/mapping.h b/include/deal.II/fe/mapping.h index cd5d6cf75a..2909526df2 100644 --- a/include/deal.II/fe/mapping.h +++ b/include/deal.II/fe/mapping.h @@ -320,12 +320,6 @@ public: */ virtual std::size_t memory_consumption () const; - /** - * The determinant of the Jacobian in each quadrature point. Filled if - * #update_volume_elements. - */ - mutable std::vector volume_elements; - /** * The positions of the mapped (generalized) support points. */ diff --git a/include/deal.II/fe/mapping_fe_field.h b/include/deal.II/fe/mapping_fe_field.h index 66ede96660..917cf17dcd 100644 --- a/include/deal.II/fe/mapping_fe_field.h +++ b/include/deal.II/fe/mapping_fe_field.h @@ -288,6 +288,12 @@ public: */ mutable std::vector< DerivativeForm<1,dim,spacedim> > contravariant; + /** + * The determinant of the Jacobian in each quadrature point. Filled if + * #update_volume_elements. + */ + mutable std::vector volume_elements; + /** * Unit tangential vectors. Used for the computation of boundary forms and * normal vectors. diff --git a/include/deal.II/fe/mapping_q1.h b/include/deal.II/fe/mapping_q1.h index 2b6e7a429d..e34b736ddd 100644 --- a/include/deal.II/fe/mapping_q1.h +++ b/include/deal.II/fe/mapping_q1.h @@ -278,6 +278,12 @@ public: */ mutable typename Triangulation::cell_iterator cell_of_current_support_points; + /** + * The determinant of the Jacobian in each quadrature point. Filled if + * #update_volume_elements. + */ + mutable std::vector volume_elements; + /** * Default value of this flag is @p true. If *this is an object * of a derived class, this flag is set to @p false. diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index 0acb705a55..4d3976f8c4 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -60,6 +60,7 @@ template std::size_t MappingFEField::InternalData::memory_consumption () const { + Assert (false, ExcNotImplemented()); return 0; } diff --git a/source/fe/mapping_q1.cc b/source/fe/mapping_q1.cc index a2d077e749..8ac9ef5ab3 100644 --- a/source/fe/mapping_q1.cc +++ b/source/fe/mapping_q1.cc @@ -61,6 +61,7 @@ MappingQ1::InternalData::memory_consumption () const MemoryConsumption::memory_consumption (aux) + MemoryConsumption::memory_consumption (mapping_support_points) + MemoryConsumption::memory_consumption (cell_of_current_support_points) + + MemoryConsumption::memory_consumption (volume_elements) + MemoryConsumption::memory_consumption (is_mapping_q1_data) + MemoryConsumption::memory_consumption (n_shape_functions)); } -- 2.39.5