Reference documentation for deal.II version 9.1.0-pre
grid_refinement.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2018 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_grid_refinement_h
17 #define dealii_grid_refinement_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #include <deal.II/base/exceptions.h>
23 
24 #include <limits>
25 
26 DEAL_II_NAMESPACE_OPEN
27 
28 // forward declarations
29 template <int dim, int spacedim>
30 class Triangulation;
31 template <typename Number>
32 class Vector;
33 
52 namespace GridRefinement
53 {
85  template <int dim>
86  std::pair<double, double>
88  const unsigned int current_n_cells,
89  const unsigned int max_n_cells,
90  const double top_fraction_of_cells,
91  const double bottom_fraction_of_cells);
92 
157  template <int dim, typename Number, int spacedim>
158  void
160  Triangulation<dim, spacedim> &triangulation,
161  const Vector<Number> & criteria,
162  const double top_fraction_of_cells,
163  const double bottom_fraction_of_cells,
164  const unsigned int max_n_cells = std::numeric_limits<unsigned int>::max());
165 
222  template <int dim, typename Number, int spacedim>
223  void
226  const Vector<Number> & criteria,
227  const double top_fraction,
228  const double bottom_fraction,
229  const unsigned int max_n_cells = std::numeric_limits<unsigned int>::max());
230 
231 
232 
306  template <int dim, typename Number, int spacedim>
307  void
309  const Vector<Number> & criteria,
310  const unsigned int order = 2);
311 
326  template <int dim, typename Number, int spacedim>
327  void
329  const Vector<Number> & criteria,
330  const double threshold,
331  const unsigned int max_to_mark = numbers::invalid_unsigned_int);
332 
347  template <int dim, typename Number, int spacedim>
348  void
350  const Vector<Number> & criteria,
351  const double threshold);
352 
358 
364 } // namespace GridRefinement
365 
366 
367 
368 DEAL_II_NAMESPACE_CLOSE
369 
370 #endif // dealii_grid_refinement_h
static const unsigned int invalid_unsigned_int
Definition: types.h:173
void refine_and_coarsen_optimize(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const unsigned int order=2)
static::ExceptionBase & ExcNegativeCriteria()
#define DeclException0(Exception0)
Definition: exceptions.h:385
void coarsen(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold)
void refine_and_coarsen_fixed_fraction(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double top_fraction, const double bottom_fraction, const unsigned int max_n_cells=std::numeric_limits< unsigned int >::max())
std::pair< double, double > adjust_refine_and_coarsen_number_fraction(const unsigned int current_n_cells, const unsigned int max_n_cells, const double top_fraction_of_cells, const double bottom_fraction_of_cells)
static::ExceptionBase & ExcInvalidParameterValue()
void refine_and_coarsen_fixed_number(Triangulation< dim, spacedim > &triangulation, const Vector< Number > &criteria, const double top_fraction_of_cells, const double bottom_fraction_of_cells, const unsigned int max_n_cells=std::numeric_limits< unsigned int >::max())
void refine(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold, const unsigned int max_to_mark=numbers::invalid_unsigned_int)