ASPECT
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
29 #include <deal.II/particles/particle_handler.h>
30 #include <deal.II/base/data_out_base.h>
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
105  declare_parameters (ParameterHandler &prm);
106 
110  void
111  parse_parameters (ParameterHandler &prm) override;
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 
140  unsigned int random_number_seed;
141 
147 
152 
161  void set_last_output_time (const double current_time);
162 
167  unsigned int output_file_number;
168 
172  std::vector<std::string> output_formats;
173 
182  std::vector<std::pair<double,std::string>> times_and_pvtu_file_names;
183 
189  std::vector<std::pair<double,std::vector<std::string>>> times_and_vtu_file_names;
190 
196  std::vector<std::vector<std::string>> output_file_names_by_timestep;
197 
204  std::vector<XDMFEntry> xdmf_entries;
205 
212  unsigned int group_files;
213 
222 
230 
236 
240  std::vector<std::pair<unsigned int,Output>> write_raw_cpo;
241 
246 
252 
258  std::vector<std::pair<unsigned int,Output>> write_draw_volume_weighted_cpo;
259 
264 
270 
275 
283  static
284  void writer (const std::string &filename,
285  const std::string &temporary_filename,
286  const std::string &file_contents,
287  const bool compress_contents);
288  };
289  }
290 }
291 
292 #endif
Output string_to_output_enum(const std::string &string)
std::vector< std::pair< unsigned int, Output > > write_draw_volume_weighted_cpo
void load(const std::map< std::string, std::string > &status_strings) override
void set_last_output_time(const double current_time)
void serialize(Archive &ar, const unsigned int version)
std::pair< std::string, std::string > execute(TableHandler &statistics) override
std::vector< std::pair< double, std::string > > times_and_pvtu_file_names
static void writer(const std::string &filename, const std::string &temporary_filename, const std::string &file_contents, const bool compress_contents)
std::vector< std::pair< unsigned int, Output > > write_raw_cpo
void parse_parameters(ParameterHandler &prm) override
static void declare_parameters(ParameterHandler &prm)
std::list< std::string > required_other_postprocessors() const override
void save(std::map< std::string, std::string > &status_strings) const override
std::vector< std::pair< double, std::vector< std::string > > > times_and_vtu_file_names
std::vector< std::vector< std::string > > output_file_names_by_timestep