From: Timo Heister Date: Mon, 6 May 2019 22:08:05 +0000 (-0400) Subject: provide access to p4est_t X-Git-Tag: v9.1.0-rc1~90^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b26f81bd8e8d5b0af20c64e573978ea6a2ff2b7c;p=dealii.git provide access to p4est_t I need access for the p4est object inside a distributed Triangulation. Provide an accessor function for this. --- diff --git a/include/deal.II/distributed/tria.h b/include/deal.II/distributed/tria.h index f373f7145f..eac6147b04 100644 --- a/include/deal.II/distributed/tria.h +++ b/include/deal.II/distributed/tria.h @@ -815,6 +815,16 @@ namespace parallel const std::vector & get_coarse_cell_to_p4est_tree_permutation() const; + /** + * This returns a pointer to the internally stored p4est object (of type + * p4est_t or p8est_t depending on @p dim). + * + * @warning: If you modify the p4est object, internal data structures + * can become inconsistent. + */ + typename dealii::internal::p4est::types::forest * + get_p4est() const; + /** * In addition to the action in the base class Triangulation, this * function joins faces in the p4est forest for periodic boundary diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index f814270c31..ddbfa0fa3f 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -2887,6 +2887,17 @@ namespace parallel + template + typename dealii::internal::p4est::types::forest * + Triangulation::get_p4est() const + { + Assert(parallel_forest != nullptr, + ExcMessage("The forest has not been allocated yet.")); + return parallel_forest; + } + + + template void Triangulation::update_number_cache()