Logbook  (07-04-2025)
Static problems
misc.hpp
1 /******************************************************************************
2  * Copyright (C) Siarhei Uzunbajakau, 2023.
3  *
4  * This program is free software. You can use, modify, and redistribute it under
5  * the terms of the GNU Lesser General Public License as published by the Free
6  * Software Foundation, either version 3 or (at your option) any later version.
7  * This program is distributed without any warranty.
8  *
9  * Refer to COPYING.LESSER for more details.
10  ******************************************************************************/
11 
12 #ifndef MISC8457956__
13 #define MISC8457956__
14 
15 #include <deal.II/base/convergence_table.h>
16 #include <deal.II/base/tensor.h>
17 
18 namespace Misc {
19 using namespace dealii;
20 
24 class MainOutputTable : public ConvergenceTable
25 {
26 public:
27  MainOutputTable() = delete;
31  MainOutputTable(int dimensions)
32  : ConvergenceTable()
33  , dimensions(dimensions)
34  {
35  }
43  void save(std::string fname);
50  void set_new_order(std::vector<std::string> new_order_in)
51  {
52  new_order = new_order_in;
53  }
54 
60  void append_new_order(std::string new_column)
61  {
62  new_order.push_back(new_column);
63  }
64 
65  virtual void format();
66 
67  virtual ~MainOutputTable() = default;
68 
69 private:
70  int dimensions;
71  std::vector<std::string> new_order = {
72  "p", "r", "ncells", "ndofs", "L2", "H1"
73  };
74 };
75 
76 } // namespace Misc
77 
78 #endif
The convergence table used in multiple numerical experiments.
Definition: misc.hpp:25
MainOutputTable(int dimensions)
The only constructor.
Definition: misc.hpp:31
void set_new_order(std::vector< std::string > new_order_in)
Sets a new order of columns.
Definition: misc.hpp:50
void append_new_order(std::string new_column)
Appends a column to the table.
Definition: misc.hpp:60