24#ifdef DEAL_II_WITH_P4EST
45 template <
int dim,
int spacedim>
54 return tria.n_active_cells();
57 template <
typename number>
68 template <
typename number>
84 template <
typename number>
114 template <
int dim,
int spacedim,
typename Number>
121 n_locally_owned_active_cells(
tria),
125 for (
const auto &cell :
129 criteria(cell->active_cell_index());
168 const double difference =
182 template <
int dim,
int spacedim,
typename Number>
194 for (
const auto &cell :
tria.active_cell_iterators())
197 cell->clear_refine_flag();
198 cell->clear_coarsen_flag();
211 template <
int dim,
int spacedim,
typename Number>
269 namespace distributed
273 template <
typename number>
274 std::pair<number, number>
287 double result[2] = {0, 0};
303 namespace RefineAndCoarsenFixedNumber
305 template <
typename number>
344 return c > test_threshold;
386 namespace RefineAndCoarsenFixedFraction
388 template <
typename number>
498 namespace distributed
502 template <
int dim,
typename Number,
int spacedim>
525 dim>(
tria.n_global_active_cells(),
533 n_locally_owned_active_cells(
tria));
552 tria.n_global_active_cells()),
564 tria.n_global_active_cells())),
575 template <
int dim,
typename Number,
int spacedim>
620 [](Number c) { return c * c; });
641# include "grid_refinement.inst"
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertThrowMPI(error_code)
static ::ExceptionBase & ExcNegativeCriteria()
static ::ExceptionBase & ExcInvalidParameterValue()
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
void refine(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold, const unsigned int max_to_mark=numbers::invalid_unsigned_int)
void coarsen(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold)
std::pair< double, double > adjust_refine_and_coarsen_number_fraction(const types::global_cell_index current_n_cells, const types::global_cell_index max_n_cells, const double top_fraction_of_cells, const double bottom_fraction_of_cells)
T sum(const T &t, const MPI_Comm mpi_communicator)
unsigned int this_mpi_process(const MPI_Comm mpi_communicator)
number compute_threshold(const ::Vector< number > &criteria, const std::pair< double, double > &global_min_and_max, const double target_error, const MPI_Comm mpi_communicator)
number compute_threshold(const ::Vector< number > &criteria, const std::pair< double, double > &global_min_and_max, const types::global_cell_index n_target_cells, const MPI_Comm mpi_communicator)
std::pair< number, number > compute_global_min_and_max_at_root(const ::Vector< number > &criteria, const MPI_Comm mpi_communicator)
void refine_and_coarsen_fixed_fraction(::Triangulation< dim, spacedim > &tria, const ::Vector< Number > &criteria, const double top_fraction_of_error, const double bottom_fraction_of_error, const VectorTools::NormType norm_type=VectorTools::NormType::L1_norm)
void refine_and_coarsen_fixed_number(::Triangulation< dim, spacedim > &tria, const ::Vector< Number > &criteria, const double top_fraction_of_cells, const double bottom_fraction_of_cells, const types::global_cell_index max_n_cells=std::numeric_limits< types::global_cell_index >::max())
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
unsigned int subdomain_id
const ::Triangulation< dim, spacedim > & tria