ASPECT
depth_average.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) 2011-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_depth_average_h
17 #define _aspect_postprocess_depth_average_h
18 
21 
23 
24 
25 namespace aspect
26 {
27  namespace Postprocess
28  {
29 
36  template <int dim>
37  class DepthAverage : public Interface<dim>, public ::aspect::SimulatorAccess<dim>
38  {
39  public:
43  DepthAverage ();
44 
48  std::pair<std::string,std::string>
49  execute (TableHandler &statistics) override;
50 
54  static
55  void
57 
61  void
62  parse_parameters (ParameterHandler &prm) override;
63 
67  void save (std::map<std::string, std::string> &status_strings) const override;
68 
72  void load (const std::map<std::string, std::string> &status_strings) override;
73 
78  template <class Archive>
79  void serialize (Archive &ar, const unsigned int version);
80 
81  private:
90 
95 
101  std::vector<std::string> output_formats;
102 
108  unsigned int n_depth_zones;
109 
118  std::vector<double> depth_bounds;
119 
123  std::vector<std::string> variables;
124 
128  struct DataPoint
129  {
130  double time;
131  std::vector<std::vector<double>> values;
132 
133  template <class Archive>
134  void serialize (Archive &ar, const unsigned int version);
135  };
136 
140  std::vector<DataPoint> entries;
141 
150  void set_last_output_time (const double current_time);
151  };
152  }
153 }
154 
155 
156 #endif
void load(const std::map< std::string, std::string > &status_strings) override
void parse_parameters(ParameterHandler &prm) override
std::vector< double > depth_bounds
static void declare_parameters(ParameterHandler &prm)
std::vector< std::string > variables
std::vector< std::string > output_formats
std::vector< DataPoint > entries
std::pair< std::string, std::string > execute(TableHandler &statistics) override
void serialize(Archive &ar, const unsigned int version)
void serialize(Archive &ar, const unsigned int version)
void set_last_output_time(const double current_time)
void save(std::map< std::string, std::string > &status_strings) const override
std::vector< std::vector< double > > values