deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
grid_refinement.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2010 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_distributed_grid_refinement_h
14#define dealii_distributed_grid_refinement_h
15
16
17#include <deal.II/base/config.h>
18
20
22
24
25#include <limits>
26#include <vector>
27
29
30namespace internal
31{
32 namespace parallel
33 {
34 namespace distributed
35 {
37 {
43 template <typename number>
44 std::pair<number, number>
46 const ::Vector<number> &criteria,
47 const MPI_Comm mpi_communicator);
48
49 namespace RefineAndCoarsenFixedNumber
50 {
55 template <typename number>
56 number
57 compute_threshold(const ::Vector<number> &criteria,
58 const std::pair<double, double> &global_min_and_max,
59 const types::global_cell_index n_target_cells,
60 const MPI_Comm mpi_communicator);
61 } // namespace RefineAndCoarsenFixedNumber
62
63 namespace RefineAndCoarsenFixedFraction
64 {
73 template <typename number>
74 number
75 compute_threshold(const ::Vector<number> &criteria,
76 const std::pair<double, double> &global_min_and_max,
77 const double target_error,
78 const MPI_Comm mpi_communicator);
79 } // namespace RefineAndCoarsenFixedFraction
80 } // namespace GridRefinement
81 } // namespace distributed
82 } // namespace parallel
83} // namespace internal
84
85
86
87namespace parallel
88{
89 namespace distributed
90 {
107 {
153 template <int dim, typename Number, int spacedim>
154 void
157 const ::Vector<Number> &criteria,
158 const double top_fraction_of_cells,
159 const double bottom_fraction_of_cells,
160 const types::global_cell_index max_n_cells =
161 std::numeric_limits<types::global_cell_index>::max());
162
207 template <int dim, typename Number, int spacedim>
208 void
211 const ::Vector<Number> &criteria,
212 const double top_fraction_of_error,
213 const double bottom_fraction_of_error,
215 } // namespace GridRefinement
216 } // namespace distributed
217} // namespace parallel
218
219
221
222#endif // dealii_distributed_grid_refinement_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
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::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())