Flow123d  release_1.8.2-1603-g0109a2b
output_data_base.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file output_data_base.hh
15  * @brief
16  */
17 
18 #ifndef OUTPUT_DATA_BASE_HH_
19 #define OUTPUT_DATA_BASE_HH_
20 
21 
22 
23 #include <ostream>
24 #include <string>
25 
26 #include "fields/unit_si.hh"
27 
28 using namespace std;
29 
30 /**
31  * \brief Common parent class for templated OutputData.
32  *
33  * Provides virtual method for output of stored data.
34  *
35  */
37 public:
38 
39  /**
40  * Number of components of element data stored in the database.
41  */
43  N_SCALAR = 1,
44  N_VECTOR = 3,
45  N_TENSOR = 9
46  };
47 
48  /**
49  * Destructor of OutputDataBase
50  */
51  virtual ~OutputDataBase() {};
52 
53  /**
54  * Print one value at given index
55  */
56  virtual void print(ostream &out_stream, unsigned int idx) = 0;
57 
58  /**
59  * Print all data at once stored in database
60  */
61  virtual void print_all(ostream &out_stream) = 0;
62 
63  /**
64  * Data copied from Field.
65  */
66  std::string output_field_name;
67  std::string field_name;
69 
70  /**
71  * Number of data values.
72  */
73  unsigned int n_values;
74 
75  /**
76  * Number of data elements per data value.
77  */
79 
80 };
81 
82 
83 
84 
85 #endif /* OUTPUT_DATA_BASE_HH_ */
Common parent class for templated OutputData.
std::string output_field_name
virtual ~OutputDataBase()
unsigned int n_values
NumCompValueType n_elem_
std::string field_name
Class for representation SI units of Fields.
Definition: unit_si.hh:40