![]() |
Reference documentation for deal.II version 9.5.1
|
#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 45 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 113 of file particle_accessor.h.
|
inlineprivate |
Construct an invalid accessor. Such an object is not usable.
Definition at line 540 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 549 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 599 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 562 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 633 of file particle_accessor.h.
|
inline |
Get the location of this particle.
Definition at line 644 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 655 of file particle_accessor.h.
|
inline |
Return the reference location of this particle in its current cell.
Definition at line 667 of file particle_accessor.h.
|
inline |
Set the ID number of this particle.
Definition at line 700 of file particle_accessor.h.
|
inline |
Return the ID number of this particle.
Definition at line 678 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 689 of file particle_accessor.h.
|
inline |
Return whether this particle has a valid property pool and a valid handle to properties.
Definition at line 711 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 729 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 742 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 769 of file particle_accessor.h.
|
inline |
Get write-access to properties of this particle.
Definition at line 837 of file particle_accessor.h.
|
inline |
Get read-access to properties of this particle.
Definition at line 788 of file particle_accessor.h.
|
inline |
Tell the particle where to store its properties (even if it does not own properties). Usually this is only done once per particle, but since the particle generator does not know about the properties we want to do it not at construction time. Another use for this function is after particle transfer to a new process.
Definition at line 799 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 848 of file particle_accessor.h.
|
inline |
Get a cell iterator to the cell surrounding the current particle. As particles are organized in the structure of a triangulation, but the triangulation itself is not stored in the particle this operation requires a reference to the triangulation.
Definition at line 810 of file particle_accessor.h.
|
inline |
Definition at line 823 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 518 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. Note that in order to store the properties correctly, the property pool of this particle has to be known at the time of reading, i.e. set_property_pool() has to have been called, before this function is called.
Definition at line 484 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 866 of file particle_accessor.h.
|
inline |
Move the ParticleAccessor to the previous particle.
Definition at line 883 of file particle_accessor.h.
|
inline |
Inequality operator.
Definition at line 902 of file particle_accessor.h.
|
inline |
Equality operator.
Definition at line 912 of file particle_accessor.h.
|
inline |
Return the state of the accessor.
Definition at line 924 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 953 of file particle_accessor.h.
|
inlineprivate |
Non-const version of the function with the same name above.
Definition at line 944 of file particle_accessor.h.
Definition at line 474 of file particle_accessor.h.
Definition at line 476 of file particle_accessor.h.
|
private |
An iterator to the particles in the current cell within the particle_container object.
Definition at line 459 of file particle_accessor.h.
|
private |
A pointer to the property pool that stores the actual particle data.
Definition at line 464 of file particle_accessor.h.
|
private |
Local index of the particle within its current cell.
Definition at line 469 of file particle_accessor.h.