]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Save level_mg_handler inside of MatrixFree 8915/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 29 Dec 2018 06:44:41 +0000 (07:44 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 16 Oct 2019 15:41:02 +0000 (17:41 +0200)
include/deal.II/matrix_free/matrix_free.h
include/deal.II/matrix_free/matrix_free.templates.h

index e70bdfbaaad3ecb140954e7fd37d37629587afa7..4c7ed65a9271c6a929070234eee238221c0b53a3 100644 (file)
@@ -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<std::pair<bool, AlignedVector<Number>>>
     scratch_pad_non_threadsafe;
+
+  /**
+   * Stored the level of the mesh to be worked on.
+   */
+  unsigned int level_mg_handler;
 };
 
 
@@ -2481,6 +2492,14 @@ MatrixFree<dim, Number, VectorizedArrayType>::mapping_initialized() const
 }
 
 
+template <int dim, typename Number, typename VectorizedArrayType>
+inline unsigned int
+MatrixFree<dim, Number, VectorizedArrayType>::get_level_mg_handler() const
+{
+  return level_mg_handler;
+}
+
+
 
 template <int dim, typename Number, typename VectorizedArrayType>
 AlignedVector<VectorizedArrayType> *
index 75ab6f44ab085d6b3b2d63f486e288f999e676b5..a1c2aa7ee186cd173f0ef49f6cf42bf8d550fc22 100644 (file)
@@ -58,6 +58,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::MatrixFree()
   : Subscriptor()
   , indices_are_initialized(false)
   , mapping_is_initialized(false)
+  , level_mg_handler(numbers::invalid_unsigned_int)
 {}
 
 
@@ -249,6 +250,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::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<dim, Number, VectorizedArrayType>::internal_reinit(
   const typename MatrixFree<dim, Number, VectorizedArrayType>::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<dim, Number, VectorizedArrayType>::internal_reinit(
   const typename MatrixFree<dim, Number, VectorizedArrayType>::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.
   {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.