ASPECT
global_statistics.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2017 - 2021 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _aspect_postprocess_global_statistics_h
23 #define _aspect_postprocess_global_statistics_h
24 
27 
28 #include <deal.II/lac/solver_control.h>
29 
30 namespace aspect
31 {
32 
33  namespace Postprocess
34  {
50  template <int dim>
51  class GlobalStatistics : public Interface<dim>, public ::aspect::SimulatorAccess<dim>
52  {
53  public:
57  void initialize() override;
58 
62  std::pair<std::string,std::string>
63  execute (TableHandler &statistics) override;
64 
68  static
69  void
70  declare_parameters (ParameterHandler &prm);
71 
75  void
76  parse_parameters (ParameterHandler &prm) override;
77 
78 
79  private:
84  void
85  generate_global_statistics(TableHandler &statistics);
86 
94  void
95  clear_data();
96 
101  void
102  store_stokes_solver_history(const unsigned int number_S_iterations,
103  const unsigned int number_A_iterations,
104  const SolverControl &solver_control_cheap,
105  const SolverControl &solver_control_expensive);
106 
111  void
112  store_advection_solver_history(const bool solved_temperature_field,
113  const unsigned int compositional_index,
114  const SolverControl &solver_control);
115 
122  std::vector<unsigned int> list_of_S_iterations;
123  std::vector<unsigned int> list_of_A_iterations;
124  std::vector<unsigned int> stokes_iterations_cheap;
125  std::vector<unsigned int> stokes_iterations_expensive;
126 
140  std::vector<std::pair<std::string, std::vector<unsigned int>>> advection_iterations;
141 
148  };
149  }
150 }
151 
152 
153 #endif
void generate_global_statistics(TableHandler &statistics)
std::vector< std::pair< std::string, std::vector< unsigned int > > > advection_iterations
std::pair< std::string, std::string > execute(TableHandler &statistics) override
std::vector< unsigned int > stokes_iterations_cheap
void store_advection_solver_history(const bool solved_temperature_field, const unsigned int compositional_index, const SolverControl &solver_control)
static void declare_parameters(ParameterHandler &prm)
std::vector< unsigned int > list_of_S_iterations
std::vector< unsigned int > stokes_iterations_expensive
Definition: compat.h:59
std::vector< unsigned int > list_of_A_iterations
void store_stokes_solver_history(const unsigned int number_S_iterations, const unsigned int number_A_iterations, const SolverControl &solver_control_cheap, const SolverControl &solver_control_expensive)
void parse_parameters(ParameterHandler &prm) override