ASPECT
global_statistics.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2017-2026 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 
16 #ifndef _aspect_postprocess_global_statistics_h
17 #define _aspect_postprocess_global_statistics_h
18 
21 
23 
24 namespace aspect
25 {
26 
27  namespace Postprocess
28  {
44  template <int dim>
45  class GlobalStatistics : public Interface<dim>, public ::aspect::SimulatorAccess<dim>
46  {
47  public:
51  void initialize() override;
52 
56  std::pair<std::string,std::string>
57  execute (TableHandler &statistics) override;
58 
62  static
63  void
65 
69  void
70  parse_parameters (ParameterHandler &prm) override;
71 
72 
73  private:
78  void
80 
88  void
89  clear_data();
90 
95  void
96  store_stokes_solver_history(const unsigned int number_S_iterations,
97  const unsigned int number_A_iterations,
98  const SolverControl &solver_control_cheap,
99  const SolverControl &solver_control_expensive);
100 
105  void
106  store_advection_solver_history(const bool solved_temperature_field,
107  const unsigned int compositional_index,
108  const SolverControl &solver_control);
109 
116  std::vector<unsigned int> list_of_S_iterations;
117  std::vector<unsigned int> list_of_A_iterations;
118  std::vector<unsigned int> stokes_iterations_cheap;
119  std::vector<unsigned int> stokes_iterations_expensive;
120 
134  std::map<unsigned int, std::vector<unsigned int>> advection_iterations;
135 
144  };
145  }
146 }
147 
148 
149 #endif
void generate_global_statistics(TableHandler &statistics)
std::map< unsigned int, 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
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