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(size(ivs)), public | af_interp0 (tree, r, ivs, success, id_guess) |
Using zeroth order interpolation to get a value at r in cell. More... | |
real(dp) function, dimension(size(ivs)), public | af_interp1 (tree, r, ivs, success, id_guess) |
Using linear interpolation to get a value at r. More... | |
subroutine, public | af_interp0_to_grid (tree, r, iv, amount, to_density) |
Add 'amount' to the grid cell nearest to r. More... | |
real(dp) function, dimension(ndim), public | af_interp1_fc (tree, r, ifc, success, id_guess) |
Linearly interpolate face-centered variable to a position r. 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(size(ivs)), public m_af_interp::af_interp0 | ( | type(af_t), intent(in) | tree, |
real(dp), dimension(ndim), intent(in) | r, | ||
integer, dimension(:), intent(in) | ivs, | ||
logical, intent(out) | success, | ||
integer, intent(inout), optional | id_guess | ||
) |
Using zeroth order interpolation to get a value at r in cell.
[in] | tree | Parent box |
[in] | r | Where to interpolate |
[in] | ivs | Variables to interpolate |
[out] | success | Whether the interpolation worked |
[in,out] | id_guess | Guess for box id (will be updated) |
Definition at line 19 of file m_af_interp.f90.
real(dp) function, dimension(size(ivs)), public m_af_interp::af_interp1 | ( | type(af_t), intent(in) | tree, |
real(dp), dimension(ndim), intent(in) | r, | ||
integer, dimension(:), intent(in) | ivs, | ||
logical, intent(out) | success, | ||
integer, intent(inout), optional | id_guess | ||
) |
Using linear interpolation to get a value at r.
[in] | tree | Parent box |
[in] | r | Where to interpolate |
[in] | ivs | Variables to interpolate |
[out] | success | Whether the interpolation worked |
[in,out] | id_guess | Guess for box id (will be updated) |
Definition at line 43 of file m_af_interp.f90.
subroutine, public m_af_interp::af_interp0_to_grid | ( | type(af_t), intent(inout) | tree, |
real(dp), dimension(ndim), intent(in) | r, | ||
integer, intent(in) | iv, | ||
real(dp), intent(in) | amount, | ||
logical, intent(in) | to_density | ||
) |
Add 'amount' to the grid cell nearest to r.
[in] | iv | Index of variable |
[in] | r | Location |
[in] | amount | How much to add |
[in] | to_density | If true, divide by cell volume |
Definition at line 108 of file m_af_interp.f90.
real(dp) function, dimension(ndim), public m_af_interp::af_interp1_fc | ( | type(af_t), intent(in) | tree, |
real(dp), dimension(ndim), intent(in) | r, | ||
integer, intent(in) | ifc, | ||
logical, intent(out) | success, | ||
integer, intent(inout), optional | id_guess | ||
) |
Linearly interpolate face-centered variable to a position r.
[in] | tree | Parent box |
[in] | r | Where to interpolate |
[in] | ifc | Face-centered variable |
[out] | success | Whether the interpolation worked |
[in,out] | id_guess | Guess for box id (will be updated) |
Definition at line 142 of file m_af_interp.f90.