PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Public Member Functions | List of all members
num_utilities::con2dis Interface Reference

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...
 

Detailed Description

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.

Returns
ierr

Definition at line 188 of file num_utilities.f90.

Member Function/Subroutine Documentation

◆ con2dis_eqd()

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

Parameters
[in]pt_cpoint on continous grid
[in,out]pt_dpoint 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.

◆ con2dis_reg()

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

Parameters
[in]pt_cpoint on continous grid
[in,out]pt_dpoint on discrete grid
[in]var_ccontinous grid values

Definition at line 1226 of file num_utilities.f90.


The documentation for this interface was generated from the following file: