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_postprocessor.cc
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2007 - 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
17
19
20
21
22// -------------------------- DataPostprocessor ---------------------------
23
24template <int dim>
25void
28 std::vector<Vector<double>> &) const
29{
31}
32
33
34
35template <int dim>
36void
39 std::vector<Vector<double>> &) const
40{
42}
43
44
45
46template <int dim>
47std::vector<DataComponentInterpretation::DataComponentInterpretation>
49{
50 // default implementation assumes that all
51 // components are independent scalars
52 return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
54}
55
56
57// -------------------------- DataPostprocessorScalar -------------------------
58
59template <int dim>
61 const std::string &name,
62 const UpdateFlags update_flags)
63 : name(name)
64 , update_flags(update_flags)
65{}
66
67
68
69template <int dim>
70std::vector<std::string>
72{
73 return std::vector<std::string>(1, name);
74}
75
76
77
78template <int dim>
79std::vector<DataComponentInterpretation::DataComponentInterpretation>
81{
82 return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
84}
85
86
87template <int dim>
90{
91 return update_flags;
92}
93
94
95
96// -------------------------- DataPostprocessorVector -------------------------
97
98template <int dim>
100 const std::string &name,
101 const UpdateFlags update_flags)
102 : name(name)
103 , update_flags(update_flags)
104{}
105
106
107
108template <int dim>
109std::vector<std::string>
111{
112 return std::vector<std::string>(dim, name);
113}
114
115
116
117template <int dim>
118std::vector<DataComponentInterpretation::DataComponentInterpretation>
120{
121 return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
123}
124
125
126template <int dim>
129{
130 return update_flags;
131}
132
133
134
135// -------------------------- DataPostprocessorTensor -------------------------
136
137template <int dim>
139 const std::string &name,
140 const UpdateFlags update_flags)
141 : name(name)
142 , update_flags(update_flags)
143{}
144
145
146
147template <int dim>
148std::vector<std::string>
150{
151 return std::vector<std::string>(dim * dim, name);
152}
153
154
155
156template <int dim>
157std::vector<DataComponentInterpretation::DataComponentInterpretation>
159{
160 return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
162}
163
164
165template <int dim>
168{
169 return update_flags;
170}
171
172
173
174// explicit instantiation
175#include "data_postprocessor.inst"
176
177
DataPostprocessorScalar(const std::string &name, const UpdateFlags update_flags)
virtual std::vector< std::string > get_names() const override
virtual UpdateFlags get_needed_update_flags() const override
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const override
DataPostprocessorTensor(const std::string &name, const UpdateFlags update_flags)
virtual std::vector< std::string > get_names() const override
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const override
virtual UpdateFlags get_needed_update_flags() const override
virtual std::vector< std::string > get_names() const override
virtual UpdateFlags get_needed_update_flags() const override
DataPostprocessorVector(const std::string &name, const UpdateFlags update_flags)
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const override
virtual void evaluate_vector_field(const DataPostprocessorInputs::Vector< dim > &input_data, std::vector< Vector< double > > &computed_quantities) const
virtual void evaluate_scalar_field(const DataPostprocessorInputs::Scalar< dim > &input_data, std::vector< Vector< double > > &computed_quantities) const
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const
Definition: vector.h:110
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
UpdateFlags
static ::ExceptionBase & ExcPureFunctionCalled()
#define AssertThrow(cond, exc)
Definition: exceptions.h:1575