]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CellAccessor: clean up some very long lines. 17985/head
authorDavid Wells <drwells@email.unc.edu>
Fri, 10 Jan 2025 17:37:55 +0000 (12:37 -0500)
committerDavid Wells <drwells@email.unc.edu>
Fri, 10 Jan 2025 17:37:55 +0000 (12:37 -0500)
source/grid/tria_accessor.cc

index 6353eebf126d97680d5ccb5fa8ada3ca19394371..c17faefb8aa68d9f2a0815bb7eb2f148f0b8d5bf 100644 (file)
@@ -2357,27 +2357,18 @@ CellAccessor<dim, spacedim>::set_neighbor(
 {
   AssertIndexRange(i, this->n_faces());
 
+  auto &neighbor =
+    this->tria->levels[this->present_level]
+      ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() + i];
   if (pointer.state() == IteratorState::valid)
     {
-      this->tria->levels[this->present_level]
-        ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
-                    i]
-        .first = pointer->present_level;
-      this->tria->levels[this->present_level]
-        ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
-                    i]
-        .second = pointer->present_index;
+      neighbor.first  = pointer->present_level;
+      neighbor.second = pointer->present_index;
     }
   else
     {
-      this->tria->levels[this->present_level]
-        ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
-                    i]
-        .first = -1;
-      this->tria->levels[this->present_level]
-        ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
-                    i]
-        .second = -1;
+      neighbor.first  = -1;
+      neighbor.second = -1;
     }
 }
 

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.