PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Convert between points from a continuous grid to a discrete grid. More...
Public Member Functions | |
integer function | con2dis_eqd (pt_c, pt_d, lim_c, lim_d) |
equidistant version More... | |
integer function | con2dis_reg (pt_c, pt_d, var_c) |
regular version More... | |
Convert between points from a continuous grid to a discrete grid.
This is done by providing either the the limits on the grid (lim_c
and lim_d
), in which case the grid is assumed to be equidistant, or the grid values themselves, in which case the grid just has to be regular.
The output is a real value where the floored integer is the index in the discrete grid and the remainder corresponds to the fraction towards the next index. If no solution is found, a negative value is outputted, as well as a message.
Definition at line 188 of file num_utilities.f90.
integer function num_utilities::con2dis::con2dis_eqd | ( | real(dp), intent(in) | pt_c, |
real(dp), intent(inout) | pt_d, | ||
real(dp), dimension(2), intent(in) | lim_c, | ||
integer, dimension(2), intent(in) | lim_d | ||
) |
equidistant version
[in] | pt_c | point on continous grid |
[in,out] | pt_d | point on discrete grid |
[in] | lim_c | [min_c,max_c] |
[in] | lim_d | [min_d,max_d] |
Definition at line 1206 of file num_utilities.f90.
integer function num_utilities::con2dis::con2dis_reg | ( | real(dp), intent(in) | pt_c, |
real(dp), intent(inout) | pt_d, | ||
real(dp), dimension(:), intent(in) | var_c | ||
) |
regular version
[in] | pt_c | point on continous grid |
[in,out] | pt_d | point on discrete grid |
[in] | var_c | continous grid values |
Definition at line 1226 of file num_utilities.f90.