Reference documentation for deal.II version 9.4.1
\(\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\}}\)
Loading...
Searching...
No Matches
generators.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2019 - 2022 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#ifndef _MSC_VER
74 .template get_default_linear_mapping<dim, spacedim>()
75#else
76 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()
77#endif
78 ));
79
109 template <int dim, int spacedim = dim>
113 const types::particle_index id,
114 std::mt19937 & random_number_generator,
115 const Mapping<dim, spacedim> &mapping =
116 (ReferenceCells::get_hypercube<dim>()
117#ifndef _MSC_VER
118 .template get_default_linear_mapping<dim, spacedim>()
119#else
120 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()
121#endif
122 ));
123
130 template <int dim, int spacedim = dim>
134 const types::particle_index id,
135 std::mt19937 & random_number_generator,
136 ParticleHandler<dim, spacedim> &particle_handler,
137 const Mapping<dim, spacedim> & mapping =
138 (ReferenceCells::get_hypercube<dim>()
139#ifndef _MSC_VER
140 .template get_default_linear_mapping<dim, spacedim>()
141#else
142 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()
143#endif
144 ));
145
190 template <int dim, int spacedim = dim>
191 void
194 const Function<spacedim> & probability_density_function,
195 const bool random_cell_selection,
196 const types::particle_index n_particles_to_create,
197 ParticleHandler<dim, spacedim> & particle_handler,
198 const Mapping<dim, spacedim> & mapping =
199 (ReferenceCells::get_hypercube<dim>()
200#ifndef _MSC_VER
201 .template get_default_linear_mapping<dim, spacedim>()),
202#else
203 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()),
204#endif
205 const unsigned int random_number_seed = 5432);
206
207
242 template <int dim, int spacedim = dim>
243 void
245 const DoFHandler<dim, spacedim> &dof_handler,
246 const std::vector<std::vector<BoundingBox<spacedim>>>
247 & global_bounding_boxes,
248 ParticleHandler<dim, spacedim> &particle_handler,
249 const Mapping<dim, spacedim> & mapping =
250 (ReferenceCells::get_hypercube<dim>()
251#ifndef _MSC_VER
252 .template get_default_linear_mapping<dim, spacedim>()),
253#else
254 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()),
255#endif
256 const ComponentMask & components = ComponentMask(),
257 const std::vector<std::vector<double>> &properties = {});
258
290 template <int dim, int spacedim = dim>
291 void
294 const Quadrature<dim> & quadrature,
295 const std::vector<std::vector<BoundingBox<spacedim>>>
296 & global_bounding_boxes,
297 ParticleHandler<dim, spacedim> &particle_handler,
298 const Mapping<dim, spacedim> & mapping =
299 (ReferenceCells::get_hypercube<dim>()
300 .template get_default_linear_mapping<dim, spacedim>()),
301 const std::vector<std::vector<double>> &properties = {});
302 } // namespace Generators
303} // namespace Particles
304
306
307#endif
Abstract base class for mapping classes.
Definition: mapping.h:311
Definition: point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
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:276
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:456
ParticleIterator< dim, spacedim > random_particle_in_cell_insert(const typename Triangulation< dim, spacedim >::active_cell_iterator &cell, const types::particle_index id, std::mt19937 &random_number_generator, ParticleHandler< dim, spacedim > &particle_handler, const Mapping< dim, spacedim > &mapping=(ReferenceCells::get_hypercube< dim >() .template get_default_linear_mapping< dim, spacedim >()))
Definition: generators.cc:256
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:493
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:239
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:183
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation