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\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
parallel::distributed::TemporarilyMatchRefineFlags< dim, spacedim > Class Template Reference

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

Inheritance diagram for parallel::distributed::TemporarilyMatchRefineFlags< dim, spacedim >:
[legend]

Public Member Functions

 TemporarilyMatchRefineFlags (::Triangulation< dim, spacedim > &tria)
 
 ~TemporarilyMatchRefineFlags ()
 

Private Attributes

const SmartPointer< ::parallel::distributed::Triangulation< dim, spacedim > > distributed_tria
 
std::vector< boolsaved_refine_flags
 
std::vector< boolsaved_coarsen_flags
 

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 parallel::distributed::TemporarilyMatchRefineFlags< dim, spacedim >

This class temporarily modifies the refine and coarsen flags of all active cells to match the p4est oracle.

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

The TemporarilyMatchRefineFlags class should only be used in combination with the Triangulation::Signals::post_p4est_refinement signal. At this stage, the p4est oracle already has been refined, but the triangulation is still unchanged. After the modification, all refine and coarsen flags describe how the triangulation will actually be refined.

The use of this class is demonstrated in step-75.

Definition at line 1108 of file tria.h.

Constructor & Destructor Documentation

◆ TemporarilyMatchRefineFlags()

template<int dim, int spacedim>
parallel::distributed::TemporarilyMatchRefineFlags< dim, spacedim >::TemporarilyMatchRefineFlags ( ::Triangulation< dim, spacedim > &  tria)

Constructor.

Stores the refine and coarsen flags of all active cells if the provided Triangulation is of type parallel::distributed::Triangulation.

Adjusts them to be consistent with the p4est oracle.

Definition at line 4213 of file tria.cc.

◆ ~TemporarilyMatchRefineFlags()

Destructor.

Returns the refine and coarsen flags of all active cells on the parallel::distributed::Triangulation into their previous state.

Definition at line 4272 of file tria.cc.

Member Data Documentation

◆ distributed_tria

template<int dim, int spacedim = dim>
const SmartPointer< ::parallel::distributed::Triangulation<dim, spacedim> > parallel::distributed::TemporarilyMatchRefineFlags< dim, spacedim >::distributed_tria
private

The modified parallel::distributed::Triangulation.

Definition at line 1136 of file tria.h.

◆ saved_refine_flags

template<int dim, int spacedim = dim>
std::vector<bool> parallel::distributed::TemporarilyMatchRefineFlags< dim, spacedim >::saved_refine_flags
private

A vector that temporarily stores the refine flags before they have been modified on the parallel::distributed::Triangulation.

Definition at line 1142 of file tria.h.

◆ saved_coarsen_flags

template<int dim, int spacedim = dim>
std::vector<bool> parallel::distributed::TemporarilyMatchRefineFlags< dim, spacedim >::saved_coarsen_flags
private

A vector that temporarily stores the coarsen flags before they have been modified on the parallel::distributed::Triangulation.

Definition at line 1148 of file tria.h.


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