Reference documentation for deal.II version 9.6.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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2019 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_particles_particle_generator_h
16#define dealii_particles_particle_generator_h
17
18#include <deal.II/base/config.h>
19
22
24
26
27#include <deal.II/fe/mapping.h>
28
31
32#include <random>
33
35
36namespace Particles
37{
42 namespace Generators
43 {
63 template <int dim, int spacedim = dim>
64 void
67 const std::vector<Point<dim>> &particle_reference_locations,
68 ParticleHandler<dim, spacedim> &particle_handler,
69 const Mapping<dim, spacedim> &mapping =
71#ifndef _MSC_VER
73#else
75#endif
76 ));
77
107 template <int dim, int spacedim = dim>
111 const types::particle_index id,
112 std::mt19937 &random_number_generator,
113 const Mapping<dim, spacedim> &mapping =
115#ifndef _MSC_VER
117#else
119#endif
120 ));
121
128 template <int dim, int spacedim = dim>
132 const types::particle_index id,
133 std::mt19937 &random_number_generator,
134 ParticleHandler<dim, spacedim> &particle_handler,
135 const Mapping<dim, spacedim> &mapping =
137#ifndef _MSC_VER
139#else
141#endif
142 ));
143
188 template <int dim, int spacedim = dim>
189 void
192 const Function<spacedim> &probability_density_function,
193 const bool random_cell_selection,
194 const types::particle_index n_particles_to_create,
195 ParticleHandler<dim, spacedim> &particle_handler,
196 const Mapping<dim, spacedim> &mapping =
198#ifndef _MSC_VER
200#else
202#endif
203 const unsigned int random_number_seed = 5432);
204
205
240 template <int dim, int spacedim = dim>
241 void
243 const DoFHandler<dim, spacedim> &dof_handler,
244 const std::vector<std::vector<BoundingBox<spacedim>>>
245 &global_bounding_boxes,
246 ParticleHandler<dim, spacedim> &particle_handler,
247 const Mapping<dim, spacedim> &mapping =
249#ifndef _MSC_VER
251#else
253#endif
254 const ComponentMask &components = {},
255 const std::vector<std::vector<double>> &properties = {});
256
291 template <int dim, int spacedim = dim>
292 void
295 const Quadrature<dim> &quadrature,
296 const std::vector<std::vector<BoundingBox<spacedim>>>
297 &global_bounding_boxes,
298 ParticleHandler<dim, spacedim> &particle_handler,
299 const Mapping<dim, spacedim> &mapping =
302 const std::vector<std::vector<double>> &properties = {});
303 } // namespace Generators
304} // namespace Particles
305
307
308#endif
Abstract base class for mapping classes.
Definition mapping.h:318
Definition point.h:111
const Mapping< dim, spacedim > & get_default_linear_mapping() const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
Definition mapping.cc:294
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)
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 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={}, const std::vector< std::vector< double > > &properties={})
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 >()))
constexpr const ReferenceCell & get_hypercube()
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation