|
Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
|
basic functions to work with mesh More...
#include "stdafx.h"#include "params.hpp"#include "precision.hpp"#include "class_mesh.hpp"#include "class_particles.hpp"#include "class_vec_3d.hpp"

Go to the source code of this file.
Classes | |
| class | IT< points > |
| : class for effective iteration of cube of mesh cells More... | |
Functions | |
| void | get_k_vec (size_t N, size_t index, int *k_vec) |
| void | get_k_vec (size_t N, size_t index, Vec_3D< int > &k_vec) |
| double | get_k_sq (size_t N, size_t index) |
| template<typename T > | |
| void | get_per (Vec_3D< T > &position, size_t per) |
| template<typename T > | |
| void | get_per (Vec_3D< T > &position, size_t perx, size_t pery, size_t perz) |
| void | get_per (std::vector< Particle_v< double >> &particles, const size_t per) |
| double | get_distance (const Vec_3D< double > &x_1, const Vec_3D< double > &x_2, size_t per) |
| Vec_3D< double > | get_sgn_distance (const Vec_3D< double > &x_from, const Vec_3D< double > &x_to, size_t per) |
| void | assign_to (Mesh &field, const Vec_3D< double > &position, const double value) |
| void | assign_to (std::vector< Mesh > &field, const Vec_3D< double > &position, const Vec_3D< double > &value) |
| void | assign_from (const Mesh &field, const Vec_3D< double > &position, double &value, double mod=1) |
| void | assign_from (const std::vector< Mesh > &field, const Vec_3D< double > &position, Vec_3D< double > &value, double mod=1) |
| void | fftw_execute_dft_r2c (const FFTW_PLAN_TYPE &p_F, Mesh &rho) |
| compute forward (real to complex) FFT on mesh (inplace) More... | |
| void | fftw_execute_dft_c2r (const FFTW_PLAN_TYPE &p_B, Mesh &rho) |
| compute backward (complex to real) FFT on mesh (inplace) More... | |
| void | fftw_execute_dft_r2c_triple (const FFTW_PLAN_TYPE &p_F, std::vector< Mesh > &rho) |
| compute three forward (real to complex) FFTs on vector of meshes (inplace) More... | |
| void | fftw_execute_dft_c2r_triple (const FFTW_PLAN_TYPE &p_B, std::vector< Mesh > &rho) |
| compute three backward (complex to real) FFTs on vector of meshes (inplace) More... | |
| void assign_from | ( | const Mesh & | field, |
| const Vec_3D< double > & | position, | ||
| double & | value, | ||
| double | mod = 1 |
||
| ) |
Definition at line 224 of file core_mesh.cpp.
References IT< points >::iter(), Mesh::N, and IT< points >::vec.
Referenced by kick_step_no_momentum(), App_Var_Chi::ChiImpl::kick_step_w_chi(), App_Var_Chi::ChiImpl::kick_step_w_chi_no_momentum(), kick_step_w_momentum(), kick_step_w_momentum_pm(), and anonymous_namespace{mod_frozen_potential.cpp}::kick_step_w_pp().
| void assign_from | ( | const std::vector< Mesh > & | field, |
| const Vec_3D< double > & | position, | ||
| Vec_3D< double > & | value, | ||
| double | mod = 1 |
||
| ) |
< reuse the same weigh for every field in std::vector
Definition at line 233 of file core_mesh.cpp.
References IT< points >::iter(), IT< points >::vec, and w.
Definition at line 201 of file core_mesh.cpp.
References IT< points >::iter(), Mesh::N, and IT< points >::vec.
Referenced by get_rho_from_par(), and get_vel_from_par().
| void assign_to | ( | std::vector< Mesh > & | field, |
| const Vec_3D< double > & | position, | ||
| const Vec_3D< double > & | value | ||
| ) |
< reuse the same weigh for every field in std::vector
Definition at line 210 of file core_mesh.cpp.
References IT< points >::iter(), IT< points >::vec, and w.
| void fftw_execute_dft_c2r | ( | const FFTW_PLAN_TYPE & | p_B, |
| Mesh & | rho | ||
| ) |
compute backward (complex to real) FFT on mesh (inplace)
| p_B | plan for backward transformation |
| rho | mesh upon which the transformation is performed |
Definition at line 253 of file core_mesh.cpp.
References Mesh::complex(), FFTW_EXEC_C2R, and Mesh_base< T >::real().
Referenced by fftw_execute_dft_c2r_triple(), anonymous_namespace{test_chameleon.cpp}::get_grav_pot(), App_Var_AA::pot_corr(), and anonymous_namespace{chameleon.cpp}::ChiSolver< T >::set_linear_sol_at_level().
| void fftw_execute_dft_c2r_triple | ( | const FFTW_PLAN_TYPE & | p_B, |
| std::vector< Mesh > & | rho | ||
| ) |
compute three backward (complex to real) FFTs on vector of meshes (inplace)
| p_B | plan for backward transformations |
| rho | vector of meshes upon which the transformations are performed |
Definition at line 263 of file core_mesh.cpp.
References fftw_execute_dft_c2r(), and get_per().
Referenced by App_Var_AA::AAImpl::aa_convolution(), App_Var_Chi::ChiImpl::get_chi_force(), App_Var_FP_mod::pot_corr(), App_Var< T >::pot_corr(), and App_Var< T >::Impl< T >::set_init_cond().
| void fftw_execute_dft_r2c | ( | const FFTW_PLAN_TYPE & | p_F, |
| Mesh & | rho | ||
| ) |
compute forward (real to complex) FFT on mesh (inplace)
| p_F | plan for forward transformation |
| rho | mesh upon which the transformation is performed |
Definition at line 247 of file core_mesh.cpp.
References Mesh::complex(), FFTW_EXEC_R2C, Mesh::N, pow(), and Mesh_base< T >::real().
Referenced by App_Var_AA::AAImpl::aa_convolution(), fftw_execute_dft_r2c_triple(), App_Var_Chi::ChiImpl::gen_pow_spec_binned(), gen_rho_dist_k(), App_Var< T >::Impl< T >::get_binned_power_spec(), App_Var_Chi::ChiImpl::get_chi_force(), anonymous_namespace{test_chameleon.cpp}::get_grav_pot(), anonymous_namespace{chameleon.cpp}::ChiSolver< T >::set_linear_sol_at_level(), and App_Var_PM::upd_pos().
| void fftw_execute_dft_r2c_triple | ( | const FFTW_PLAN_TYPE & | p_F, |
| std::vector< Mesh > & | rho | ||
| ) |
compute three forward (real to complex) FFTs on vector of meshes (inplace)
| p_F | plan for forward transformations |
| rho | vector of meshes upon which the transformations are performed |
Definition at line 258 of file core_mesh.cpp.
References fftw_execute_dft_r2c().
Referenced by App_Var< T >::Impl< T >::print_vel_pwr().
| double get_k_sq | ( | size_t | N, |
| size_t | index | ||
| ) |
Definition at line 38 of file core_mesh.cpp.
References get_k_vec(), and pow2().
Referenced by gen_pot_k(), gen_rho_w_pow_k(), and anonymous_namespace{chameleon.cpp}::ChiSolver< T >::get_chi_k().
| void get_k_vec | ( | size_t | N, |
| size_t | index, | ||
| int * | k_vec | ||
| ) |
Definition at line 20 of file core_mesh.cpp.
Referenced by gen_displ_k_S2(), get_k_sq(), pwr_spec_k(), pwr_spec_k_init(), and vel_pwr_spec_k().
| void get_k_vec | ( | size_t | N, |
| size_t | index, | ||
| Vec_3D< int > & | k_vec | ||
| ) |
Definition at line 29 of file core_mesh.cpp.
| void get_per | ( | Vec_3D< T > & | position, |
| size_t | per | ||
| ) |
Definition at line 66 of file core_mesh.cpp.
| void get_per | ( | Vec_3D< T > & | position, |
| size_t | perx, | ||
| size_t | pery, | ||
| size_t | perz | ||
| ) |
Definition at line 72 of file core_mesh.cpp.
| void get_per | ( | std::vector< Particle_v< double >> & | particles, |
| const size_t | per | ||
| ) |
Definition at line 79 of file core_mesh.cpp.
References get_per().
| Vec_3D<double> get_sgn_distance | ( | const Vec_3D< double > & | x_from, |
| const Vec_3D< double > & | x_to, | ||
| size_t | per | ||
| ) |
Definition at line 122 of file core_mesh.cpp.
References get_sgn_distance_1D(), wgh_sch(), and x.
Referenced by anonymous_namespace{mod_frozen_potential.cpp}::force_short().