ASPECT
crystal_preferred_orientation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2023 - 2024 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 #ifndef _aspect_postprocess_crystal_preferred_orientation_h
22 #define _aspect_postprocess_crystal_preferred_orientation_h
23 
26 
28 
31 
32 #include <random>
33 #include <tuple>
34 
35 
36 namespace aspect
37 {
38  namespace Postprocess
39  {
47  template <int dim>
49  {
50  public:
55 
60 
61 
65  void initialize () override;
66 
74  std::pair<std::string,std::string> execute (TableHandler &statistics) override;
75 
80  std::list<std::string>
81  required_other_postprocessors () const override;
82 
86  void save (std::map<std::string, std::string> &status_strings) const override;
87 
91  void load (const std::map<std::string, std::string> &status_strings) override;
92 
97  template <class Archive>
98  void serialize (Archive &ar, const unsigned int version);
99 
103  static
104  void
106 
110  void
112 
113  private:
122  enum class Output
123  {
125  };
126 
130  Output string_to_output_enum(const std::string &string);
131 
135  mutable std::mt19937 random_number_generator;
136 
142  unsigned int random_number_seed;
143 
150 
155 
164  void set_last_output_time (const double current_time);
165 
170  unsigned int output_file_number;
171 
175  std::vector<std::string> output_formats;
176 
185  std::vector<std::pair<double,std::string>> times_and_pvtu_file_names;
186 
192  std::vector<std::pair<double,std::vector<std::string>>> times_and_vtu_file_names;
193 
199  std::vector<std::vector<std::string>> output_file_names_by_timestep;
200 
207  std::vector<XDMFEntry> xdmf_entries;
208 
215  unsigned int group_files;
216 
226 
235 
241 
245  std::vector<std::pair<unsigned int,Output>> write_raw_cpo;
246 
251 
257 
263  std::vector<std::pair<unsigned int,Output>> write_draw_volume_weighted_cpo;
264 
269 
275 
282 
290  static
291  void writer (const std::string &filename,
292  const std::string &temporary_filename,
293  const std::string &file_contents,
294  const bool compress_contents);
295  };
296  }
297 }
298 
299 #endif
void load(const std::map< std::string, std::string > &status_strings) override
void parse_parameters(ParameterHandler &prm) override
std::vector< std::pair< unsigned int, Output > > write_draw_volume_weighted_cpo
static void writer(const std::string &filename, const std::string &temporary_filename, const std::string &file_contents, const bool compress_contents)
static void declare_parameters(ParameterHandler &prm)
void set_last_output_time(const double current_time)
std::vector< std::pair< double, std::vector< std::string > > > times_and_vtu_file_names
void save(std::map< std::string, std::string > &status_strings) const override
std::vector< std::vector< std::string > > output_file_names_by_timestep
std::list< std::string > required_other_postprocessors() const override
std::vector< std::pair< unsigned int, Output > > write_raw_cpo
std::pair< std::string, std::string > execute(TableHandler &statistics) override
std::vector< std::pair< double, std::string > > times_and_pvtu_file_names
void serialize(Archive &ar, const unsigned int version)
Output string_to_output_enum(const std::string &string)