Reference documentation for deal.II version 9.3.3
\(\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
31namespace 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
146template <int dim, typename DoFHandlerType = DoFHandler<dim>>
147class DataOut : public DataOut_DoFData<DoFHandlerType,
148 DoFHandlerType::dimension,
149 DoFHandlerType::space_dimension>
150{
151public:
152 static_assert(dim == DoFHandlerType::dimension,
153 "The dimension given explicitly as a template argument to "
154 "this class must match the dimension of the DoFHandler "
155 "template argument");
156 static constexpr unsigned int spacedim = DoFHandlerType::space_dimension;
157
163 typename DataOut_DoFData<DoFHandlerType,
164 DoFHandlerType::dimension,
165 DoFHandlerType::space_dimension>::cell_iterator;
166
172 typename std::function<cell_iterator(const Triangulation<dim, spacedim> &)>;
173
179 typename std::function<cell_iterator(const Triangulation<dim, spacedim> &,
180 const cell_iterator &)>;
181
196 {
206
215
223 };
224
228 DataOut();
229
288 virtual void
289 build_patches(const unsigned int n_subdivisions = 0);
290
319 virtual void
320 build_patches(const Mapping<DoFHandlerType::dimension,
321 DoFHandlerType::space_dimension> &mapping,
322 const unsigned int n_subdivisions = 0,
323 const CurvedCellRegion curved_region = curved_boundary);
324
328 virtual void
330 const hp::MappingCollection<DoFHandlerType::dimension,
331 DoFHandlerType::space_dimension> &mapping,
332 const unsigned int n_subdivisions = 0,
333 const CurvedCellRegion curved_region = curved_boundary);
334
379 void
381 const std::function<cell_iterator(const Triangulation<dim, spacedim> &)>
382 & first_cell,
383 const std::function<cell_iterator(const Triangulation<dim, spacedim> &,
384 const cell_iterator &)> &next_cell);
385
422 void
423 set_cell_selection(const FilteredIterator<cell_iterator> &filtered_iterator);
424
429 const std::pair<FirstCellFunctionType, NextCellFunctionType>
430 get_cell_selection() const;
431
440 virtual cell_iterator
441 first_cell();
442
458 virtual cell_iterator
459 next_cell(const cell_iterator &cell);
460
461private:
467 std::function<cell_iterator(const Triangulation<dim, spacedim> &)>
469
475 std::function<cell_iterator(const Triangulation<dim, spacedim> &,
476 const cell_iterator &)>
478
487 virtual cell_iterator
489
498 virtual cell_iterator
500
510 void
511 build_one_patch(const std::pair<cell_iterator, unsigned int> *cell_and_index,
513 DoFHandlerType::dimension,
514 DoFHandlerType::space_dimension> &scratch_data,
515 const unsigned int n_subdivisions,
516 const CurvedCellRegion curved_cell_region);
517};
518
519namespace Legacy
520{
527 template <int dim, typename DoFHandlerType = DoFHandler<dim>>
529} // namespace Legacy
530
531
533
534#endif
static constexpr unsigned int spacedim
Definition: data_out.h:156
CurvedCellRegion
Definition: data_out.h:196
@ no_curved_cells
Definition: data_out.h:205
@ curved_inner_cells
Definition: data_out.h:222
@ curved_boundary
Definition: data_out.h:214
std::function< cell_iterator(const Triangulation< dim, spacedim > &, const cell_iterator &)> next_cell_function
Definition: data_out.h:477
virtual cell_iterator first_cell()
Definition: data_out.cc:1374
typename DataOut_DoFData< DoFHandlerType, DoFHandlerType::dimension, DoFHandlerType::space_dimension >::cell_iterator cell_iterator
Definition: data_out.h:165
void set_cell_selection(const std::function< cell_iterator(const Triangulation< dim, spacedim > &)> &first_cell, const std::function< cell_iterator(const Triangulation< dim, spacedim > &, const cell_iterator &)> &next_cell)
Definition: data_out.cc:1309
virtual void build_patches(const unsigned int n_subdivisions=0)
Definition: data_out.cc:1085
const std::pair< FirstCellFunctionType, NextCellFunctionType > get_cell_selection() const
Definition: data_out.cc:1365
virtual cell_iterator first_locally_owned_cell()
Definition: data_out.cc:1399
typename std::function< cell_iterator(const Triangulation< dim, spacedim > &, const cell_iterator &)> NextCellFunctionType
Definition: data_out.h:180
DataOut()
Definition: data_out.cc:69
typename std::function< cell_iterator(const Triangulation< dim, spacedim > &)> FirstCellFunctionType
Definition: data_out.h:172
std::function< cell_iterator(const Triangulation< dim, spacedim > &)> first_cell_function
Definition: data_out.h:468
void build_one_patch(const std::pair< cell_iterator, unsigned int > *cell_and_index, internal::DataOutImplementation::ParallelData< DoFHandlerType::dimension, DoFHandlerType::space_dimension > &scratch_data, const unsigned int n_subdivisions, const CurvedCellRegion curved_cell_region)
Definition: data_out.cc:88
virtual cell_iterator next_locally_owned_cell(const cell_iterator &cell)
Definition: data_out.cc:1416
virtual cell_iterator next_cell(const cell_iterator &cell)
Definition: data_out.cc:1383
Abstract base class for mapping classes.
Definition: mapping.h:304
#define DEAL_II_DEPRECATED
Definition: config.h:162
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
UpdateFlags
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
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