Reference documentation for deal.II version 9.2.0
\(\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\}}\)
dof_output_operator.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2010 - 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 
16 
17 #ifndef dealii_dof_output_operator_h
18 #define dealii_dof_output_operator_h
19 
20 #include <deal.II/base/config.h>
21 
24 
25 #include <deal.II/base/event.h>
27 
29 
31 
32 #include <fstream>
33 
35 
36 namespace Algorithms
37 {
42  template <typename VectorType, int dim, int spacedim = dim>
43  class DoFOutputOperator : public OutputOperator<VectorType>
44  {
45  public:
46  /*
47  * Constructor. The <tt>filename</tt> is the common base name of
48  * all files and the argument <tt>digits</tt> should be the number
49  * of digits of the highest number in the sequence. File names by
50  * default have the form "outputNNN" with NNN the number set by the
51  * last step command. Numbers with less digits are filled with
52  * zeros from the left.
53  */
54  DoFOutputOperator(const std::string &filename_base = std::string("output"),
55  const unsigned int digits = 3);
56 
57  void
59  void
60  initialize(const DoFHandler<dim, spacedim> &dof_handler);
61 
63  operator<<(const AnyData &vectors) override;
64 
65  private:
68  dof;
69 
70  const std::string filename_base;
71  const unsigned int digits;
72 
74  };
75 
76  template <typename VectorType, int dim, int spacedim>
77  inline void
79  const DoFHandler<dim, spacedim> &dof_handler)
80  {
81  dof = &dof_handler;
82  }
83 } // namespace Algorithms
84 
85 
87 
88 #endif
AnyData
Definition: any_data.h:37
Algorithms::DoFOutputOperator::dof
SmartPointer< const DoFHandler< dim, spacedim >, DoFOutputOperator< VectorType, dim, spacedim > > dof
Definition: dof_output_operator.h:68
operator.h
Algorithms::DoFOutputOperator::DoFOutputOperator
DoFOutputOperator(const std::string &filename_base=std::string("output"), const unsigned int digits=3)
Algorithms::DoFOutputOperator
Definition: dof_output_operator.h:43
DoFHandler
Definition: dof_handler.h:205
Algorithms::DoFOutputOperator::parse_parameters
void parse_parameters(ParameterHandler &param)
Algorithms::DoFOutputOperator::filename_base
const std::string filename_base
Definition: dof_output_operator.h:70
Algorithms::DoFOutputOperator::initialize
void initialize(const DoFHandler< dim, spacedim > &dof_handler)
Definition: dof_output_operator.h:78
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
parameter_handler.h
event.h
Algorithms
Definition: newton.h:36
Algorithms::DoFOutputOperator::out
DataOut< dim > out
Definition: dof_output_operator.h:73
SmartPointer
Definition: smartpointer.h:68
any_data.h
dof_handler.h
ParameterHandler
Definition: parameter_handler.h:845
config.h
Algorithms::DoFOutputOperator::digits
const unsigned int digits
Definition: dof_output_operator.h:71
Algorithms::DoFOutputOperator::operator<<
virtual OutputOperator< VectorType > & operator<<(const AnyData &vectors) override
Algorithms::OutputOperator
Definition: operator.h:113
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
data_out.h
DataOut< dim >