Afivo
0.3
|
This module contains routines related to interpolation, which can interpolate 'to' the grid and 'from' the grid (useful for e.g. particle simulations). The interpolation for meshes is called prolongation, see m_aX_prolong. More...
Functions/Subroutines | |
real(dp) function, dimension(n_var), public | a3_interp0 (tree, rr, ivs, n_var) |
Using zeroth order interpolation to get a value at r in cell. More... | |
real(dp) function, dimension(n_var), public | a3_interp1 (tree, r, ivs, n_var, id_guess) |
Using linear interpolation to get a value at r. More... | |
subroutine, public | a3_interp0_to_grid (tree, rr, iv, amount, to_density) |
Add 'amount' to the grid cell nearest to rr. More... | |
This module contains routines related to interpolation, which can interpolate 'to' the grid and 'from' the grid (useful for e.g. particle simulations). The interpolation for meshes is called prolongation, see m_aX_prolong.
real(dp) function, dimension(n_var), public m_a3_interp::a3_interp0 | ( | type(a3_t), intent(in) | tree, |
real(dp), dimension(3), intent(in) | rr, | ||
integer, dimension(n_var), intent(in) | ivs, | ||
integer, intent(in) | n_var | ||
) |
Using zeroth order interpolation to get a value at r in cell.
[in] | tree | Parent box |
[in] | rr | Where to interpolate |
[in] | n_var | Number of variables |
[in] | ivs | Variables to interpolate |
Definition at line 19 of file m_a3_interp.f90.
real(dp) function, dimension(n_var), public m_a3_interp::a3_interp1 | ( | type(a3_t), intent(in) | tree, |
real(dp), dimension(3), intent(in) | r, | ||
integer, dimension(n_var), intent(in) | ivs, | ||
integer, intent(in) | n_var, | ||
integer, intent(in), optional | id_guess | ||
) |
Using linear interpolation to get a value at r.
[in] | tree | Parent box |
[in] | r | Where to interpolate |
[in] | n_var | Number of variables |
[in] | ivs | Variables to interpolate |
[in] | id_guess | Guess for box id |
Definition at line 39 of file m_a3_interp.f90.
subroutine, public m_a3_interp::a3_interp0_to_grid | ( | type(a3_t), intent(inout) | tree, |
real(dp), dimension(3), intent(in) | rr, | ||
integer, intent(in) | iv, | ||
real(dp), intent(in) | amount, | ||
logical, intent(in) | to_density | ||
) |
Add 'amount' to the grid cell nearest to rr.
[in] | iv | Index of variable |
[in] | rr | Location |
[in] | amount | How much to add |
[in] | to_density | If true, divide by cell volume |
Definition at line 84 of file m_a3_interp.f90.