Reference documentation for deal.II version 9.4.1
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
No Matches
Public Member Functions | Private Attributes | List of all members
internal::parallel::shared::TemporarilyRestoreSubdomainIds< dim, spacedim > Class Template Reference

#include <deal.II/distributed/shared_tria.h>

Inheritance diagram for internal::parallel::shared::TemporarilyRestoreSubdomainIds< dim, spacedim >:

Public Member Functions

 TemporarilyRestoreSubdomainIds (const Triangulation< dim, spacedim > &tria)
 ~TemporarilyRestoreSubdomainIds ()

Private Attributes

const SmartPointer< const ::parallel::shared::Triangulation< dim, spacedim > > shared_tria
std::vector< unsigned intsaved_subdomain_ids

Subscriptor functionality

Classes derived from Subscriptor provide a facility to subscribe to this object. This is mostly used by the SmartPointer class.

std::atomic< unsigned intcounter
std::map< std::string, unsigned intcounter_map
std::vector< std::atomic< bool > * > validity_pointers
const std::type_info * object_info
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
unsigned int n_subscriptions () const
template<typename StreamType >
void list_subscribers (StreamType &stream) const
void list_subscribers () const
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
using map_value_type = decltype(counter_map)::value_type
using map_iterator = decltype(counter_map)::iterator
static std::mutex mutex
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
void check_no_subscribers () const noexcept

Detailed Description

template<int dim, int spacedim = dim>
class internal::parallel::shared::TemporarilyRestoreSubdomainIds< dim, spacedim >

This class temporarily modifies the subdomain ID of all active cells to their respective "true" owner.

The modification only happens on parallel::shared::Triangulation objects with artificial cells, and persists for the lifetime of an instantiation of this class.

The TemporarilyRestoreSubdomainIds class should only be used for temporary read-only purposes. For example, whenever your implementation requires to treat artificial cells temporarily as locally relevant to access their dof indices.

This class has effect only if artificial cells are allowed. Without artificial cells, the current subdomain IDs already correspond to the true subdomain IDs. See the glossary for more information about artificial cells.

Definition at line 508 of file shared_tria.h.

Constructor & Destructor Documentation

◆ TemporarilyRestoreSubdomainIds()

template<int dim, int spacedim>
internal::parallel::shared::TemporarilyRestoreSubdomainIds< dim, spacedim >::TemporarilyRestoreSubdomainIds ( const Triangulation< dim, spacedim > &  tria)


Stores the subdomain ID of all active cells if the provided Triangulation is of type parallel::shared::Triangulation.

Replaces them by their true subdomain ID equivalent.

Definition at line 474 of file

◆ ~TemporarilyRestoreSubdomainIds()


Returns the subdomain ID of all active cells on the parallel::shared::Triangulation into their previous state.

Definition at line 501 of file

Member Data Documentation

◆ shared_tria

template<int dim, int spacedim = dim>
const SmartPointer< const ::parallel::shared::Triangulation<dim, spacedim> > internal::parallel::shared::TemporarilyRestoreSubdomainIds< dim, spacedim >::shared_tria

The modified parallel::shared::Triangulation.

Definition at line 536 of file shared_tria.h.

◆ saved_subdomain_ids

template<int dim, int spacedim = dim>
std::vector<unsigned int> internal::parallel::shared::TemporarilyRestoreSubdomainIds< dim, spacedim >::saved_subdomain_ids

A vector that temporarily stores the subdomain IDs on all active cells before they have been modified on the parallel::shared::Triangulation.

Definition at line 543 of file shared_tria.h.

The documentation for this class was generated from the following files: