Reference documentation for deal.II version 9.2.0
\(\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\}}\)
error_predictor.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 - 2020 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_distributed_error_predictor_h
17 #define dealii_distributed_error_predictor_h
18 
19 #include <deal.II/base/config.h>
20 
22 
23 #include <boost/range/iterator_range.hpp>
24 
25 #include <vector>
26 
27 
29 
30 
31 // forward declarations
32 #ifndef DOXYGEN
33 template <typename Number>
34 class Vector;
35 
36 namespace parallel
37 {
38  namespace distributed
39  {
40  template <int dim, int spacedim>
41  class Triangulation;
42  }
43 } // namespace parallel
44 
45 namespace hp
46 {
47  template <int dim, int spacedim>
48  class DoFHandler;
49 }
50 #endif
51 
52 
53 namespace parallel
54 {
55  namespace distributed
56  {
126  template <int dim, int spacedim = dim>
128  {
129  public:
139 
151  void
153  const std::vector<const Vector<float> *> &all_in,
154  const double gamma_p = std::sqrt(0.4),
155  const double gamma_h = 2.,
156  const double gamma_n = 1.);
157 
162  void
164  const Vector<float> &in,
165  const double gamma_p = std::sqrt(0.4),
166  const double gamma_h = 2.,
167  const double gamma_n = 1.);
168 
176  void
177  unpack(std::vector<Vector<float> *> &all_out);
178 
188  void
189  unpack(Vector<float> &out);
190 
191  private:
198 
203  std::vector<const Vector<float> *> error_indicators;
204 
209  unsigned int handle;
210 
215 
221  std::vector<char>
223  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
224  const typename Triangulation<dim, spacedim>::CellStatus status);
225 
231  void
233  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
234  const typename Triangulation<dim, spacedim>::CellStatus status,
235  const boost::iterator_range<std::vector<char>::const_iterator>
236  & data_range,
237  std::vector<Vector<float> *> &all_out);
238 
239 
245  void
247  };
248  } // namespace distributed
249 } // namespace parallel
250 
251 
253 
254 #endif
parallel::distributed::ErrorPredictor::register_data_attach
void register_data_attach()
Definition: error_predictor.cc:89
LinearAlgebraDealII::Vector
Vector< double > Vector
Definition: generic_linear_algebra.h:43
LinearAlgebra::distributed::Vector< Number >
Triangulation
Definition: tria.h:1109
parallel::distributed::ErrorPredictor::dof_handler
SmartPointer< const hp::DoFHandler< dim, spacedim >, ErrorPredictor< dim, spacedim > > dof_handler
Definition: error_predictor.h:197
parallel::distributed::ErrorPredictor::pack_callback
std::vector< char > pack_callback(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status)
Definition: error_predictor.cc:166
parallel::distributed::ErrorPredictor
Definition: error_predictor.h:127
parallel::distributed::ErrorPredictor::unpack
void unpack(std::vector< Vector< float > * > &all_out)
Definition: error_predictor.cc:124
hp::DoFHandler
Definition: dof_handler.h:203
DoFHandler
Definition: dof_handler.h:205
Triangulation< dim, dim >::CellStatus
CellStatus
Definition: tria.h:1969
parallel::distributed::ErrorPredictor::gamma_n
double gamma_n
Definition: error_predictor.h:214
parallel::distributed::ErrorPredictor::ErrorPredictor
ErrorPredictor(const hp::DoFHandler< dim, spacedim > &dof)
Definition: error_predictor.cc:53
parallel::distributed::ErrorPredictor::handle
unsigned int handle
Definition: error_predictor.h:209
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
parallel::distributed::ErrorPredictor::error_indicators
std::vector< const Vector< float > * > error_indicators
Definition: error_predictor.h:203
smartpointer.h
SmartPointer
Definition: smartpointer.h:68
hp
Definition: hp.h:117
parallel::distributed::ErrorPredictor::gamma_p
double gamma_p
Definition: error_predictor.h:214
config.h
parallel::distributed::ErrorPredictor::unpack_callback
void unpack_callback(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status, const boost::iterator_range< std::vector< char >::const_iterator > &data_range, std::vector< Vector< float > * > &all_out)
Definition: error_predictor.cc:302
parallel::distributed::ErrorPredictor::prepare_for_coarsening_and_refinement
void prepare_for_coarsening_and_refinement(const std::vector< const Vector< float > * > &all_in, const double gamma_p=std::sqrt(0.4), const double gamma_h=2., const double gamma_n=1.)
Definition: error_predictor.cc:72
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
TriaIterator
Definition: tria_iterator.h:578
parallel
Definition: distributed.h:416
parallel::distributed::ErrorPredictor::gamma_h
double gamma_h
Definition: error_predictor.h:214