that generates particles at support points or at gauss quadrature points.
Note that we do not check for the size of the properties and the number of particles
as this is done within insert global particles.
* @param[in] mapping An optional mapping object that is used to map
* the DOF locations. If no mapping is provided a MappingQ1 is assumed.
*
+ * @param[in] properties An optional vector of vector of properties
+ * for each particles to be inserted.
+ *
* @param[in] components Component mask that decides which subset of the
* support points of the dof_handler are used to generate the particles.
*
ParticleHandler<dim, spacedim> &particle_handler,
const Mapping<dim, spacedim> & mapping =
StaticMappingQ1<dim, spacedim>::mapping,
+ const std::vector<std::vector<double>> &properties =
+ std::vector<std::vector<double>>(),
const ComponentMask &components = ComponentMask());
/**
* the quadrature locations. If no mapping is provided a MappingQ1 is
* assumed.
*
+ * @param[in] properties An optional vector of vector of properties
+ * for each particles to be inserted.
+ *
* @author Bruno Blais, Luca Heltai, 2019
*/
template <int dim, int spacedim = dim>
& global_bounding_boxes,
ParticleHandler<dim, spacedim> &particle_handler,
const Mapping<dim, spacedim> & mapping =
- StaticMappingQ1<dim, spacedim>::mapping);
+ StaticMappingQ1<dim, spacedim>::mapping,
+ const std::vector<std::vector<double>> &properties =
+ std::vector<std::vector<double>>());
} // namespace Generators
} // namespace Particles
& global_bounding_boxes,
ParticleHandler<dim, spacedim> &particle_handler,
const Mapping<dim, spacedim> & mapping,
- const ComponentMask & components)
+ const std::vector<std::vector<double>> &properties,
+ const ComponentMask & components)
{
const auto &fe = dof_handler.get_fe();
support_points_vec.push_back(element.second);
particle_handler.insert_global_particles(support_points_vec,
- global_bounding_boxes);
+ global_bounding_boxes,
+ properties);
}
const Quadrature<dim> & quadrature,
// const std::vector<Point<dim>> & particle_reference_locations,
const std::vector<std::vector<BoundingBox<spacedim>>>
- & global_bounding_boxes,
- ParticleHandler<dim, spacedim> &particle_handler,
- const Mapping<dim, spacedim> & mapping)
+ & global_bounding_boxes,
+ ParticleHandler<dim, spacedim> & particle_handler,
+ const Mapping<dim, spacedim> & mapping,
+ const std::vector<std::vector<double>> &properties)
{
const std::vector<Point<dim>> &particle_reference_locations =
quadrature.get_points();
ParticleHandler<deal_II_dimension, deal_II_space_dimension>
&particle_handler,
const Mapping<deal_II_dimension, deal_II_space_dimension> &mapping,
+ const std::vector<std::vector<double>> & properties,
const ComponentMask &components);
template void
&global_bounding_boxes,
ParticleHandler<deal_II_dimension, deal_II_space_dimension>
&particle_handler,
- const Mapping<deal_II_dimension, deal_II_space_dimension> &mapping);
+ const Mapping<deal_II_dimension, deal_II_space_dimension> &mapping,
+ const std::vector<std::vector<double>> &properties);
\}
\}