ASPECT
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
aspect::Particle::ParticleHandler< dim, spacedim > Class Template Reference
Inheritance diagram for aspect::Particle::ParticleHandler< dim, spacedim >:
Inheritance graph
[legend]

Public Types

typedef ParticleIterator< dim, spacedim > particle_iterator
 
typedef boost::iterator_range< particle_iteratorparticle_iterator_range
 

Public Member Functions

 ParticleHandler ()
 
 ParticleHandler (const parallel::distributed::Triangulation< dim, spacedim > &tria, const Mapping< dim, spacedim > &mapping, const unsigned int n_properties=0)
 
 ~ParticleHandler ()
 
void initialize (const parallel::distributed::Triangulation< dim, spacedim > &tria, const Mapping< dim, spacedim > &mapping, const unsigned int n_properties=0)
 
void clear ()
 
void clear_particles ()
 
ParticleHandler< dim, spacedim >::particle_iterator begin () const
 
particle_iterator begin ()
 
particle_iterator end () const
 
particle_iterator end ()
 
particle_iterator_range particles_in_cell (const typename parallel::distributed::Triangulation< dim, spacedim >::active_cell_iterator &cell)
 
particle_iterator_range particles_in_cell (const typename parallel::distributed::Triangulation< dim, spacedim >::active_cell_iterator &cell) const
 
void remove_particle (const particle_iterator &particle)
 
particle_iterator insert_particle (const Particle< dim, spacedim > &particle, const typename parallel::distributed::Triangulation< dim >::active_cell_iterator &cell)
 
void insert_particles (const std::multimap< Particles::internal::LevelInd, Particle< dim, spacedim > > &particles)
 
void insert_particles (const std::multimap< typename Triangulation< dim, spacedim >::active_cell_iterator, Particle< dim, spacedim > > &particles)
 
void register_additional_store_load_functions (const std::function< std::size_t()> &size_callback, const std::function< void *(const particle_iterator &, void *)> &store_callback, const std::function< const void *(const particle_iterator &, const void *)> &load_callback)
 
types::particle_index n_global_particles () const
 
types::particle_index n_locally_owned_particles () const
 
unsigned int n_global_max_particles_per_cell () const
 
types::particle_index get_next_free_particle_index () const
 
unsigned int n_properties_per_particle () const
 
void update_cached_numbers ()
 
PropertyPoolget_property_pool () const
 
unsigned int n_particles_in_cell (const typename Triangulation< dim, spacedim >::active_cell_iterator &cell) const
 
std::vector< std::vector< Tensor< 1, spacedim > > > vertex_to_cell_centers_directions (const std::vector< std::set< typename parallel::distributed::Triangulation< dim, spacedim >::active_cell_iterator > > &vertex_to_cells) const
 
void sort_particles_into_subdomains_and_cells ()
 
void exchange_ghost_particles ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
std::enable_if< std::is_same< ConstCharStar, const char *>::value >::type subscribe (std::atomic< bool > *const validity, ConstCharStar identifier=nullptr) const
 
void subscribe (std::atomic< bool > *const validity, const char *&&identifier) const=delete
 
void unsubscribe (std::atomic< bool > *const validity, const char *identifier=nullptr) const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
void serialize (Archive &ar, const unsigned int version)
 

Private Types

typedef parallel::distributed::Triangulation< dim, spacedim >::active_cell_iterator active_cell_it
 

Private Member Functions

void update_n_global_particles ()
 
void update_global_max_particles_per_cell ()
 
void update_next_free_particle_index ()
 
void send_recv_particles (const std::vector< std::vector< particle_iterator > > &particles_to_send, std::multimap< Particles::internal::LevelInd, Particle< dim > > &received_particles, const std::vector< std::vector< active_cell_it > > &new_cells_for_particles=std::vector< std::vector< active_cell_it > >())
 
void register_store_callback_function (const bool serialization)
 
void register_load_callback_function (const bool serialization)
 
void store_particles (const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator &cell, const typename parallel::distributed::Triangulation< dim, spacedim >::CellStatus status, void *data) const
 
void load_particles (const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator &cell, const typename parallel::distributed::Triangulation< dim, spacedim >::CellStatus status, const void *data)
 
std::map< types::subdomain_id, unsigned int > get_subdomain_id_to_neighbor_map () const
 

Private Attributes

SmartPointer< const parallel::distributed::Triangulation< dim, spacedim >, ParticleHandler< dim, spacedim > > triangulation
 
SmartPointer< const Mapping< dim, spacedim >, ParticleHandler< dim, spacedim > > mapping
 
std::multimap< Particles::internal::LevelInd, Particle< dim, spacedim > > particles
 
std::multimap< Particles::internal::LevelInd, Particle< dim, spacedim > > ghost_particles
 
types::particle_index global_number_of_particles
 
unsigned int global_max_particles_per_cell
 
types::particle_index next_free_particle_index
 
std::unique_ptr< PropertyPoolproperty_pool
 
std::function< std::size_t()> size_callback
 
std::function< void *(const particle_iterator &, void *)> store_callback
 
std::function< const void *(const particle_iterator &, const void *)> load_callback
 
unsigned int data_offset
 

Friends

template<int >
class World
 

Additional Inherited Members

- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Detailed Description

template<int dim, int spacedim = dim>
class aspect::Particle::ParticleHandler< dim, spacedim >

This class manages the storage and handling of particles. It provides the data structures necessary to store particles efficiently, accessor functions to iterate over particles and find particles, and algorithms to distribute particles in parallel domains.

Definition at line 39 of file particle_accessor.h.

Member Typedef Documentation

§ particle_iterator

template<int dim, int spacedim = dim>
typedef ParticleIterator<dim,spacedim> aspect::Particle::ParticleHandler< dim, spacedim >::particle_iterator

A type that can be used to iterate over all particles in the domain.

Definition at line 66 of file particle_handler.h.

§ particle_iterator_range

template<int dim, int spacedim = dim>
typedef boost::iterator_range<particle_iterator> aspect::Particle::ParticleHandler< dim, spacedim >::particle_iterator_range

A type that represents a range of particles.

Definition at line 71 of file particle_handler.h.

§ active_cell_it

template<int dim, int spacedim = dim>
typedef parallel::distributed::Triangulation<dim,spacedim>::active_cell_iterator aspect::Particle::ParticleHandler< dim, spacedim >::active_cell_it
private

A private typedef for cell iterator that makes the code of this class easier to read.

Definition at line 320 of file particle_handler.h.

Constructor & Destructor Documentation

§ ParticleHandler() [1/2]

template<int dim, int spacedim = dim>
aspect::Particle::ParticleHandler< dim, spacedim >::ParticleHandler ( )

Default constructor.

§ ParticleHandler() [2/2]

template<int dim, int spacedim = dim>
aspect::Particle::ParticleHandler< dim, spacedim >::ParticleHandler ( const parallel::distributed::Triangulation< dim, spacedim > &  tria,
const Mapping< dim, spacedim > &  mapping,
const unsigned int  n_properties = 0 
)

Constructor that initializes the particle handler with respect to a given triangulation and MPI communicator. Pointers to the triangulation and the communicator are stored inside of the particle

§ ~ParticleHandler()

template<int dim, int spacedim = dim>
aspect::Particle::ParticleHandler< dim, spacedim >::~ParticleHandler ( )

Destructor.

Member Function Documentation

§ initialize()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::initialize ( const parallel::distributed::Triangulation< dim, spacedim > &  tria,
const Mapping< dim, spacedim > &  mapping,
const unsigned int  n_properties = 0 
)

Initialize the particle handler. This function does not clear the internal data structures, it just sets the connections to the MPI communicator and the triangulation.

§ clear()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::clear ( )

Clear all particle related data.

§ clear_particles()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::clear_particles ( )

Only clear particle data, but keep cache information about number of particles. This is useful during reorganization of particle data between processes.

§ begin() [1/2]

template<int dim, int spacedim = dim>
ParticleHandler<dim,spacedim>::particle_iterator aspect::Particle::ParticleHandler< dim, spacedim >::begin ( ) const

Return an iterator to the first particle.

§ begin() [2/2]

template<int dim, int spacedim = dim>
particle_iterator aspect::Particle::ParticleHandler< dim, spacedim >::begin ( )

Return an iterator to the first particle.

§ end() [1/2]

template<int dim, int spacedim = dim>
particle_iterator aspect::Particle::ParticleHandler< dim, spacedim >::end ( ) const

Return an iterator past the end of the particles.

§ end() [2/2]

template<int dim, int spacedim = dim>
particle_iterator aspect::Particle::ParticleHandler< dim, spacedim >::end ( )

Return an iterator past the end of the particles.

§ particles_in_cell() [1/2]

template<int dim, int spacedim = dim>
particle_iterator_range aspect::Particle::ParticleHandler< dim, spacedim >::particles_in_cell ( const typename parallel::distributed::Triangulation< dim, spacedim >::active_cell_iterator cell)

Return a pair of particle iterators that mark the begin and end of the particles in a particular cell. The last iterator is the first particle that is no longer in the cell.

§ particles_in_cell() [2/2]

template<int dim, int spacedim = dim>
particle_iterator_range aspect::Particle::ParticleHandler< dim, spacedim >::particles_in_cell ( const typename parallel::distributed::Triangulation< dim, spacedim >::active_cell_iterator cell) const

Return a pair of particle iterators that mark the begin and end of the particles in a particular cell. The last iterator is the first particle that is no longer in the cell.

§ remove_particle()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::remove_particle ( const particle_iterator particle)

Remove a particle pointed to by the iterator.

§ insert_particle()

template<int dim, int spacedim = dim>
particle_iterator aspect::Particle::ParticleHandler< dim, spacedim >::insert_particle ( const Particle< dim, spacedim > &  particle,
const typename parallel::distributed::Triangulation< dim >::active_cell_iterator cell 
)

Insert a particle into the collection of particles. Return an iterator to the new position of the particle. This function involves a copy of the particle and its properties. Note that this function is of $O(N \log N)$ complexity for $N$ particles.

§ insert_particles() [1/2]

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::insert_particles ( const std::multimap< Particles::internal::LevelInd, Particle< dim, spacedim > > &  particles)

Insert a number of particle into the collection of particles. This function involves a copy of the particles and their properties. Note that this function is of O(n_existing_particles + n_particles) complexity.

§ insert_particles() [2/2]

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::insert_particles ( const std::multimap< typename Triangulation< dim, spacedim >::active_cell_iterator, Particle< dim, spacedim > > &  particles)

Insert a number of particles into the collection of particles. This function involves a copy of the particles and their properties. Note that this function is of O(n_existing_particles + n_particles) complexity.

§ register_additional_store_load_functions()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::register_additional_store_load_functions ( const std::function< std::size_t()> &  size_callback,
const std::function< void *(const particle_iterator &, void *)> &  store_callback,
const std::function< const void *(const particle_iterator &, const void *)> &  load_callback 
)

This function allows to register three additional functions that are called every time a particle is transferred to another process (i.e. during sorting into cells, during ghost particle transfer, or during serialization of all particles).

Parameters
size_callbackA function that is called when serializing particle data. The function gets no arguments and is expected to return the size of the additional data that is serialized per particle. Note that this currently implies the data size has to be the same for every particle.
store_callbackA function that is called once per particle when serializing particle data. Arguments to the function are a particle iterator that identifies the current particle and a void pointer that points to a data block of size size_callback() in which the function can store additional data. The function is expected to return a void pointer pointing to a position right after its data block.
load_callbackA function that is called once per particle when deserializing particle data. Arguments to the function are a particle iterator that identifies the current particle and a void pointer that points to a data block of size size_callback() in which additional data was stored by the store_callback function. The function is expected to return a void pointer pointing to a position right after its data block.

§ n_global_particles()

template<int dim, int spacedim = dim>
types::particle_index aspect::Particle::ParticleHandler< dim, spacedim >::n_global_particles ( ) const

Return the total number of particles that were managed by this class the last time the update_n_global_particles() function was called. The actual number of particles may have changed since then if particles have been added or removed.

Returns
Total number of particles in simulation.

§ n_locally_owned_particles()

template<int dim, int spacedim = dim>
types::particle_index aspect::Particle::ParticleHandler< dim, spacedim >::n_locally_owned_particles ( ) const

Return the number of particles in the local part of the triangulation.

§ n_global_max_particles_per_cell()

template<int dim, int spacedim = dim>
unsigned int aspect::Particle::ParticleHandler< dim, spacedim >::n_global_max_particles_per_cell ( ) const

Return the number of particles in that cell of the global domain that has the highest number of particles.

§ get_next_free_particle_index()

template<int dim, int spacedim = dim>
types::particle_index aspect::Particle::ParticleHandler< dim, spacedim >::get_next_free_particle_index ( ) const

Return the number of particles in the local part of the triangulation.

§ n_properties_per_particle()

template<int dim, int spacedim = dim>
unsigned int aspect::Particle::ParticleHandler< dim, spacedim >::n_properties_per_particle ( ) const

Return the number of properties each particle has.

§ update_cached_numbers()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::update_cached_numbers ( )

This functions updates all cached numbers, e.g. the ones returned by the n_... functions. These numbers need to be updated every time the particle organization has changed. Since the update involves communication it is only done automatically by every function that acts on the whole particle collection after finishing. Functions that act on individual particles like insert_particle and remove_particle do not call this function and therefore the user is responsible for calling this function after finishing the operation.

§ get_property_pool()

template<int dim, int spacedim = dim>
PropertyPool& aspect::Particle::ParticleHandler< dim, spacedim >::get_property_pool ( ) const

Return a reference to the property pool that owns all particle properties, and organizes them physically.

§ n_particles_in_cell()

template<int dim, int spacedim = dim>
unsigned int aspect::Particle::ParticleHandler< dim, spacedim >::n_particles_in_cell ( const typename Triangulation< dim, spacedim >::active_cell_iterator cell) const

Return the number of particles in the given cell.

§ vertex_to_cell_centers_directions()

template<int dim, int spacedim = dim>
std::vector<std::vector<Tensor<1,spacedim> > > aspect::Particle::ParticleHandler< dim, spacedim >::vertex_to_cell_centers_directions ( const std::vector< std::set< typename parallel::distributed::Triangulation< dim, spacedim >::active_cell_iterator > > &  vertex_to_cells) const

Returns a vector that contains a tensor for every vertex-cell combination of the output of GridTools::vertex_to_cell_map() (which is expected as input parameter for this function). Each tensor represents a geometric vector from the vertex to the respective cell center.

§ sort_particles_into_subdomains_and_cells()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::sort_particles_into_subdomains_and_cells ( )

Finds the cells containing each particle for all locally owned particles. If particles moved out of the local subdomain they will be sent to their new process and inserted there. After this function call every particle is either on its current process and in its current cell, or deleted (if it could not find its new process or cell).

TODO: Extend this to allow keeping particles on other processes around (with an invalid cell).

§ exchange_ghost_particles()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::exchange_ghost_particles ( )

Exchanges all particles that live in cells that are ghost cells to other processes. Clears and re-populates the ghost_neighbors member variable.

§ serialize()

template<int dim, int spacedim>
template<class Archive >
void aspect::Particle::ParticleHandler< dim, spacedim >::serialize ( Archive &  ar,
const unsigned int  version 
)

Serialize the contents of this class.

Definition at line 527 of file particle_handler.h.

§ update_n_global_particles()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::update_n_global_particles ( )
private

Calculates the number of particles in the global model domain.

§ update_global_max_particles_per_cell()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::update_global_max_particles_per_cell ( )
private

Calculates and stores the number of particles in the cell that contains the most particles in the global model (stored in the member variable global_max_particles_per_cell). This variable is a state variable, because it is needed to serialize and deserialize the particle data correctly in parallel (it determines the size of the data chunks per cell that are stored and read). Before accessing the variable this function has to be called, unless the state was read from another source (e.g. after resuming from a checkpoint).

§ update_next_free_particle_index()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::update_next_free_particle_index ( )
private

Calculates the next free particle index in the global model domain. This equals one plus the highest particle index currently active.

§ send_recv_particles()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::send_recv_particles ( const std::vector< std::vector< particle_iterator > > &  particles_to_send,
std::multimap< Particles::internal::LevelInd, Particle< dim > > &  received_particles,
const std::vector< std::vector< active_cell_it > > &  new_cells_for_particles = std::vector< std::vector< active_cell_it > >() 
)
private

Transfer particles that have crossed subdomain boundaries to other processors. All received particles and their new cells will be appended to the received_particles vector.

Parameters
[in]particles_to_sendAll particles that should be sent and their new subdomain_ids are in this map.
[in,out]received_particlesVector that stores all received particles. Note that it is not required nor checked that the list is empty, received particles are simply attached to the end of the vector.
[in]new_cells_for_particlesOptional vector of cell iterators with the same structure as particles_to_send. If this parameter is given it should contain the cell iterator for every particle to be send in which the particle belongs. This parameter is necessary if the cell information of the particle iterator is outdated (e.g. after particle movement).

§ register_store_callback_function()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::register_store_callback_function ( const bool  serialization)
private

Callback function that should be called before every refinement and when writing checkpoints. Allows registering store_particles() in the triangulation.

§ register_load_callback_function()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::register_load_callback_function ( const bool  serialization)
private

Callback function that should be called after every refinement and after resuming from a checkpoint. Allows registering load_particles() in the triangulation.

§ store_particles()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::store_particles ( const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator cell,
const typename parallel::distributed::Triangulation< dim, spacedim >::CellStatus  status,
void *  data 
) const
private

Called by listener functions from Triangulation for every cell before a refinement step. All particles have to be attached to their cell to be sent around to the new processes.

§ load_particles()

template<int dim, int spacedim = dim>
void aspect::Particle::ParticleHandler< dim, spacedim >::load_particles ( const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator cell,
const typename parallel::distributed::Triangulation< dim, spacedim >::CellStatus  status,
const void *  data 
)
private

Called by listener functions after a refinement step. The local map of particles has to be read from the triangulation user_pointer.

§ get_subdomain_id_to_neighbor_map()

template<int dim, int spacedim = dim>
std::map<types::subdomain_id, unsigned int> aspect::Particle::ParticleHandler< dim, spacedim >::get_subdomain_id_to_neighbor_map ( ) const
private

Get a map between subdomain id and a contiguous number from 0 to n_neighbors, which is interpreted as the neighbor index. In other words the returned map answers the question: Given a subdomain id, which neighbor of the current processor's domain owns this subdomain?

Friends And Related Function Documentation

§ World

template<int dim, int spacedim = dim>
template<int >
friend class World
friend

Make World a friend to access private functions while we transition functionality from World to ParticleHandler. TODO: remove when done moving functionality.

Definition at line 520 of file particle_handler.h.

Member Data Documentation

§ triangulation

template<int dim, int spacedim = dim>
SmartPointer<const parallel::distributed::Triangulation<dim,spacedim>,ParticleHandler<dim,spacedim> > aspect::Particle::ParticleHandler< dim, spacedim >::triangulation
private

Address of the triangulation to work on.

Definition at line 325 of file particle_handler.h.

§ mapping

template<int dim, int spacedim = dim>
SmartPointer<const Mapping<dim,spacedim>,ParticleHandler<dim,spacedim> > aspect::Particle::ParticleHandler< dim, spacedim >::mapping
private

Address of the mapping to work on.

Definition at line 330 of file particle_handler.h.

§ particles

template<int dim, int spacedim = dim>
std::multimap<Particles::internal::LevelInd, Particle<dim,spacedim> > aspect::Particle::ParticleHandler< dim, spacedim >::particles
private

Set of particles currently in the local domain, organized by the level/index of the cell they are in.

Definition at line 336 of file particle_handler.h.

§ ghost_particles

template<int dim, int spacedim = dim>
std::multimap<Particles::internal::LevelInd, Particle<dim,spacedim> > aspect::Particle::ParticleHandler< dim, spacedim >::ghost_particles
private

Set of particles currently in the ghost cells of the local domain, organized by the level/index of the cell they are in. These particles are marked read-only.

Definition at line 343 of file particle_handler.h.

§ global_number_of_particles

template<int dim, int spacedim = dim>
types::particle_index aspect::Particle::ParticleHandler< dim, spacedim >::global_number_of_particles
private

This variable stores how many particles are stored globally. It is calculated by update_n_global_particles().

Definition at line 349 of file particle_handler.h.

§ global_max_particles_per_cell

template<int dim, int spacedim = dim>
unsigned int aspect::Particle::ParticleHandler< dim, spacedim >::global_max_particles_per_cell
private

The maximum number of particles per cell in the global domain. This variable is important to store and load particle data during repartition and serialization of the solution. Note that the variable is only updated when it is needed, e.g. after particle movement, before/after mesh refinement, before creating a checkpoint and after resuming from a checkpoint.

Definition at line 359 of file particle_handler.h.

§ next_free_particle_index

template<int dim, int spacedim = dim>
types::particle_index aspect::Particle::ParticleHandler< dim, spacedim >::next_free_particle_index
private

This variable stores the next free particle index that is available globally in case new particles need to be generated.

Definition at line 365 of file particle_handler.h.

§ property_pool

template<int dim, int spacedim = dim>
std::unique_ptr<PropertyPool> aspect::Particle::ParticleHandler< dim, spacedim >::property_pool
private

This object owns and organizes the memory for all particle properties.

Definition at line 371 of file particle_handler.h.

§ size_callback

template<int dim, int spacedim = dim>
std::function<std::size_t ()> aspect::Particle::ParticleHandler< dim, spacedim >::size_callback
private

A function that can be registered by calling register_additional_store_load_functions. It is called when serializing particle data. The function gets no arguments and is expected to return the size of the additional data that is serialized per particle. Note that this currently implies the data size has to be the same for every particle, but it does not have to be the same for every serialization process (e.g. a serialization during particle movement might include temporary data, while a serialization after movement was finished does not need to transfer this data).

Definition at line 384 of file particle_handler.h.

§ store_callback

template<int dim, int spacedim = dim>
std::function<void *(const particle_iterator &, void *)> aspect::Particle::ParticleHandler< dim, spacedim >::store_callback
private

A function that can be registered by calling register_additional_store_load_functions. It is called once per particle when serializing particle data. Arguments to the function are a particle iterator that identifies the current particle and a void pointer that points to a data block of size size_callback() in which the function can store additional data. The function is expected to return a void pointer pointing to a position right after its data block.

Definition at line 397 of file particle_handler.h.

§ load_callback

template<int dim, int spacedim = dim>
std::function<const void *(const particle_iterator &, const void *)> aspect::Particle::ParticleHandler< dim, spacedim >::load_callback
private

A function that is called once per particle when deserializing particle data. Arguments to the function are a particle iterator that identifies the current particle and a void pointer that points to a data block of size size_callback() from which the function can load additional data. This block was filled by the store_callback function during serialization. This function is expected to return a void pointer pointing to a position right after its data block.

Definition at line 410 of file particle_handler.h.

§ data_offset

template<int dim, int spacedim = dim>
unsigned int aspect::Particle::ParticleHandler< dim, spacedim >::data_offset
private

This variable is set by the register_store_callback_function() function and used by the register_load_callback_function() function to check where the particle data was stored.

Definition at line 417 of file particle_handler.h.


The documentation for this class was generated from the following files: