Reference documentation for deal.II version 9.0.0
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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/base/exceptions.h>
22 
23 #include <limits>
24 
25 DEAL_II_NAMESPACE_OPEN
26 
27 // forward declarations
28 template <int dim, int spacedim> class Triangulation;
29 template <typename Number> class Vector;
30 
49 namespace GridRefinement
50 {
82  template <int dim>
83  std::pair<double, double>
84  adjust_refine_and_coarsen_number_fraction (const unsigned int current_n_cells,
85  const unsigned int max_n_cells,
86  const double top_fraction_of_cells,
87  const double bottom_fraction_of_cells);
88 
153  template <int dim, typename Number, int spacedim>
154  void
156  (Triangulation<dim,spacedim> &triangulation,
157  const Vector<Number> &criteria,
158  const double top_fraction_of_cells,
159  const double bottom_fraction_of_cells,
160  const unsigned int max_n_cells = std::numeric_limits<unsigned int>::max());
161 
218  template <int dim, typename Number, int spacedim>
219  void
222  const Vector<Number> &criteria,
223  const double top_fraction,
224  const double bottom_fraction,
225  const unsigned int max_n_cells = std::numeric_limits<unsigned int>::max());
226 
227 
228 
302  template <int dim, typename Number, int spacedim>
303  void
305  const Vector<Number> &criteria,
306  const unsigned int order=2);
307 
322  template <int dim, typename Number, int spacedim>
324  const Vector<Number> &criteria,
325  const double threshold,
326  const unsigned int max_to_mark = numbers::invalid_unsigned_int);
327 
342  template <int dim, typename Number, int spacedim>
344  const Vector<Number> &criteria,
345  const double threshold);
346 
352 
358 }
359 
360 
361 
362 DEAL_II_NAMESPACE_CLOSE
363 
364 #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:323
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)