From 2d260f367fdac3b6105fd8d26eaf8274ffa71eca Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Mon, 7 Mar 2016 14:08:06 +0100 Subject: [PATCH] Fixed memory consumption. --- source/fe/mapping_manifold.cc | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/source/fe/mapping_manifold.cc b/source/fe/mapping_manifold.cc index c8ce69650e..8c9e2a1db9 100644 --- a/source/fe/mapping_manifold.cc +++ b/source/fe/mapping_manifold.cc @@ -52,16 +52,12 @@ template std::size_t MappingManifold::InternalData::memory_consumption () const { - return (Mapping::InternalDataBase::memory_consumption() ); - // MemoryConsumption::memory_consumption (covariant) + - // MemoryConsumption::memory_consumption (contravariant) + - // MemoryConsumption::memory_consumption (unit_tangentials) + - // 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 (polynomial_degree) + - // MemoryConsumption::memory_consumption (n_shape_functions)); + return (Mapping::InternalDataBase::memory_consumption() + + MemoryConsumption::memory_consumption (covariant) + + MemoryConsumption::memory_consumption (contravariant) + + MemoryConsumption::memory_consumption (unit_tangentials) + + MemoryConsumption::memory_consumption (aux) + + MemoryConsumption::memory_consumption (volume_elements)); } @@ -284,14 +280,12 @@ MappingManifold::requires_update_flags (const UpdateFlags in) cons | update_jacobian_pushed_forward_3rd_derivatives) ) out |= update_covariant_transformation; - // The contravariant transformation - // used in the Piola transformation, which - // requires the determinant of the - // Jacobi matrix of the transformation. - // Because we have no way of knowing here whether the finite - // elements wants to use the contravariant of the Piola - // transforms, we add the JxW values to the list of flags to be - // updated for each cell. + // The contravariant transformation used in the Piola + // transformation, which requires the determinant of the Jacobi + // matrix of the transformation. Because we have no way of + // knowing here whether the finite elements wants to use the + // contravariant of the Piola transforms, we add the JxW values + // to the list of flags to be updated for each cell. if (out & update_contravariant_transformation) out |= update_JxW_values; -- 2.39.5