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\}}\)
data_out.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1999 - 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_data_out_h
17 #define dealii_data_out_h
18 
19 
20 
21 #include <deal.II/base/config.h>
22 
24 
26 
27 #include <memory>
28 
30 
31 namespace internal
32 {
33  namespace DataOutImplementation
34  {
40  template <int dim, int spacedim>
41  struct ParallelData : public ParallelDataBase<dim, spacedim>
42  {
44  const unsigned int n_datasets,
45  const unsigned int n_subdivisions,
46  const std::vector<unsigned int> &n_postprocessor_outputs,
47  const Mapping<dim, spacedim> & mapping,
48  const std::vector<
49  std::shared_ptr<::hp::FECollection<dim, spacedim>>>
52  const std::vector<std::vector<unsigned int>> &cell_to_patch_index_map);
53 
54  std::vector<Point<spacedim>> patch_evaluation_points;
55 
56  const std::vector<std::vector<unsigned int>> *cell_to_patch_index_map;
57  };
58  } // namespace DataOutImplementation
59 } // namespace internal
60 
61 
62 
147 template <int dim, typename DoFHandlerType = DoFHandler<dim>>
148 class DataOut : public DataOut_DoFData<DoFHandlerType,
149  DoFHandlerType::dimension,
150  DoFHandlerType::space_dimension>
151 {
152 public:
153  static_assert(dim == DoFHandlerType::dimension,
154  "The dimension given explicitly as a template argument to "
155  "this class must match the dimension of the DoFHandler "
156  "template argument");
157  static constexpr unsigned int spacedim = DoFHandlerType::space_dimension;
158 
163  using cell_iterator =
164  typename DataOut_DoFData<DoFHandlerType,
165  DoFHandlerType::dimension,
166  DoFHandlerType::space_dimension>::cell_iterator;
167 
172  using FirstCellFunctionType =
173  typename std::function<cell_iterator(const Triangulation<dim, spacedim> &)>;
174 
179  using NextCellFunctionType =
180  typename std::function<cell_iterator(const Triangulation<dim, spacedim> &,
181  const cell_iterator &)>;
182 
197  {
207 
216 
223  curved_inner_cells
224  };
225 
229  DataOut();
230 
289  virtual void
290  build_patches(const unsigned int n_subdivisions = 0);
291 
323  virtual void
324  build_patches(const Mapping<DoFHandlerType::dimension,
325  DoFHandlerType::space_dimension> &mapping,
326  const unsigned int n_subdivisions = 0,
327  const CurvedCellRegion curved_region = curved_boundary);
328 
373  void
374  set_cell_selection(
375  const std::function<cell_iterator(const Triangulation<dim, spacedim> &)>
376  & first_cell,
377  const std::function<cell_iterator(const Triangulation<dim, spacedim> &,
378  const cell_iterator &)> &next_cell);
379 
416  void
417  set_cell_selection(const FilteredIterator<cell_iterator> &filtered_iterator);
418 
423  const std::pair<FirstCellFunctionType, NextCellFunctionType>
424  get_cell_selection() const;
425 
434  virtual cell_iterator
435  first_cell();
436 
452  virtual cell_iterator
453  next_cell(const cell_iterator &cell);
454 
455 private:
461  std::function<cell_iterator(const Triangulation<dim, spacedim> &)>
462  first_cell_function;
463 
469  std::function<cell_iterator(const Triangulation<dim, spacedim> &,
470  const cell_iterator &)>
471  next_cell_function;
472 
481  virtual cell_iterator
482  first_locally_owned_cell();
483 
492  virtual cell_iterator
493  next_locally_owned_cell(const cell_iterator &cell);
494 
504  void
505  build_one_patch(const std::pair<cell_iterator, unsigned int> *cell_and_index,
507  DoFHandlerType::dimension,
508  DoFHandlerType::space_dimension> &scratch_data,
509  const unsigned int n_subdivisions,
510  const CurvedCellRegion curved_cell_region);
511 };
512 
513 
514 
516 
517 #endif
typename std::function< cell_iterator(const Triangulation< dim, spacedim > &, const cell_iterator &)> NextCellFunctionType
Definition: data_out.h:181
std::vector< Point< spacedim > > patch_evaluation_points
Definition: data_out.h:54
const std::vector< std::shared_ptr<::hp::FECollection< dim, spacedim > > > finite_elements
const std::vector< std::vector< unsigned int > > * cell_to_patch_index_map
Definition: data_out.h:56
typename DataOut_DoFData< DoFHandler< dim >, DoFHandler< dim > ::dimension, DoFHandler< dim > ::space_dimension >::cell_iterator cell_iterator
Definition: data_out.h:166
typename std::function< cell_iterator(const Triangulation< dim, spacedim > &)> FirstCellFunctionType
Definition: data_out.h:173
UpdateFlags
Abstract base class for mapping classes.
Definition: mapping.h:302
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
ParallelData(const unsigned int n_datasets, const unsigned int n_subdivisions, const std::vector< unsigned int > &n_postprocessor_outputs, const Mapping< dim, spacedim > &mapping, const std::vector< std::shared_ptr<::hp::FECollection< dim, spacedim >>> &finite_elements, const UpdateFlags update_flags, const std::vector< std::vector< unsigned int >> &cell_to_patch_index_map)
Definition: data_out.cc:44
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
#define DEAL_II_DEPRECATED
Definition: config.h:98