47 <<
"Your probability density function in the particle generator "
48 "returned a negative value for the following position: "
49 <<
arg1 <<
". Please check your function expression.");
62 template <
int dim,
int spacedim = dim>
87 for (
const auto &cell :
triangulation.active_cell_iterators())
89 if (cell->is_locally_owned())
91 fe_values.reinit(cell);
94 fe_values.get_quadrature_points()[0]);
117 template <
int dim,
int spacedim>
124 Assert(cell->reference_cell().is_hyper_cube() ==
true,
141 for (
unsigned int d = 0;
d < spacedim; ++
d)
151 mapping.transform_real_to_unit_cell(cell, position);
168 for (
unsigned int d = 0;
d < dim; ++
d)
181 template <
int dim,
int spacedim>
193#ifdef DEAL_II_WITH_MPI
194 if (
const auto tria =
208 tria->get_communicator());
216 for (
const auto &cell :
triangulation.active_cell_iterators() |
237 template <
int dim,
int spacedim>
254 template <
int dim,
int spacedim>
274 template <
int dim,
int spacedim>
286 if (
const auto tria =
290 const unsigned int my_rank =
317 if (
const auto tria =
323 tria->get_communicator());
332 "The integral of the user prescribed probability "
333 "density function over the domain equals zero, "
334 "deal.II has no way to determine the cell of "
335 "generated particles. Please ensure that the "
336 "provided function is positive in at least a "
337 "part of the domain; also check the syntax of "
344#ifdef DEAL_II_WITH_MPI
345 if (
const auto tria =
354 tria->get_communicator());
405 for (
const auto &cell :
triangulation.active_cell_iterators() |
431 for (
const auto &cell :
triangulation.active_cell_iterators() |
434 for (
unsigned int i = 0;
454 template <
int dim,
int spacedim>
462 const std::vector<std::vector<double>> &properties)
464 const auto &fe = dof_handler.get_fe();
471 const std::map<types::global_dof_index, Point<spacedim>>
488 template <
int dim,
int spacedim>
498 const std::vector<std::vector<double>> &properties)
501 quadrature.get_points();
507 for (
const auto &cell :
triangulation.active_cell_iterators() |
524#include "generators.inst"
unsigned int size() const
Abstract base class for mapping classes.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertThrowMPI(error_code)
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
@ update_JxW_values
Transformed quadrature weights.
@ update_quadrature_points
Transformed quadrature points.
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 >()))
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
T sum(const T &t, const MPI_Comm mpi_communicator)
unsigned int this_mpi_process(const MPI_Comm mpi_communicator)
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation
#define DEAL_II_PARTICLE_INDEX_MPI_TYPE
const ::Triangulation< dim, spacedim > & tria