deal.II version GIT relicensing-2114-gd9582acac8 2024-11-06 19:20:00+00:00
|
#include <deal.II/particles/particle_accessor.h>
Classes | |
struct | ParticlesInCell |
Public Types | |
using | particle_container = std::list< ParticlesInCell > |
Private Member Functions | |
ParticleAccessor () | |
ParticleAccessor (const typename particle_container::iterator particles_in_cell, const PropertyPool< dim, spacedim > &property_pool, const unsigned int particle_index_within_cell) | |
const PropertyPool< dim, spacedim >::Handle & | get_handle () const |
PropertyPool< dim, spacedim >::Handle & | get_handle () |
Private Attributes | |
particle_container::iterator | particles_in_cell |
PropertyPool< dim, spacedim > * | property_pool |
unsigned int | particle_index_within_cell |
Friends | |
template<int , int > | |
class | ParticleIterator |
template<int , int > | |
class | ParticleHandler |
Accessor class used by ParticleIterator to access particle data.
Definition at line 44 of file particle_accessor.h.
using Particles::ParticleAccessor< dim, spacedim >::particle_container = std::list<ParticlesInCell> |
A type for the storage container for particles.
Definition at line 112 of file particle_accessor.h.
|
inlineprivate |
Construct an invalid accessor. Such an object is not usable.
Definition at line 546 of file particle_accessor.h.
|
inlineprivate |
Construct an accessor from a reference to a container, an iterator to the current cell, and the particle index within that cell. This constructor is private
so that it can only be accessed by friend classes.
Definition at line 555 of file particle_accessor.h.
|
inline |
Write particle data into a data array. The array is expected to be large enough to take the data, and the void pointer should point to the first entry of the array to which the data should be written. This function is meant for serializing all particle properties and later de-serializing the properties by calling the appropriate constructor Particle(void *&data, PropertyPool *property_pool = nullptr);
[in] | data | The memory location to write particle data into. |
Definition at line 605 of file particle_accessor.h.
|
inline |
Update all of the data associated with a particle: id, location, reference location and, if any, properties by using a data array. The array is expected to be large enough to take the data, and the void pointer should point to the first entry of the array to which the data should be written. This function is meant for de-serializing the particle data without requiring that a new Particle class be built. This is used in the ParticleHandler to update the ghost particles without de-allocating and re-allocating memory.
[in] | data | A pointer to a memory location from which to read the information that completely describes a particle. This class then de-serializes its data from this memory location. |
Definition at line 568 of file particle_accessor.h.
|
inline |
Set the location of this particle. Note that this does not check whether this is a valid location in the simulation domain.
[in] | new_location | The new location for this particle. |
const
objects that shouldn't be modified even if the objects allow for calls that modify properties. Rather, properties should only be modified on processors that actually own the particle. Definition at line 639 of file particle_accessor.h.
|
inline |
Get read-access to the location of this particle.
Definition at line 650 of file particle_accessor.h.
|
inline |
Get read- and write-access to the location of this particle. Note that changing the location does not check whether this is a valid location in the simulation domain.
const
objects that shouldn't be modified even if the objects allow for calls that modify properties. Rather, properties should only be modified on processors that actually own the particle.Definition at line 661 of file particle_accessor.h.
|
inline |
Set the reference location of this particle.
[in] | new_reference_location | The new reference location for this particle. |
const
objects that shouldn't be modified even if the objects allow for calls that modify properties. Rather, properties should only be modified on processors that actually own the particle. Definition at line 672 of file particle_accessor.h.
|
inline |
Return the reference location of this particle in its current cell.
Definition at line 684 of file particle_accessor.h.
|
inline |
Set the ID number of this particle.
Definition at line 717 of file particle_accessor.h.
|
inline |
Return the ID number of this particle.
Definition at line 695 of file particle_accessor.h.
|
inline |
Return a particle ID number local to each MPI process. This number enables the direct array access (similar to LinearAlgebra::distributed::Vector::local_element()) to quantities used for local computations. Use ParticleHandler::get_max_local_particle_index() to query suitable array sizes.
Definition at line 706 of file particle_accessor.h.
|
inline |
Return whether this particle has a valid property pool and a valid handle to properties.
Definition at line 728 of file particle_accessor.h.
|
inline |
Set the properties of this particle.
[in] | new_properties | A vector containing the new properties for this particle. |
const
objects that shouldn't be modified even if the objects allow for calls that modify properties. Rather, properties should only be modified on processors that actually own the particle. Definition at line 746 of file particle_accessor.h.
|
inline |
Set the properties of this particle.
[in] | new_properties | An ArrayView pointing to memory locations containing the new properties for this particle. |
const
objects that shouldn't be modified even if the objects allow for calls that modify properties. Rather, properties should only be modified on processors that actually own the particle. Definition at line 759 of file particle_accessor.h.
|
inline |
Set the properties of this particle, assuming that the properties stored on this particle correspond to a rank-1 Tensor object. In particular, this means that the number of properties stored on the particle must equal dim
.
[in] | new_properties | A Tensor containing the new properties for this particle. |
const
objects that shouldn't be modified even if the objects allow for calls that modify properties. Rather, properties should only be modified on processors that actually own the particle. Definition at line 786 of file particle_accessor.h.
|
inline |
Get write-access to properties of this particle.
Definition at line 329 of file particle_accessor.h.
|
inline |
Get read-access to properties of this particle.
Definition at line 805 of file particle_accessor.h.
|
inline |
Return the size in bytes this particle occupies if all of its data is serialized (i.e. the number of bytes that is written by the write_data function of this class).
Definition at line 835 of file particle_accessor.h.
|
inline |
Get a cell iterator to the cell surrounding the current particle.
Definition at line 816 of file particle_accessor.h.
|
inline |
Write the data of this object to a stream for the purpose of serialization using the BOOST serialization library.
Definition at line 524 of file particle_accessor.h.
|
inline |
Read the data of this object from a stream for the purpose of serialization using the BOOST serialization library.
Definition at line 490 of file particle_accessor.h.
void Particles::ParticleAccessor< dim, spacedim >::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Write and read the data of this object from a stream for the purpose of serialization using the BOOST serialization library.
|
inline |
Advance the ParticleAccessor to the next particle.
Definition at line 854 of file particle_accessor.h.
|
inline |
Move the ParticleAccessor to the previous particle.
Definition at line 871 of file particle_accessor.h.
|
inline |
Inequality operator.
Definition at line 890 of file particle_accessor.h.
|
inline |
Equality operator.
Definition at line 900 of file particle_accessor.h.
|
inline |
Return the state of the accessor.
Definition at line 912 of file particle_accessor.h.
|
inlineprivate |
Returns a reference to the current Particle. Because the internal structure may change this is not intended for public use and only a convenience function for internal purposes.
Definition at line 941 of file particle_accessor.h.
|
inlineprivate |
Non-const
version of the function with the same name above.
Definition at line 932 of file particle_accessor.h.
Definition at line 480 of file particle_accessor.h.
Definition at line 482 of file particle_accessor.h.
|
private |
An iterator to the particles in the current cell within the particle_container object.
Definition at line 465 of file particle_accessor.h.
|
private |
A pointer to the property pool that stores the actual particle data.
Definition at line 470 of file particle_accessor.h.
|
private |
Local index of the particle within its current cell.
Definition at line 475 of file particle_accessor.h.