]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add comment
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 25 Sep 2019 07:33:04 +0000 (09:33 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 25 Sep 2019 07:33:04 +0000 (09:33 +0200)
include/deal.II/grid/tria_accessor.templates.h

index fe9e0e9c0d85a08ead1ef9da45c2d130ca3dc572..de7ca2ff1783863ca877532367a6db15b3f05b88 100644 (file)
@@ -3567,6 +3567,10 @@ CellAccessor<dim, spacedim>::is_locally_owned() const
   return true;
 #else
 
+  // Serial triangulations report invalid_subdomain_id as their locally owned
+  // subdomain, so the first condition checks whether we have a serial
+  // triangulation, in which case all cells are locally owned. The second
+  // condition compares the subdomain id in the parallel case.
   return (this->tria->locally_owned_subdomain() ==
             numbers::invalid_subdomain_id ||
           this->subdomain_id() == this->tria->locally_owned_subdomain());
@@ -3583,6 +3587,10 @@ CellAccessor<dim, spacedim>::is_locally_owned_on_level() const
   return true;
 #else
 
+  // Serial triangulations report invalid_subdomain_id as their locally owned
+  // subdomain, so the first condition checks whether we have a serial
+  // triangulation, in which case all cells are locally owned. The second
+  // condition compares the subdomain id in the parallel case.
   return (this->tria->locally_owned_subdomain() ==
             numbers::invalid_subdomain_id ||
           this->level_subdomain_id() == this->tria->locally_owned_subdomain());
@@ -3604,6 +3612,11 @@ CellAccessor<dim, spacedim>::is_ghost() const
   return false;
 #else
 
+  // Serial triangulations report invalid_subdomain_id as their locally owned
+  // subdomain, so the first condition rules out that case as all cells to a
+  // serial triangulation are locally owned and none is ghosted. The second
+  // and third conditions check whether the cell's subdomain is not the
+  // locally owned one and not artificial.
   return (this->tria->locally_owned_subdomain() !=
             numbers::invalid_subdomain_id &&
           this->subdomain_id() != this->tria->locally_owned_subdomain() &&
@@ -3624,6 +3637,9 @@ CellAccessor<dim, spacedim>::is_artificial() const
   return false;
 #else
 
+  // Serial triangulations report invalid_subdomain_id as their locally owned
+  // subdomain, so the first condition rules out that case as all cells to a
+  // serial triangulation are locally owned and none is artificial.
   return (this->tria->locally_owned_subdomain() !=
             numbers::invalid_subdomain_id &&
           this->subdomain_id() == numbers::artificial_subdomain_id);

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.