Reference documentation for deal.II version 9.3.3
|
#include <deal.II/distributed/tria.h>
Public Member Functions | |
TemporarilyMatchRefineFlags (::Triangulation< dim, spacedim > &tria) | |
~TemporarilyMatchRefineFlags () | |
Private Attributes | |
const SmartPointer< ::parallel::distributed::Triangulation< dim, spacedim > > | distributed_tria |
std::vector< bool > | saved_refine_flags |
std::vector< bool > | saved_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 int > | counter |
std::map< std::string, unsigned int > | counter_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 ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
void | check_no_subscribers () const noexcept |
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 traingulation will actually be refined.
The use of this class is demonstrated in step-75.
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.
parallel::distributed::TemporarilyMatchRefineFlags< dim, spacedim >::~TemporarilyMatchRefineFlags |
Destructor.
Returns the refine and coarsen flags of all active cells on the parallel::distributed::Triangulation into their previous state.
|
private |
The modified parallel::distributed::Triangulation.
|
private |
A vector that temporarily stores the refine flags before they have been modified on the parallel::distributed::Triangulation.
|
private |
A vector that temporarily stores the coarsen flags before they have been modified on the parallel::distributed::Triangulation.