26template <
int dim,
int spacedim>
29template <
int dim,
int spacedim>
33template <
int dim,
int spacedim>
36 : coarse_grid(&coarse_grid, typeid(*this).name())
41template <
int dim,
int spacedim>
48 , coarse_grid(old_tria.coarse_grid)
49 , refine_flags(old_tria.refine_flags)
50 , coarsen_flags(old_tria.coarsen_flags)
57template <
int dim,
int spacedim>
62 refine_flags.emplace_back();
63 coarsen_flags.emplace_back();
64 this->save_refine_flags(refine_flags.back());
65 this->save_coarsen_flags(coarsen_flags.back());
76template <
int dim,
int spacedim>
82 for (
unsigned int i = 0; i < refine_flags.size() + 1; ++i)
88template <
int dim,
int spacedim>
102 Assert(step < refine_flags.size() + 1,
105 this->load_refine_flags(refine_flags[step - 1]);
106 this->load_coarsen_flags(coarsen_flags[step - 1]);
114template <
int dim,
int spacedim>
118 return refine_flags.size();
123template <
int dim,
int spacedim>
129 coarse_grid = &old_grid;
130 refine_flags.
clear();
131 coarsen_flags.clear();
136template <
int dim,
int spacedim>
148template <
int dim,
int spacedim>
153 (void)construction_data;
160template <
int dim,
int spacedim>
172template <
int dim,
int spacedim>
176 const unsigned int n_flag_levels = refine_flags.size();
182 for (
unsigned int i = 0; i < n_flag_levels; ++i)
201template <
int dim,
int spacedim>
205 Assert(refine_flags.size() == 0 && coarsen_flags.size() == 0,
206 ExcFlagsNotCleared());
209 unsigned int magic_number;
214 unsigned int n_flag_levels;
216 for (
unsigned int i = 0; i < n_flag_levels; ++i)
218 refine_flags.emplace_back();
219 coarsen_flags.emplace_back();
225 coarsen_flags.back(),
239template <
int dim,
int spacedim>
243 refine_flags.clear();
244 coarsen_flags.clear();
249template <
int dim,
int spacedim>
virtual void read_flags(std::istream &in)
virtual void write_flags(std::ostream &out) const
virtual std::size_t memory_consumption() const override
virtual void create_triangulation(const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata) override
virtual void create_triangulation_compatibility(const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata) override
virtual void copy_triangulation(const Triangulation< dim, spacedim > &tria) override
unsigned int n_refinement_steps() const
virtual void execute_coarsening_and_refinement() override
PersistentTriangulation(const Triangulation< dim, spacedim > &coarse_grid)
virtual void clear_flags()
virtual void copy_triangulation(const Triangulation< dim, spacedim > &other_tria)
unsigned int n_levels() const
virtual void execute_coarsening_and_refinement()
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcIO()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcTriaNotEmpty()
#define AssertThrow(cond, exc)
const unsigned int mn_tria_refine_flags_end
const unsigned int mn_tria_coarsen_flags_end
const unsigned int mn_tria_refine_flags_begin
const unsigned int mn_persistent_tria_flags_begin
const unsigned int mn_persistent_tria_flags_end
const unsigned int mn_tria_coarsen_flags_begin
std::enable_if_t< std::is_fundamental< T >::value, std::size_t > memory_consumption(const T &t)