Reference documentation for deal.II version Git d435e92be9 2020-09-23 09:04:26 -0400
\(\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 - 2018 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 
24 template <int dim>
25 void
28  std::vector<Vector<double>> &) const
29 {
31 }
32 
33 
34 
35 template <int dim>
36 void
39  std::vector<Vector<double>> &) const
40 {
42 }
43 
44 
45 
46 template <int dim>
47 std::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 
59 template <int dim>
61  const std::string &name,
62  const UpdateFlags update_flags)
63  : name(name)
64  , update_flags(update_flags)
65 {}
66 
67 
68 
69 template <int dim>
70 std::vector<std::string>
72 {
73  return std::vector<std::string>(1, name);
74 }
75 
76 
77 
78 template <int dim>
79 std::vector<DataComponentInterpretation::DataComponentInterpretation>
81 {
82  return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
84 }
85 
86 
87 template <int dim>
90 {
91  return update_flags;
92 }
93 
94 
95 
96 // -------------------------- DataPostprocessorVector -------------------------
97 
98 template <int dim>
100  const std::string &name,
102  : name(name)
103  , update_flags(update_flags)
104 {}
105 
106 
107 
108 template <int dim>
109 std::vector<std::string>
111 {
112  return std::vector<std::string>(dim, name);
113 }
114 
115 
116 
117 template <int dim>
118 std::vector<DataComponentInterpretation::DataComponentInterpretation>
120 {
121  return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
123 }
124 
125 
126 template <int dim>
129 {
130  return update_flags;
131 }
132 
133 
134 
135 // -------------------------- DataPostprocessorTensor -------------------------
136 
137 template <int dim>
139  const std::string &name,
141  : name(name)
142  , update_flags(update_flags)
143 {}
144 
145 
146 
147 template <int dim>
148 std::vector<std::string>
150 {
151  return std::vector<std::string>(dim * dim, name);
152 }
153 
154 
155 
156 template <int dim>
157 std::vector<DataComponentInterpretation::DataComponentInterpretation>
159 {
160  return std::vector<DataComponentInterpretation::DataComponentInterpretation>(
162 }
163 
164 
165 template <int dim>
168 {
169  return update_flags;
170 }
171 
172 
173 
174 // explicit instantiation
175 #include "data_postprocessor.inst"
176 
177 
static ::ExceptionBase & ExcPureFunctionCalled()
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:1521
DataPostprocessorScalar(const std::string &name, const UpdateFlags update_flags)
virtual std::vector< DataComponentInterpretation::DataComponentInterpretation > get_data_component_interpretation() const override
UpdateFlags
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:363
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:362
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