|
Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
|
functions handling output of the program More...
#include "stdafx.h"#include <fstream>#include "params.hpp"#include "core_power.h"#include "class_data_vec.hpp"#include "class_mesh.hpp"

Go to the source code of this file.
Classes | |
| class | Ofstream |
| class | Ifstream |
Functions | |
| std::string | currentDateTime () |
| std::string | std_out_dir (const std::string &pre_subdir, const Sim_Param &sim) |
| void | create_dir (const std::string &out_dir) |
| void | remove_dir (const std::string &out_dir) |
| void | remove_all_files (const std::string &out_dir) |
| void | print_pow_spec (const Data_Vec< double, 2 > &pwr_spec_binned, std::string out_dir, std::string suffix) |
| void | print_vel_pow_spec (const Data_Vec< double, 2 > &pwr_spec_binned, std::string out_dir, std::string suffix) |
| void | print_corr_func (const Data_Vec< double, 2 > &pwr_spec_binned, std::string out_dir, std::string suffix) |
| void | print_pow_spec_diff (const Data_Vec< double, 2 > &pwr_spec_binned, const Data_Vec< double, 2 > &pwr_spec_binned_0, double growth, std::string out_dir, std::string suffix) |
| void | print_pow_spec_diff (const Data_Vec< double, 2 > &pwr_spec_binned, const Interp_obj &pwr_spec_input, double growth, std::string out_dir, std::string suffix) |
| void | print_pow_spec_diff (const Data_Vec< double, 2 > &pwr_spec_binned, const Data_Vec< double, 2 > &pwr_spec_binned_0, const Interp_obj &pwr_spec_input, double growth_now, double growth_init, std::string out_dir, std::string suffix) |
| void | print_vel_pow_spec_diff (const Data_Vec< double, 2 > &pwr_spec_binned, const Data_Vec< double, 2 > &pwr_spec_binned_0, double b, std::string out_dir, std::string suffix) |
| template<class T > | |
| void | print_par_pos_cut_small (const std::vector< T > &particles, const Sim_Param &sim, std::string out_dir, std::string suffix) |
| void | print_rho_map (const Mesh &rho, const Sim_Param &sim, std::string out_dir, std::string suffix) |
| void | print_projected_rho (const Mesh &delta, const Sim_Param &sim, std::string out_dir, std::string suffix) |
| void | print_dens_bin (const std::vector< size_t > &dens_binned, std::string out_dir, std::string suffix) |
| void create_dir | ( | const std::string & | out_dir | ) |
Definition at line 74 of file core_out.cpp.
References ccl_test_distances::path.
Referenced by App_Var< T >::Impl< T >::create_work_dir(), and TEST_CASE().
| std::string currentDateTime | ( | ) |
Definition at line 41 of file core_out.cpp.
Referenced by std_out_dir().
| void print_corr_func | ( | const Data_Vec< double, 2 > & | pwr_spec_binned, |
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 174 of file core_out.cpp.
References Data_Vec< T, N >::size().
Referenced by App_Var< T >::Impl< T >::print_corr().
| void print_dens_bin | ( | const std::vector< size_t > & | dens_binned, |
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 402 of file core_out.cpp.
References print_par_pos_cut_small().
Referenced by App_Var< T >::Impl< T >::print_density().
| void print_par_pos_cut_small | ( | const std::vector< T > & | particles, |
| const Sim_Param & | sim, | ||
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 109 of file core_out.cpp.
References Sim_Param::box_opt, Box_Opt::mesh_num, Box_Opt::par_num, x, Sim_Param::x_0(), and z.
Referenced by print_dens_bin(), and App_Var< T >::Impl< T >::print_position().
| void print_pow_spec | ( | const Data_Vec< double, 2 > & | pwr_spec_binned, |
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 134 of file core_out.cpp.
References Data_Vec< T, N >::size().
Referenced by App_Var< T >::Impl< T >::print_extrap_pwr(), App_Var< T >::Impl< T >::print_input_realisation(), App_Var_Chi::print_output(), and App_Var< T >::Impl< T >::print_power_spec().
| void print_pow_spec_diff | ( | const Data_Vec< double, 2 > & | pwr_spec_binned, |
| const Data_Vec< double, 2 > & | pwr_spec_binned_0, | ||
| double | growth, | ||
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 211 of file core_out.cpp.
References is_err(), pow2(), and Data_Vec< T, N >::size().
Referenced by App_Var< T >::Impl< T >::print_power_spec().
| void print_pow_spec_diff | ( | const Data_Vec< double, 2 > & | pwr_spec_binned, |
| const Interp_obj & | pwr_spec_input, | ||
| double | growth, | ||
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 235 of file core_out.cpp.
References pow2(), Data_Vec< T, N >::size(), Interp_obj::x_max, and Interp_obj::x_min.
| void print_pow_spec_diff | ( | const Data_Vec< double, 2 > & | pwr_spec_binned, |
| const Data_Vec< double, 2 > & | pwr_spec_binned_0, | ||
| const Interp_obj & | pwr_spec_input, | ||
| double | growth_now, | ||
| double | growth_init, | ||
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 263 of file core_out.cpp.
References is_err(), pow2(), Data_Vec< T, N >::size(), Interp_obj::x_max, and Interp_obj::x_min.
| void print_projected_rho | ( | const Mesh & | delta, |
| const Sim_Param & | sim, | ||
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 376 of file core_out.cpp.
References Sim_Param::box_opt, Box_Opt::mesh_num_pwr, and Sim_Param::x_0_pwr().
| void print_rho_map | ( | const Mesh & | rho, |
| const Sim_Param & | sim, | ||
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 317 of file core_out.cpp.
References Sim_Param::box_opt, HALF_THICKNESS, MAX_SIZE, Box_Opt::mesh_num_pwr, and Sim_Param::x_0_pwr().
Referenced by App_Var< T >::Impl< T >::print_density().
| void print_vel_pow_spec | ( | const Data_Vec< double, 2 > & | pwr_spec_binned, |
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 154 of file core_out.cpp.
References Data_Vec< T, N >::size().
Referenced by App_Var< T >::Impl< T >::print_vel_pwr().
| void print_vel_pow_spec_diff | ( | const Data_Vec< double, 2 > & | pwr_spec_binned, |
| const Data_Vec< double, 2 > & | pwr_spec_binned_0, | ||
| double | b, | ||
| std::string | out_dir, | ||
| std::string | suffix | ||
| ) |
Definition at line 294 of file core_out.cpp.
References is_err(), pow2(), and Data_Vec< T, N >::size().
Referenced by App_Var< T >::Impl< T >::print_vel_pwr().
| void remove_all_files | ( | const std::string & | out_dir | ) |
Definition at line 92 of file core_out.cpp.
References p, and ccl_test_distances::path.
Referenced by TEST_CASE().
| void remove_dir | ( | const std::string & | out_dir | ) |
| std::string std_out_dir | ( | const std::string & | pre_subdir, |
| const Sim_Param & | sim | ||
| ) |
directory name = YYMMDD_HHMMSS_m_p_M_b
check if directory exists
try appending numbers starting at 2
Definition at line 53 of file core_out.cpp.
References Sim_Param::box_opt, Box_Opt::box_size, currentDateTime(), exists(), Box_Opt::mesh_num, Box_Opt::mesh_num_pwr, Box_Opt::Ng, Out_Opt::out_dir, Sim_Param::out_opt, and ccl_test_distances::path.