Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
generators.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 - 2020 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_particles_particle_generator_h
17 #define dealii_particles_particle_generator_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/function.h>
23 
25 
27 
28 #include <deal.II/fe/mapping.h>
29 #include <deal.II/fe/mapping_q1.h>
30 
33 
34 #include <random>
35 
37 
38 namespace Particles
39 {
44  namespace Generators
45  {
65  template <int dim, int spacedim = dim>
66  void
69  const std::vector<Point<dim>> & particle_reference_locations,
70  ParticleHandler<dim, spacedim> & particle_handler,
71  const Mapping<dim, spacedim> & mapping =
73 
103  template <int dim, int spacedim = dim>
107  const types::particle_index id,
108  std::mt19937 & random_number_generator,
109  const Mapping<dim, spacedim> &mapping =
111 
156  template <int dim, int spacedim = dim>
157  void
160  const Function<spacedim> & probability_density_function,
161  const bool random_cell_selection,
162  const types::particle_index n_particles_to_create,
163  ParticleHandler<dim, spacedim> & particle_handler,
164  const Mapping<dim, spacedim> & mapping =
166  const unsigned int random_number_seed = 5432);
167 
168 
202  template <int dim, int spacedim = dim>
203  void
205  const std::vector<std::vector<BoundingBox<spacedim>>>
206  & global_bounding_boxes,
207  ParticleHandler<dim, spacedim> &particle_handler,
208  const Mapping<dim, spacedim> & mapping =
210  const ComponentMask &components = ComponentMask());
211 
242  template <int dim, int spacedim = dim>
243  void
245  const Quadrature<dim> & quadrature,
246  const std::vector<std::vector<BoundingBox<spacedim>>>
247  & global_bounding_boxes,
248  ParticleHandler<dim, spacedim> &particle_handler,
249  const Mapping<dim, spacedim> & mapping =
251  } // namespace Generators
252 } // namespace Particles
253 
255 
256 #endif
Particles::Generators::probabilistic_locations
void probabilistic_locations(const Triangulation< dim, spacedim > &triangulation, const Function< spacedim > &probability_density_function, const bool random_cell_selection, const types::particle_index n_particles_to_create, ParticleHandler< dim, spacedim > &particle_handler, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim, spacedim >::mapping, const unsigned int random_number_seed=5432)
Definition: generators.cc:228
StaticMappingQ1
Definition: mapping_q1.h:88
particle_handler.h
Particles::Generators::random_particle_in_cell
Particle< dim, spacedim > random_particle_in_cell(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell, const types::particle_index id, std::mt19937 &random_number_generator, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim, spacedim >::mapping)
Definition: generators.cc:168
Triangulation
Definition: tria.h:1109
mapping_q1.h
ComponentMask
Definition: component_mask.h:83
Particles
Definition: data_out.h:27
DoFHandler
Definition: dof_handler.h:205
BoundingBox
Definition: bounding_box.h:128
Particles::Particle
Definition: particle.h:146
Mapping
Abstract base class for mapping classes.
Definition: mapping.h:302
Particles::Generators::regular_reference_locations
void regular_reference_locations(const Triangulation< dim, spacedim > &triangulation, const std::vector< Point< dim >> &particle_reference_locations, ParticleHandler< dim, spacedim > &particle_handler, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim, spacedim >::mapping)
Definition: generators.cc:113
Particles::Generators::dof_support_points
void dof_support_points(const DoFHandler< dim, spacedim > &dof_handler, const std::vector< std::vector< BoundingBox< spacedim >>> &global_bounding_boxes, ParticleHandler< dim, spacedim > &particle_handler, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim, spacedim >::mapping, const ComponentMask &components=ComponentMask())
Definition: generators.cc:407
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
types::particle_index
unsigned int particle_index
Definition: particle.h:69
TriaActiveIterator
Definition: tria_iterator.h:759
tria.h
function.h
mapping.h
Particles::Generators::quadrature_points
void quadrature_points(const Triangulation< dim, spacedim > &triangulation, const Quadrature< dim > &quadrature, const std::vector< std::vector< BoundingBox< spacedim >>> &global_bounding_boxes, ParticleHandler< dim, spacedim > &particle_handler, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim, spacedim >::mapping)
Definition: generators.cc:442
particle.h
dof_handler.h
Particles::ParticleHandler
Definition: data_out.h:30
Point< dim >
quadrature.h
config.h
Function
Definition: function.h:151
triangulation
const typename ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
Definition: p4est_wrappers.cc:69
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
Quadrature
Definition: quadrature.h:85