From: Peter Munch Date: Sat, 29 Dec 2018 06:44:41 +0000 (+0100) Subject: Save level_mg_handler inside of MatrixFree X-Git-Tag: v9.2.0-rc1~980^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4bf630062025236c83b5e7258923354b474fd91;p=dealii.git Save level_mg_handler inside of MatrixFree --- diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index e70bdfbaaa..4c7ed65a92 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -1601,6 +1601,12 @@ public: bool mapping_initialized() const; + /** + * Return the level of the mesh to be worked on. + */ + unsigned int + get_level_mg_handler() const; + /** * Return an approximation of the memory consumption of this class in * bytes. @@ -1928,6 +1934,11 @@ private: */ mutable std::list>> scratch_pad_non_threadsafe; + + /** + * Stored the level of the mesh to be worked on. + */ + unsigned int level_mg_handler; }; @@ -2481,6 +2492,14 @@ MatrixFree::mapping_initialized() const } +template +inline unsigned int +MatrixFree::get_level_mg_handler() const +{ + return level_mg_handler; +} + + template AlignedVector * diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 75ab6f44ab..a1c2aa7ee1 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -58,6 +58,7 @@ MatrixFree::MatrixFree() : Subscriptor() , indices_are_initialized(false) , mapping_is_initialized(false) + , level_mg_handler(numbers::invalid_unsigned_int) {} @@ -249,6 +250,7 @@ MatrixFree::copy_from( task_info = v.task_info; indices_are_initialized = v.indices_are_initialized; mapping_is_initialized = v.mapping_is_initialized; + level_mg_handler = v.level_mg_handler; } @@ -265,6 +267,9 @@ MatrixFree::internal_reinit( const typename MatrixFree::AdditionalData &additional_data) { + // Store the level of the mesh to be worked on. + this->level_mg_handler = additional_data.level_mg_handler; + // Reads out the FE information and stores the shape function values, // gradients and Hessians for quadrature points. { @@ -425,6 +430,9 @@ MatrixFree::internal_reinit( const typename MatrixFree::AdditionalData &additional_data) { + // Store the level of the mesh to be worked on. + this->level_mg_handler = additional_data.level_mg_handler; + // Reads out the FE information and stores the shape function values, // gradients and Hessians for quadrature points. {