ASPECT
probability_density_function.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) 2015-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 #ifndef _aspect_particle_generator_probability_density_function_h
16 #define _aspect_particle_generator_probability_density_function_h
17 
19 
21 
22 namespace aspect
23 {
24  namespace Particle
25  {
26  namespace Generator
27  {
31  template <int dim>
32  DeclException1 (ProbabilityFunctionNegative,
33  Point<dim>,
34  << "Your probability density function in the particle generator "
35  "returned a negative probability density for the following position: "
36  << arg1 << ". Please check your function expression.");
37 
38 
55  template <int dim>
57  {
58  public:
67  void
68  generate_particles(Particles::ParticleHandler<dim> &particle_handler) override;
69 
73  static
74  void
76 
80  void
81  parse_parameters (ParameterHandler &prm) override;
82 
83  private:
91 
103 
111  unsigned int random_number_seed;
112 
118  };
119 
120  }
121  }
122 }
123 
124 #endif
static void declare_parameters(ParameterHandler &prm)
void generate_particles(Particles::ParticleHandler< dim > &particle_handler) override
void parse_parameters(ParameterHandler &prm) override
DeclException1(ProbabilityFunctionNegative, Point< dim >,<< "Your probability density function in the particle generator " "returned a negative probability density for the following position: "<< arg1<< ". Please check your function expression.")