Reference documentation for deal.II version Git c92c73f660 2021-06-12 09:30:03 +0200
\(\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 ::hp::MappingCollection<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 
146 template <int dim, int spacedim = dim>
147 class DataOut : public DataOut_DoFData<dim, dim, spacedim, spacedim>
148 {
149 public:
154  using cell_iterator =
156 
161  using FirstCellFunctionType =
162  typename std::function<cell_iterator(const Triangulation<dim, spacedim> &)>;
163 
168  using NextCellFunctionType =
169  typename std::function<cell_iterator(const Triangulation<dim, spacedim> &,
170  const cell_iterator &)>;
171 
186  {
196 
205 
212  curved_inner_cells
213  };
214 
218  DataOut();
219 
278  virtual void
279  build_patches(const unsigned int n_subdivisions = 0);
280 
309  virtual void
310  build_patches(const Mapping<dim, spacedim> &mapping,
311  const unsigned int n_subdivisions = 0,
312  const CurvedCellRegion curved_region = curved_boundary);
313 
317  virtual void
318  build_patches(const hp::MappingCollection<dim, spacedim> &mapping,
319  const unsigned int n_subdivisions = 0,
320  const CurvedCellRegion curved_region = curved_boundary);
321 
366  void
367  set_cell_selection(
368  const std::function<cell_iterator(const Triangulation<dim, spacedim> &)>
369  & first_cell,
370  const std::function<cell_iterator(const Triangulation<dim, spacedim> &,
371  const cell_iterator &)> &next_cell);
372 
409  void
410  set_cell_selection(const FilteredIterator<cell_iterator> &filtered_iterator);
411 
416  const std::pair<FirstCellFunctionType, NextCellFunctionType>
417  get_cell_selection() const;
418 
419 private:
425  std::function<cell_iterator(const Triangulation<dim, spacedim> &)>
426  first_cell_function;
427 
433  std::function<cell_iterator(const Triangulation<dim, spacedim> &,
434  const cell_iterator &)>
435  next_cell_function;
436 
446  void
447  build_one_patch(
448  const std::pair<cell_iterator, unsigned int> *cell_and_index,
450  const unsigned int n_subdivisions,
451  const CurvedCellRegion curved_cell_region);
452 };
453 
454 namespace Legacy
455 {
460  template <int dim, typename DoFHandlerType = DoFHandler<dim>>
463 } // namespace Legacy
464 
465 
467 
468 #endif
std::vector< Point< spacedim > > patch_evaluation_points
Definition: data_out.h:54
ParallelData(const unsigned int n_datasets, const unsigned int n_subdivisions, const std::vector< unsigned int > &n_postprocessor_outputs, const ::hp::MappingCollection< 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
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< dim, dim, spacedim, spacedim >::cell_iterator cell_iterator
Definition: data_out.h:155
::DataOut< dim, DoFHandlerType::space_dimension > DataOut
Definition: data_out.h:462
UpdateFlags
Abstract base class for mapping classes.
Definition: mapping.h:303
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:399
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:398
typename std::function< cell_iterator(const Triangulation< dim, dim > &, const cell_iterator &)> NextCellFunctionType
Definition: data_out.h:170
#define DEAL_II_DEPRECATED
Definition: config.h:158
typename std::function< cell_iterator(const Triangulation< dim, dim > &)> FirstCellFunctionType
Definition: data_out.h:162