ASPECT
|
Static Public Member Functions | |
static void | declare_parameters (ParameterHandler &prm) |
Static Public Member Functions inherited from aspect::SimulatorAccess< dim > | |
static void | get_composition_values_at_q_point (const std::vector< std::vector< double >> &composition_values, const unsigned int q, std::vector< double > &composition_values_at_q_point) |
Static Public Member Functions inherited from aspect::Plugins::InterfaceBase | |
static void | declare_parameters (ParameterHandler &prm) |
Private Attributes | |
types::particle_index | n_particles |
bool | random_cell_selection |
unsigned int | random_number_seed |
Functions::ParsedFunction< dim > | function |
Additional Inherited Members | |
Protected Member Functions inherited from aspect::Particle::Generator::Interface< dim > | |
DEAL_II_DEPRECATED std::pair< Particles::internal::LevelInd, Particle< dim > > | generate_particle (const Point< dim > &position, const types::particle_index id) const |
Particles::ParticleIterator< dim > | insert_particle_at_position (const Point< dim > &position, const types::particle_index id, Particles::ParticleHandler< dim > &particle_handler) const |
Protected Attributes inherited from aspect::Particle::Generator::Interface< dim > | |
std::mt19937 | random_number_generator |
Generates a random distribution of particles over the simulation domain. The particle density is determined by a user-defined probability density function in the parameter file. This is done using a "roulette wheel" style selection. Every cell is weighted by the value of the provided function at its center multiplied with the cell volume. Then a map between the accumulated cell weight and the cell index of the current cell is constructed. Consequently, a random number between zero and the global integral of the probability density function uniquely defines one particular cell. Afterwards, every process generates n_global_particles random numbers, but only generates a particle if it is the owner of the active cell that is associated with this random number.
Definition at line 62 of file probability_density_function.h.
|
overridevirtual |
Generate a set of particles in the given particle handler. The particle density is set by an analytically prescribed density function that is set as an input parameter.
[in,out] | particle_handler | The particle handler into which the generated particles should be inserted. |
Implements aspect::Particle::Generator::Interface< dim >.
|
static |
Declare the parameters this class takes through input files.
|
overridevirtual |
Read the parameters this class declares from the parameter file.
Reimplemented from aspect::Plugins::InterfaceBase.
|
private |
Number of particles to create
Definition at line 93 of file probability_density_function.h.
|
private |
If true, particle numbers per cell are calculated randomly according to their respective probability density. If false, first determine how many particles each cell should have based on the integral of the density over each of the cells, and then once we know how many particles we want on each cell, choose their locations randomly within each cell.
Definition at line 103 of file probability_density_function.h.
|
private |
The seed for the random number generator that controls the particle generation.
Definition at line 109 of file probability_density_function.h.
|
private |
A function object representing the particle location probability density.
Definition at line 115 of file probability_density_function.h.