|
FML
|
This class defines how to compute the halos from the particles. More...
#include <FoFBinning.h>
Public Member Functions | |
| constexpr int | get_ndim () const |
| double * | get_pos () |
| double * | get_vel () |
| double | get_halo_mass () const |
| size_t | get_npart () const |
| size_t | get_id () const |
| std::array< double, NDIM > | get_velocity_dispersion () const |
| FoFHalo ()=default | |
| FoFHalo (size_t _id) | |
| void | add (T &particle, bool periodic=true) |
| Add a new particle to the FoF group. | |
| void | finalize (bool periodic=true) |
| This method is called after all particles has been added to the halo and we can do any normalization etc we want. | |
Data Fields | |
| size_t | id {0} |
| Id of the halo. | |
| size_t | np {0} |
| Number of particles in the halo. | |
| double | mass {0.0} |
| Mass of the halo (units is the same as those in the particles; get_mass) | |
| std::array< double, NDIM > | pos {} |
| Center of the halo. | |
| std::array< double, NDIM > | vel {} |
| Velocity of the halo. | |
| std::array< double, NDIM > | vel_rms {} |
| RMS velocity of the particles in the halo (velocity dispersion per dimension) Contains <v^2> before finalizing. | |
| std::vector< T * > | member_particles |
This class defines how to compute the halos from the particles.
If you want to compute more things then make your own class like this one and supply as template parameter to the FriendsOfFriends method.
NB: The computation of the COM has to be done incrementally: we add up the mean values as we go along instead of doing it in the end. For other quantities you can do it as you wish.
If you want access to all particles then one can add a vector of pointers to the particles, push them in this vector during add and then process them in finalize.
Definition at line 30 of file FoFBinning.h.
|
default |
|
inline |
Definition at line 66 of file FoFBinning.h.
|
inline |
Add a new particle to the FoF group.
We update the center of mass position to be that of the particles added so far.
| [in] | particle | The particle we are to add to the halo |
| [in] | periodic | (Optional) Is the box periodic? |
Definition at line 72 of file FoFBinning.h.
|
inline |
This method is called after all particles has been added to the halo and we can do any normalization etc we want.
| [in] | periodic | (Optional) Is the box periodic? |
Definition at line 132 of file FoFBinning.h.
|
inline |
Definition at line 54 of file FoFBinning.h.
|
inline |
Definition at line 57 of file FoFBinning.h.
|
inlineconstexpr |
Definition at line 47 of file FoFBinning.h.
|
inline |
Definition at line 56 of file FoFBinning.h.
|
inline |
Definition at line 48 of file FoFBinning.h.
|
inline |
Definition at line 49 of file FoFBinning.h.
|
inline |
Definition at line 58 of file FoFBinning.h.
| size_t FML::FOF::FoFHalo< T, NDIM >::id {0} |
| double FML::FOF::FoFHalo< T, NDIM >::mass {0.0} |
Mass of the halo (units is the same as those in the particles; get_mass)
Definition at line 37 of file FoFBinning.h.
| std::vector<T *> FML::FOF::FoFHalo< T, NDIM >::member_particles |
Definition at line 62 of file FoFBinning.h.
| size_t FML::FOF::FoFHalo< T, NDIM >::np {0} |
| std::array<double, NDIM> FML::FOF::FoFHalo< T, NDIM >::pos {} |
| std::array<double, NDIM> FML::FOF::FoFHalo< T, NDIM >::vel {} |
| std::array<double, NDIM> FML::FOF::FoFHalo< T, NDIM >::vel_rms {} |
RMS velocity of the particles in the halo (velocity dispersion per dimension) Contains <v^2> before finalizing.
Definition at line 44 of file FoFBinning.h.