Reference documentation for deal.II version 9.5.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\}}\)
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>
29
32
33#include <random>
34
36
37namespace Particles
38{
43 namespace Generators
44 {
64 template <int dim, int spacedim = dim>
65 void
68 const std::vector<Point<dim>> & particle_reference_locations,
69 ParticleHandler<dim, spacedim> & particle_handler,
70 const Mapping<dim, spacedim> & mapping =
71 (ReferenceCells::get_hypercube<dim>()
72#ifndef _MSC_VER
73 .template get_default_linear_mapping<dim, spacedim>()
74#else
75 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()
76#endif
77 ));
78
108 template <int dim, int spacedim = dim>
112 const types::particle_index id,
113 std::mt19937 & random_number_generator,
114 const Mapping<dim, spacedim> &mapping =
115 (ReferenceCells::get_hypercube<dim>()
116#ifndef _MSC_VER
117 .template get_default_linear_mapping<dim, spacedim>()
118#else
119 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()
120#endif
121 ));
122
129 template <int dim, int spacedim = dim>
133 const types::particle_index id,
134 std::mt19937 & random_number_generator,
135 ParticleHandler<dim, spacedim> &particle_handler,
136 const Mapping<dim, spacedim> & mapping =
137 (ReferenceCells::get_hypercube<dim>()
138#ifndef _MSC_VER
139 .template get_default_linear_mapping<dim, spacedim>()
140#else
141 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()
142#endif
143 ));
144
189 template <int dim, int spacedim = dim>
190 void
193 const Function<spacedim> & probability_density_function,
194 const bool random_cell_selection,
195 const types::particle_index n_particles_to_create,
196 ParticleHandler<dim, spacedim> & particle_handler,
197 const Mapping<dim, spacedim> & mapping =
198 (ReferenceCells::get_hypercube<dim>()
199#ifndef _MSC_VER
200 .template get_default_linear_mapping<dim, spacedim>()),
201#else
202 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()),
203#endif
204 const unsigned int random_number_seed = 5432);
205
206
241 template <int dim, int spacedim = dim>
242 void
244 const DoFHandler<dim, spacedim> &dof_handler,
245 const std::vector<std::vector<BoundingBox<spacedim>>>
246 & global_bounding_boxes,
247 ParticleHandler<dim, spacedim> &particle_handler,
248 const Mapping<dim, spacedim> & mapping =
249 (ReferenceCells::get_hypercube<dim>()
250#ifndef _MSC_VER
251 .template get_default_linear_mapping<dim, spacedim>()),
252#else
253 .ReferenceCell::get_default_linear_mapping<dim, spacedim>()),
254#endif
255 const ComponentMask & components = ComponentMask(),
256 const std::vector<std::vector<double>> &properties = {});
257
292 template <int dim, int spacedim = dim>
293 void
296 const Quadrature<dim> & quadrature,
297 const std::vector<std::vector<BoundingBox<spacedim>>>
298 & global_bounding_boxes,
299 ParticleHandler<dim, spacedim> &particle_handler,
300 const Mapping<dim, spacedim> & mapping =
301 (ReferenceCells::get_hypercube<dim>()
302 .template get_default_linear_mapping<dim, spacedim>()),
303 const std::vector<std::vector<double>> &properties = {});
304 } // namespace Generators
305} // namespace Particles
306
308
309#endif
Abstract base class for mapping classes.
Definition mapping.h:317
Definition point.h:112
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
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)
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={})
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 >()))
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={})
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 >()))
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 >()))
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation