6#ifndef CALLBACK_UTILS_PRT_MODIFY_HPP
7#define CALLBACK_UTILS_PRT_MODIFY_HPP
24 template<
typename AFields,
typename VField,
bool sqrta>
43 PrtRSD (
char rsd_direction_,
double Omega_m,
double z) {
44 if (rsd_direction_ ==
'n') {
50 rsd_direction = rsd_direction_ -
'x';
52 / ( 100.0 * std::sqrt( Omega_m*std::pow(1+z, 3) + (1.0-Omega_m) ) );
53 if constexpr (sqrta) rsd_factor /= std::sqrt(1.0+z);
56 void prt_modify (PrtProperties &prt)
override final {
58 const auto v = prt.template get<VField>()[rsd_direction];
59 auto x = prt.coord()[rsd_direction];
62 if (x > prt.Bsize) x -= prt.Bsize;
63 else if (x < 0) x += prt.Bsize;
64 prt.coord()[rsd_direction] = x;
Contains the abstract base class that the user should subclass from in order to define the desired fu...
Implement RSD shifting of particle positions along a coordinate.
Definition callback_utils_prt_modify.hpp:27
PrtRSD(char rsd_direction_, double Omega_m, double z)
Constructor.
Definition callback_utils_prt_modify.hpp:43
float coord_t
Internal coordinate type.
Definition fields.hpp:28
contains classes that implement parts of the Callback base.
Definition callback_utils.hpp:35
Specialization of the Callback::BaseProperties type to particles.
Definition callback.hpp:95
The abstract base class the user should inherit from.
Definition callback.hpp:32