|
group_particles
|
The abstract base class the user should inherit from. More...
#include <callback.hpp>

Classes | |
| class | BaseProperties |
| Type describing either a group or a particle. More... | |
| class | GrpProperties |
| Specialization of the Callback::BaseProperties type to groups. More... | |
| struct | PrtProperties |
| Specialization of the Callback::BaseProperties type to particles. More... | |
Public Member Functions | |
| virtual bool | grp_chunk (size_t chunk_idx, std::string &fname) const =0 |
| Where to find the group files. | |
| virtual bool | prt_chunk (size_t chunk_idx, std::string &fname) const =0 |
| Where to find the particle files. | |
| virtual std::string | grp_name () const =0 |
| Where to find the group fields in the hdf5 file. | |
| virtual std::string | prt_name () const =0 |
| Where to find the particle fields in the hdf5 file. | |
| virtual void | read_grp_meta_init (std::shared_ptr< H5::H5File > fptr) |
| Allows the user to read meta-data from the 0th group chunk. | |
| virtual void | read_prt_meta_init (std::shared_ptr< H5::H5File > fptr) |
| Allows the user to read meta-data from the 0th particle chunk. | |
| virtual void | read_grp_meta (size_t chunk_idx, std::shared_ptr< H5::H5File > fptr, size_t &Ngroups) const =0 |
| Inform the code how many groups there are in a group chunk. | |
| virtual void | read_prt_meta (size_t chunk_idx, std::shared_ptr< H5::H5File > fptr, coord_t &Bsize, size_t &Nparts) const =0 |
| Inform the code how large the box is and how many particles there are in a particle chunk. | |
| virtual bool | grp_select (const GrpProperties &grp) const |
| Inform the code whether a group should be considered. | |
| virtual void | grp_action (const GrpProperties &grp)=0 |
| Action to take for each group for which grp_select returned true. | |
| virtual coord_t | grp_radius (const GrpProperties &grp) const =0 |
| Inform the code how large this group is. | |
| virtual void | prt_action (size_t grp_idx, const GrpProperties &grp, const PrtProperties &prt, coord_t Rsq)=0 |
| Action to take for each particle that falls within grp_radius from a group. | |
| virtual coord_t | prt_coord_rescale () const |
| Rescaling of particle coordinates. | |
| virtual void | prt_modify (PrtProperties &prt) |
| Modifications to particle properties. | |
The abstract base class the user should inherit from.
| AFields | a type constructed from the AllFields template. |
By overriding this classes methods, the user defines the functionality of the code.
See the documentation for group_particles for the order in which the non-const methods are called.
|
pure virtual |
Where to find the group files.
| [in] | chunk_idx | index of the group chunk the code wants to read (starting from 0). |
| [out] | fname | file name corresponding to this index. |
|
pure virtual |
Where to find the particle files.
| [in] | chunk_idx | index of the particle chunk the code wants to read (starting from 0). |
| [out] | fname | file name corresponding to this index. |
|
pure virtual |
Where to find the group fields in the hdf5 file.
|
pure virtual |
Where to find the particle fields in the hdf5 file.
|
inlinevirtual |
Allows the user to read meta-data from the 0th group chunk.
| [in] | fptr | Points to the opened 0th group chunk. |
|
inlinevirtual |
Allows the user to read meta-data from the 0th particle chunk.
| [in] | fptr | Points to the opened 0th particle chunk. |
|
pure virtual |
Inform the code how many groups there are in a group chunk.
| [in] | chunk_idx | index of the group chunk, starting from 0. |
| [in] | fptr | pointer to the opened group chunk file. |
| [out] | Ngroups | to be filled with the number of groups in this file. |
|
pure virtual |
Inform the code how large the box is and how many particles there are in a particle chunk.
| [in] | chunk_idx | index of the particle chunk, starting from 0. |
| [in] | fptr | pointer to the opened particle chunk file. |
| [out] | Bsize | to be filled with the size of the simulation box. This should always be the same; the code checks this assumption as an additional safety feature. Units are the same as the ones used in the data arrays. |
| [out] | Nparts | to be filled with the number of particles in this file. |
|
inlinevirtual |
Inform the code whether a group should be considered.
| [in] | grp | properties of this group. |
|
pure virtual |
Action to take for each group for which grp_select returned true.
| [in] | grp | properties of this group. |
|
pure virtual |
Inform the code how large this group is.
| [in] | grp | properties of this group. |
|
pure virtual |
Action to take for each particle that falls within grp_radius from a group.
| [in] | grp_idx | index of this group, corresponding to the order in which grp_action was called. |
| [in] | grp | properties of this group. Well-designed code should not need to use this argument, as the required data products can be reduced more efficiently in the grp_action method. |
| [in] | prt | properties of this particle. |
| [in] | Rsq | squared distance between this particle's coordinate and this group's coordinate. The code already computes this so the user should be able to use it without re-computing it. |
|
inlinevirtual |
Rescaling of particle coordinates.
|
inlinevirtual |
Modifications to particle properties.
| [in,out] | prt | properties of the particle, to be modified |