From 62ea04aa6747abaa9934230155e39252634d8bca Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 25 Sep 2019 09:33:04 +0200 Subject: [PATCH] Add comment --- include/deal.II/grid/tria_accessor.templates.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index fe9e0e9c0d..de7ca2ff17 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -3567,6 +3567,10 @@ CellAccessor::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::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::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::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); -- 2.39.5