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 
29 #include <deal.II/particles/particle_handler.h>
30 #include <deal.II/base/data_out_base.h>
31 #include <tuple>
32 
33 namespace aspect
34 {
35  namespace Postprocess
36  {
44  template <int dim>
46  {
47  public:
52 
57 
58 
62  void initialize () override;
63 
71  std::pair<std::string,std::string> execute (TableHandler &statistics) override;
72 
77  std::list<std::string>
78  required_other_postprocessors () const override;
79 
83  static
84  void
85  declare_parameters (ParameterHandler &prm);
86 
90  void
91  parse_parameters (ParameterHandler &prm) override;
92 
93  private:
94 
99  double end_time;
100 
109  enum class Output
110  {
112  };
113 
117  Output string_to_output_enum(const std::string &string);
118 
122  mutable std::mt19937 random_number_generator;
123 
127  unsigned int random_number_seed;
128 
134 
139 
148  void set_last_output_time (const double current_time);
149 
154  unsigned int output_file_number;
155 
159  std::vector<std::string> output_formats;
160 
169  std::vector<std::pair<double,std::string>> times_and_pvtu_file_names;
170 
176  std::vector<std::pair<double,std::vector<std::string>>> times_and_vtu_file_names;
177 
183  std::vector<std::vector<std::string>> output_file_names_by_timestep;
184 
191  std::vector<XDMFEntry> xdmf_entries;
192 
199  unsigned int group_files;
200 
209 
217 
223 
227  std::vector<std::pair<unsigned int,Output>> write_raw_cpo;
228 
233 
239 
245  std::vector<std::pair<unsigned int,Output>> write_draw_volume_weighted_cpo;
246 
251 
257 
262 
270  static
271  void writer (const std::string &filename,
272  const std::string &temporary_filename,
273  const std::string &file_contents,
274  const bool compress_contents);
275  };
276  }
277 }
278 
279 #endif
Output string_to_output_enum(const std::string &string)
std::vector< std::pair< unsigned int, Output > > write_draw_volume_weighted_cpo
void set_last_output_time(const double current_time)
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)
Definition: compat.h:59
std::list< std::string > required_other_postprocessors() 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