![]() |
ASPECT
|
Static Public Member Functions | |
static void | declare_parameters (ParameterHandler &prm) |
![]() | |
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) |
Protected Member Functions | |
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 | |
std::mt19937 | random_number_generator |
Abstract base class used for classes that generate particles.
aspect::Particle::Generator::Interface< dim >::Interface | ( | ) |
Constructor. Initializes the random number generator.
|
overridedefault |
Destructor. Made virtual so that derived classes can be created and destroyed through pointers to the base class.
|
virtual |
Initialization function. This function is called once at the beginning of the program after parse_parameters is run and after the SimulatorAccess (if applicable) is initialized.
|
virtual |
Generate particles. Every derived class has to decide on the method and number of particles to generate, for example using input parameters declared in their declare_parameters and parse_parameters functions. This function should generate the particles and associate them to their according cells by inserting them into a multimap between cell and particle. This map becomes very large if the particle count per process is large, so we hand it over by reference instead of returning the multimap.
[in,out] | particles | A multimap between cells and their particles. This map will be filled in this function. |
|
virtual |
Generate particles. Every derived class has to decide on the method and number of particles to generate, for example using input parameters declared in their declare_parameters and parse_parameters functions. This function should generate the particles and insert them into particle_handler
by calling its respective functions.
[in,out] | particle_handler | The particle handler into which the generated particles should be inserted. |
Reimplemented in aspect::Particle::Generator::ProbabilityDensityFunction< dim >, aspect::Particle::Generator::UniformRadial< dim >, aspect::Particle::Generator::ReferenceCell< dim >, aspect::Particle::Generator::UniformBox< dim >, aspect::Particle::Generator::QuadraturePoints< dim >, aspect::Particle::Generator::AsciiFile< dim >, and aspect::Particle::Generator::RandomUniform< dim >.
std::pair<Particles::internal::LevelInd,Particle<dim> > aspect::Particle::Generator::Interface< dim >::generate_particle | ( | const typename parallel::distributed::Triangulation< dim >::active_cell_iterator & | cell, |
const types::particle_index | id | ||
) |
Generate one particle in the given cell. This function's main purpose is to provide functionality to fill up cells with too few particles after refinement. Of course it can also be utilized by derived classes to generate the initial particle distribution.
|
static |
Declare the parameters this class takes through input files. The default implementation of this function does not describe any parameters. Consequently, derived classes do not have to overload this function if they do not take any runtime parameters.
|
virtual |
Read the parameters this class declares from the parameter file. The default implementation of this function does not read any parameters. Consequently, derived classes do not have to overload this function if they do not take any runtime parameters.
Reimplemented in aspect::Particle::Generator::ProbabilityDensityFunction< dim >, aspect::Particle::Generator::UniformRadial< dim >, aspect::Particle::Generator::ReferenceCell< dim >, aspect::Particle::Generator::UniformBox< dim >, aspect::Particle::Generator::AsciiFile< dim >, and aspect::Particle::Generator::RandomUniform< dim >.
|
protected |
Generate a particle at the specified position and with the specified id. Many derived classes use this functionality, therefore it is implemented here to avoid duplication. In case the position is not in the local domain this function throws an exception of type ExcParticlePointNotInDomain, which can be caught in the calling plugin.
|
protected |
Generate a particle at the specified position and with the specified id and insert it into the particle_handler
. Many derived classes use this functionality, therefore it is implemented here to avoid duplication. In case the position is not in the local domain this function throws an exception of type ExcParticlePointNotInDomain, which can be caught in the calling plugin. Note that since the cell in which the particle is generated is not known, it has to be found, which is an expensive operation.
position | Position of the particle. |
id | The id of the particle. |
particle_handler | The particle handler into which the particle should be inserted. |
|
protected |
Random number generator. For reproducibility of tests it is initialized in the constructor with a constant.
Definition at line 202 of file interface.h.