ASPECT
|
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 |
Additional Inherited Members | |
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) |
Abstract base class used for classes that generate particles.
|
overridevirtual |
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.
The default implementation of this function does nothing, but plugins that derive from this class (via the Interface
classes of their respective plugin systems) may overload it if they want something to happen upon startup of the Simulator object to which the plugin contributes.
Reimplemented from aspect::Plugins::InterfaceBase.
|
pure 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. |
Implemented 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.
|
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 146 of file interface.h.