Reference documentation for deal.II version Git fe6b7ef64a 2022-01-26 15:08:32 +0100
\(\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 
23 {
24  template <int spacedim>
26  : face_number(numbers::invalid_unsigned_int)
27  {}
28 
29 
30 
31  template <int spacedim>
32  unsigned int
34  {
35  Assert(
37  ExcMessage(
38  "This function can only be called if set_cell_and_face() has "
39  "previously been called. Typically, this would be by using DataOutFaces "
40  "or a related class."));
41  return face_number;
42  }
43 } // namespace DataPostprocessorInputs
44 
45 // -------------------------- DataPostprocessor ---------------------------
46 
47 template <int dim>
48 void
51  std::vector<Vector<double>> &) const
52 {
54 }
55 
56 
57 
58 template <int dim>
59 void
62  std::vector<Vector<double>> &) const
63 {
65 }
66 
67 
68 
69 template <int dim>
70 std::vector<DataComponentInterpretation::DataComponentInterpretation>
72 {
73  // default implementation assumes that all
74  // components are independent scalars
75  return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
77 }
78 
79 
80 // -------------------- DataPostprocessorScalar -------------------------
81 
82 template <int dim>
84  const std::string &name,
85  const UpdateFlags update_flags)
86  : name(name)
87  , update_flags(update_flags)
88 {}
89 
90 
91 
92 template <int dim>
93 std::vector<std::string>
95 {
96  return std::vector<std::string>(1, name);
97 }
98 
99 
100 
101 template <int dim>
102 std::vector<DataComponentInterpretation::DataComponentInterpretation>
104 {
105  return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
107 }
108 
109 
110 template <int dim>
113 {
114  return update_flags;
115 }
116 
117 
118 
119 // -------------------------- DataPostprocessorVector
120 // -------------------------
121 
122 template <int dim>
124  const std::string &name,
126  : name(name)
127  , update_flags(update_flags)
128 {}
129 
130 
131 
132 template <int dim>
133 std::vector<std::string>
135 {
136  return std::vector<std::string>(dim, name);
137 }
138 
139 
140 
141 template <int dim>
142 std::vector<DataComponentInterpretation::DataComponentInterpretation>
144 {
145  return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
147 }
148 
149 
150 template <int dim>
153 {
154  return update_flags;
155 }
156 
157 
158 
159 // -------------------------- DataPostprocessorTensor
160 // -------------------------
161 
162 template <int dim>
164  const std::string &name,
166  : name(name)
167  , update_flags(update_flags)
168 {}
169 
170 
171 
172 template <int dim>
173 std::vector<std::string>
175 {
176  return std::vector<std::string>(dim * dim, name);
177 }
178 
179 
180 
181 template <int dim>
182 std::vector<DataComponentInterpretation::DataComponentInterpretation>
184 {
185  return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
187 }
188 
189 
190 template <int dim>
193 {
194  return update_flags;
195 }
196 
197 
198 
199 // explicit instantiation
200 #include "data_postprocessor.inst"
201 
202 
static ::ExceptionBase & ExcPureFunctionCalled()
static const unsigned int invalid_unsigned_int
Definition: types.h:196
virtual std::vector< std::string > get_names() const override
DataPostprocessorTensor(const std::string &name, const UpdateFlags update_flags)
virtual std::vector< std::string > get_names() const override
virtual std::vector< std::string > get_names() const override
virtual UpdateFlags get_needed_update_flags() const override
virtual void evaluate_vector_field(const DataPostprocessorInputs::Vector< dim > &input_data, std::vector< Vector< double >> &computed_quantities) const
#define AssertThrow(cond, exc)
Definition: exceptions.h:1571
DataPostprocessorScalar(const std::string &name, const UpdateFlags update_flags)
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const override
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
Definition: exceptions.h:1461
UpdateFlags
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:407
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const override
const UpdateFlags update_flags
const UpdateFlags update_flags
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const override
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:406
virtual void evaluate_scalar_field(const DataPostprocessorInputs::Scalar< dim > &input_data, std::vector< Vector< double >> &computed_quantities) const
DataPostprocessorVector(const std::string &name, const UpdateFlags update_flags)
virtual UpdateFlags get_needed_update_flags() const override
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const
const UpdateFlags update_flags
virtual UpdateFlags get_needed_update_flags() const override