|
Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
|
#include <multigrid.h>
Public Member Functions | |
| MultiGrid () | |
| MultiGrid (size_t N) | |
| MultiGrid (size_t N, size_t Nlevel) | |
| MultiGrid (Grid< NDIM, T > &y, size_t Nlevel) | |
| MultiGrid (Grid< NDIM, T > &y) | |
| Grid< NDIM, T > & | get_grid (size_t level=0) |
| const Grid< NDIM, T > & | get_grid (size_t level=0) const |
| T * | operator[] (size_t level) |
| const T * | operator[] (size_t level) const |
| T * | get_y (size_t level=0) |
| T const *const | get_y (size_t level=0) const |
| T | get_y (size_t level, size_t i) |
| T | get_y (size_t level, std::vector< size_t > &coord_list) |
| size_t | get_N (size_t level=0) const |
| size_t | get_Ntot (size_t level=0) const |
| size_t | get_Ndim () const |
| size_t | get_Nlevel () const |
| size_t | get_Nmin () const |
| void | set_y (size_t level, size_t i, T value) |
| size_t | gridindex_from_coord (size_t level, std::vector< size_t > &coord_list) |
| std::vector< size_t > | coord_from_gridindex (size_t level, size_t i) |
| void | clear () |
| void | restrict_down (size_t from_level) |
| void | restrict_down (size_t from_level, Grid< NDIM, T > &to_grid) |
| void | restrict_down_all () |
Private Attributes | |
| size_t | _N |
| size_t | _Ntot |
| size_t | _Nlevel |
| std::vector< size_t > | _NinLevel |
| std::vector< size_t > | _NtotinLevel |
| std::vector< Grid< NDIM, T > > | _y |
Definition at line 21 of file multigrid.h.
Definition at line 34 of file multigrid.h.
Referenced by MultiGrid< 3, CHI_PREC_t >::MultiGrid().
Definition at line 35 of file multigrid.h.
Definition at line 132 of file multigrid.cpp.
References MultiGrid< NDIM, T >::_N, MultiGrid< NDIM, T >::_NinLevel, MultiGrid< NDIM, T >::_Nlevel, MultiGrid< NDIM, T >::_NtotinLevel, MultiGrid< NDIM, T >::_y, and power().
| MultiGrid< NDIM, T >::MultiGrid | ( | Grid< NDIM, T > & | y, |
| size_t | Nlevel | ||
| ) |
Definition at line 121 of file multigrid.cpp.
References MultiGrid< NDIM, T >::_Nlevel, MultiGrid< NDIM, T >::_y, Grid< NDIM, T >::get_N(), and power().
| void MultiGrid< NDIM, T >::clear | ( | ) |
Definition at line 236 of file multigrid.cpp.
References MultiGrid< NDIM, T >::_N, MultiGrid< NDIM, T >::_NinLevel, MultiGrid< NDIM, T >::_Nlevel, MultiGrid< NDIM, T >::_Ntot, MultiGrid< NDIM, T >::_NtotinLevel, and MultiGrid< NDIM, T >::_y.
Referenced by MultiGrid< 3, CHI_PREC_t >::MultiGrid().
| std::vector< size_t > MultiGrid< NDIM, T >::coord_from_gridindex | ( | size_t | level, |
| size_t | i | ||
| ) |
Definition at line 215 of file multigrid.cpp.
References MultiGrid< NDIM, T >::_NinLevel, and MultiGrid< NDIM, T >::_NtotinLevel.
Referenced by MultiGrid< 3, CHI_PREC_t >::MultiGrid().
| Grid< NDIM, T > & MultiGrid< NDIM, T >::get_grid | ( | size_t | level = 0 | ) |
Definition at line 17 of file multigrid.cpp.
Referenced by assign_to_grid(), MultiGridSolver< 3, T >::get_grid(), main(), anonymous_namespace{chameleon.cpp}::min(), MultiGrid< 3, CHI_PREC_t >::MultiGrid(), anonymous_namespace{chameleon.cpp}::transform_Mesh_to_MultiGrid(), and anonymous_namespace{chameleon.cpp}::transform_MultiGrid_to_Mesh().
| const Grid< NDIM, T > & MultiGrid< NDIM, T >::get_grid | ( | size_t | level = 0 | ) | const |
Definition at line 25 of file multigrid.cpp.
| size_t MultiGrid< NDIM, T >::get_N | ( | size_t | level = 0 | ) | const |
Definition at line 90 of file multigrid.cpp.
Referenced by assign_to_grid(), main(), MultiGrid< 3, CHI_PREC_t >::MultiGrid(), and set_rho().
| size_t MultiGrid< NDIM, T >::get_Ndim | ( | ) | const |
Definition at line 106 of file multigrid.cpp.
Referenced by MultiGrid< 3, CHI_PREC_t >::MultiGrid().
| size_t MultiGrid< NDIM, T >::get_Nlevel | ( | ) | const |
Definition at line 111 of file multigrid.cpp.
Referenced by MultiGridSolver< NDIM, T >::add_external_grid(), main(), and MultiGrid< 3, CHI_PREC_t >::MultiGrid().
| size_t MultiGrid< NDIM, T >::get_Nmin | ( | ) | const |
Definition at line 116 of file multigrid.cpp.
Referenced by MultiGrid< 3, CHI_PREC_t >::MultiGrid().
| size_t MultiGrid< NDIM, T >::get_Ntot | ( | size_t | level = 0 | ) | const |
Definition at line 98 of file multigrid.cpp.
Referenced by assign_to_grid(), MultiGrid< 3, CHI_PREC_t >::MultiGrid(), and set_rho().
| T * MultiGrid< NDIM, T >::get_y | ( | size_t | level = 0 | ) |
Definition at line 49 of file multigrid.cpp.
Referenced by assign_to_grid(), MultiGrid< 3, CHI_PREC_t >::MultiGrid(), and set_rho().
| T const *const MultiGrid< NDIM, T >::get_y | ( | size_t | level = 0 | ) | const |
Definition at line 57 of file multigrid.cpp.
| T MultiGrid< NDIM, T >::get_y | ( | size_t | level, |
| size_t | i | ||
| ) |
Definition at line 65 of file multigrid.cpp.
| T MultiGrid< NDIM, T >::get_y | ( | size_t | level, |
| std::vector< size_t > & | coord_list | ||
| ) |
Definition at line 73 of file multigrid.cpp.
| size_t MultiGrid< NDIM, T >::gridindex_from_coord | ( | size_t | level, |
| std::vector< size_t > & | coord_list | ||
| ) |
Definition at line 228 of file multigrid.cpp.
References MultiGrid< NDIM, T >::_NinLevel.
Referenced by MultiGrid< 3, CHI_PREC_t >::MultiGrid().
| T * MultiGrid< NDIM, T >::operator[] | ( | size_t | level | ) |
| const T * MultiGrid< NDIM, T >::operator[] | ( | size_t | level | ) | const |
Definition at line 41 of file multigrid.cpp.
| void MultiGrid< NDIM, T >::restrict_down | ( | size_t | from_level | ) |
Definition at line 204 of file multigrid.cpp.
References MultiGrid< NDIM, T >::_y.
Referenced by main(), MultiGrid< 3, CHI_PREC_t >::MultiGrid(), and MultiGrid< NDIM, T >::restrict_down_all().
| void MultiGrid< NDIM, T >::restrict_down | ( | size_t | from_level, |
| Grid< NDIM, T > & | to_grid | ||
| ) |
Definition at line 155 of file multigrid.cpp.
References MultiGrid< NDIM, T >::_NinLevel, MultiGrid< NDIM, T >::_Nlevel, MultiGrid< NDIM, T >::_NtotinLevel, MultiGrid< NDIM, T >::_y, Grid< NDIM, T >::get_N(), Grid< NDIM, T >::get_y(), and growth_allz::T.
| void MultiGrid< NDIM, T >::restrict_down_all | ( | ) |
Definition at line 209 of file multigrid.cpp.
References MultiGrid< NDIM, T >::_Nlevel, and MultiGrid< NDIM, T >::restrict_down().
Referenced by main(), MultiGrid< 3, CHI_PREC_t >::MultiGrid(), set_rho(), and anonymous_namespace{chameleon.cpp}::transform_Mesh_to_MultiGrid().
| void MultiGrid< NDIM, T >::set_y | ( | size_t | level, |
| size_t | i, | ||
| T | value | ||
| ) |
|
private |
Definition at line 24 of file multigrid.h.
Referenced by MultiGrid< NDIM, T >::clear(), and MultiGrid< NDIM, T >::MultiGrid().
|
private |
Definition at line 27 of file multigrid.h.
Referenced by MultiGrid< NDIM, T >::clear(), MultiGrid< NDIM, T >::coord_from_gridindex(), MultiGrid< NDIM, T >::gridindex_from_coord(), MultiGrid< NDIM, T >::MultiGrid(), and MultiGrid< NDIM, T >::restrict_down().
|
private |
Definition at line 26 of file multigrid.h.
Referenced by MultiGrid< NDIM, T >::clear(), MultiGrid< NDIM, T >::MultiGrid(), MultiGrid< NDIM, T >::restrict_down(), and MultiGrid< NDIM, T >::restrict_down_all().
|
private |
Definition at line 25 of file multigrid.h.
Referenced by MultiGrid< NDIM, T >::clear().
|
private |
Definition at line 28 of file multigrid.h.
Referenced by MultiGrid< NDIM, T >::clear(), MultiGrid< NDIM, T >::coord_from_gridindex(), MultiGrid< NDIM, T >::MultiGrid(), and MultiGrid< NDIM, T >::restrict_down().
Definition at line 29 of file multigrid.h.
Referenced by MultiGrid< NDIM, T >::clear(), MultiGrid< NDIM, T >::MultiGrid(), and MultiGrid< NDIM, T >::restrict_down().