Reference documentation for deal.II version 9.3.3
\(\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 - 2021 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
23
25
27
28#include <deal.II/fe/mapping.h>
30
33
34#include <random>
35
37
38namespace 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 =
72 (ReferenceCells::get_hypercube<dim>()
73 .template get_default_linear_mapping<dim, spacedim>()));
74
104 template <int dim, int spacedim = dim>
108 const types::particle_index id,
109 std::mt19937 & random_number_generator,
110 const Mapping<dim, spacedim> &mapping =
111 (ReferenceCells::get_hypercube<dim>()
112 .template get_default_linear_mapping<dim, spacedim>()));
113
158 template <int dim, int spacedim = dim>
159 void
162 const Function<spacedim> & probability_density_function,
163 const bool random_cell_selection,
164 const types::particle_index n_particles_to_create,
165 ParticleHandler<dim, spacedim> & particle_handler,
166 const Mapping<dim, spacedim> & mapping =
167 (ReferenceCells::get_hypercube<dim>()
168 .template get_default_linear_mapping<dim, spacedim>()),
169 const unsigned int random_number_seed = 5432);
170
171
206 template <int dim, int spacedim = dim>
207 void
209 const DoFHandler<dim, spacedim> &dof_handler,
210 const std::vector<std::vector<BoundingBox<spacedim>>>
211 & global_bounding_boxes,
212 ParticleHandler<dim, spacedim> &particle_handler,
213 const Mapping<dim, spacedim> & mapping =
214 (ReferenceCells::get_hypercube<dim>()
215 .template get_default_linear_mapping<dim, spacedim>()),
216 const ComponentMask & components = ComponentMask(),
217 const std::vector<std::vector<double>> &properties = {});
218
250 template <int dim, int spacedim = dim>
251 void
254 const Quadrature<dim> & quadrature,
255 const std::vector<std::vector<BoundingBox<spacedim>>>
256 & global_bounding_boxes,
257 ParticleHandler<dim, spacedim> &particle_handler,
258 const Mapping<dim, spacedim> & mapping =
259 (ReferenceCells::get_hypercube<dim>()
260 .template get_default_linear_mapping<dim, spacedim>()),
261 const std::vector<std::vector<double>> &properties = {});
262 } // namespace Generators
263} // namespace Particles
264
266
267#endif
Definition: point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
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=(ReferenceCells::get_hypercube< dim >() .template get_default_linear_mapping< dim, spacedim >()), const unsigned int random_number_seed=5432)
Definition: generators.cc:229
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=(ReferenceCells::get_hypercube< dim >() .template get_default_linear_mapping< dim, spacedim >()), const ComponentMask &components=ComponentMask(), const std::vector< std::vector< double > > &properties={})
Definition: generators.cc:414
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=(ReferenceCells::get_hypercube< dim >() .template get_default_linear_mapping< dim, spacedim >()), const std::vector< std::vector< double > > &properties={})
Definition: generators.cc:451
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=(ReferenceCells::get_hypercube< dim >() .template get_default_linear_mapping< dim, spacedim >()))
Definition: generators.cc:169
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=(ReferenceCells::get_hypercube< dim >() .template get_default_linear_mapping< dim, spacedim >()))
Definition: generators.cc:113
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation