|
Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
|
#include <complex>#include <fstream>#include <iostream>#include <fftw3.h>#include "poisson_solver.h"
Go to the source code of this file.
Macros | |
| #define | _NDIM 1 |
Typedefs | |
| typedef std::complex< double > | DType |
Functions | |
| void | solve_with_fft (Grid< 1, std::complex< double > > &drho, Grid< 1, std::complex< double > > &sol) |
| void | solve_with_fft (Grid< 1, double > &drho, Grid< 1, double > &sol) |
| void | set_rho (MultiGrid< 1, DType > &rho_mg, Grid< 1, DType > &analytical_solution) |
| DType | f_analytical (double x) |
| DType | laplacian_f_analytical (double x) |
| int | main (int argv, char **argc) |
| #define _NDIM 1 |
Definition at line 24 of file poisson.cpp.
Referenced by solve_with_fft().
Definition at line 29 of file poisson.cpp.
| int main | ( | int | argv, |
| char ** | argc | ||
| ) |
Definition at line 151 of file poisson.cpp.
References MultiGridSolver< NDIM, T >::add_external_grid(), MultiGridSolver< NDIM, T >::clear(), Catch::cout(), MultiGrid< NDIM, T >::get_grid(), MultiGridSolver< NDIM, T >::get_grid(), MultiGridSolver< NDIM, T >::get_N(), Grid< NDIM, T >::rms_norm(), MultiGridSolver< NDIM, T >::set_epsilon(), MultiGridSolver< NDIM, T >::set_ngs_sweeps(), set_rho(), MultiGridSolver< NDIM, T >::solve(), and solve_with_fft().
Definition at line 60 of file poisson.cpp.
References Catch::cout(), f_analytical(), MultiGrid< NDIM, T >::get_N(), MultiGrid< NDIM, T >::get_Ntot(), Grid< NDIM, T >::get_y(), MultiGrid< NDIM, T >::get_y(), laplacian_f_analytical(), MultiGrid< NDIM, T >::restrict_down_all(), and sqrt().
Referenced by main().
| void solve_with_fft | ( | Grid< 1, std::complex< double > > & | drho, |
| Grid< 1, std::complex< double > > & | sol | ||
| ) |
Definition at line 102 of file poisson.cpp.
References _NDIM.
Referenced by main(), and solve_with_fft().
Definition at line 88 of file poisson.cpp.
References Grid< NDIM, T >::get_Ntot(), and solve_with_fft().