ASPECT
particle_distribution_statistics.h
Go to the documentation of this file.
1 
2 /*
3  Copyright (C) 2025 - by the authors of the ASPECT code.
4 
5  This file is part of ASPECT.
6 
7  ASPECT is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2, or (at your option)
10  any later version.
11 
12  ASPECT is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with ASPECT; see the file LICENSE. If not see
19  <http://www.gnu.org/licenses/>.
20 */
21 
22 #ifndef _aspect_postprocess_particle_distribution_statistics_h
23 #define _aspect_postprocess_particle_distribution_statistics_h
24 
26 #include <deal.II/base/function_lib.h>
28 
29 namespace aspect
30 {
31  namespace Postprocess
32  {
33 
42  template <int dim>
44  {
45  public:
49  std::pair<std::string,std::string>
50  execute (TableHandler &statistics) override;
51 
56  std::list<std::string>
57  required_other_postprocessors() const override;
58 
62  static
63  void
64  declare_parameters (ParameterHandler &prm);
65 
69  void
70  parse_parameters (ParameterHandler &prm) override;
71 
72  private:
79 
87  unsigned int granularity;
88 
97  double bandwidth;
98 
104 
111  void
112  fill_PDF_from_cell(const typename Triangulation<dim>::active_cell_iterator &cell,
114 
127  void insert_kernel_sum_into_pdf(const typename Triangulation<dim>::active_cell_iterator &cell,
128  const Point<dim> reference_point,
129  const std::array<unsigned int,dim> table_index,
130  const unsigned int particles_in_cell,
132 
138  double
139  apply_selected_kernel_function(const double distance) const;
140 
147  double
148  kernelfunction_uniform(const double distance) const;
149 
156  double
157  kernelfunction_triangular(const double distance) const;
158 
165  double
166  kernelfunction_gaussian(const double distance) const;
167  };
168  }
169 }
170 
171 
172 #endif
void insert_kernel_sum_into_pdf(const typename Triangulation< dim >::active_cell_iterator &cell, const Point< dim > reference_point, const std::array< unsigned int, dim > table_index, const unsigned int particles_in_cell, Particle::ParticlePDF< dim > &pdf)
double apply_selected_kernel_function(const double distance) const
void fill_PDF_from_cell(const typename Triangulation< dim >::active_cell_iterator &cell, Particle::ParticlePDF< dim > &pdf)
double kernelfunction_triangular(const double distance) const
Particle::ParticlePDF< dim >::KernelFunction kernel_function
double kernelfunction_gaussian(const double distance) const
double kernelfunction_uniform(const double distance) const
std::pair< std::string, std::string > execute(TableHandler &statistics) override
static void declare_parameters(ParameterHandler &prm)
void parse_parameters(ParameterHandler &prm) override
std::list< std::string > required_other_postprocessors() const override