25template <
int dim,
int spacedim>
28template <
int dim,
int spacedim>
32template <
int dim,
int spacedim>
35 : coarse_grid(&coarse_grid, typeid(*this).name())
40template <
int dim,
int spacedim>
47 , coarse_grid(old_tria.coarse_grid)
48 , refine_flags(old_tria.refine_flags)
49 , coarsen_flags(old_tria.coarsen_flags)
56template <
int dim,
int spacedim>
61 refine_flags.emplace_back();
62 coarsen_flags.emplace_back();
63 this->save_refine_flags(refine_flags.back());
64 this->save_coarsen_flags(coarsen_flags.back());
75template <
int dim,
int spacedim>
81 for (
unsigned int i = 0; i < refine_flags.size() + 1; ++i)
87template <
int dim,
int spacedim>
101 Assert(step < refine_flags.size() + 1,
104 this->load_refine_flags(refine_flags[step - 1]);
105 this->load_coarsen_flags(coarsen_flags[step - 1]);
113template <
int dim,
int spacedim>
117 return refine_flags.size();
122template <
int dim,
int spacedim>
128 coarse_grid = &old_grid;
129 refine_flags.
clear();
130 coarsen_flags.clear();
135template <
int dim,
int spacedim>
147template <
int dim,
int spacedim>
152 (void)construction_data;
159template <
int dim,
int spacedim>
163 const unsigned int n_flag_levels = refine_flags.size();
169 for (
unsigned int i = 0; i < n_flag_levels; ++i)
188template <
int dim,
int spacedim>
192 Assert(refine_flags.empty() && coarsen_flags.empty(), ExcFlagsNotCleared());
195 unsigned int magic_number;
200 unsigned int n_flag_levels;
202 for (
unsigned int i = 0; i < n_flag_levels; ++i)
204 refine_flags.emplace_back();
205 coarsen_flags.emplace_back();
211 coarsen_flags.back(),
225template <
int dim,
int spacedim>
229 refine_flags.clear();
230 coarsen_flags.clear();
235template <
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 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 & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcTriaNotEmpty()
#define AssertThrow(cond, exc)
#define DEAL_II_ASSERT_UNREACHABLE()
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_v< T >, std::size_t > memory_consumption(const T &t)