Neko  0.9.99
A portable framework for high-order spectral element flow simulations
global_interpolation Module Reference

Implements global_interpolation given a dofmap. More...

Data Types

type  global_interpolation_t
 Implements global interpolation for arbitrary points in the domain. More...
 

Functions/Subroutines

subroutine global_interpolation_init_dof (this, dof, tol)
 Initialize the global interpolation object on a dofmap. More...
 
subroutine global_interpolation_init_xyz (this, x, y, z, gdim, nelv, Xh, tol)
 Initialize the global interpolation object on a set of coordinates. More...
 
subroutine global_interpolation_free (this)
 Destructor. More...
 
subroutine global_interpolation_free_points (this)
 Destructor for point arrays. More...
 
subroutine global_interpolation_find_common (this)
 Common routine for finding the points. More...
 
subroutine global_interpolation_find_coords (this, x, y, z, n_points)
 Finds the corresponding r,s,t coordinates in the correct global element as well as which process that owns the point. After this the values at these points can be evaluated. If the locations of the points change this must be called again. More...
 
subroutine global_interpolation_init_point_arrays (this)
 
subroutine global_interpolation_find_xyz (this, xyz, n_points)
 Finds the corresponding r,s,t coordinates in the correct global element as well as which process that owns the point. After this the values at these points can be evaluated. If the locations of the points change this must be called again. More...
 
subroutine global_interpolation_find_and_redist (this, xyz, n_points)
 Finds the corresponding r,s,t coordinates and redistributes the points to the owning rank in the correct global element as well as which process that owns the point. After this the values at these points can be evaluated. If the locations of the points change this must be called again. More...
 
subroutine global_interpolation_redist (this)
 
subroutine global_interpolation_evaluate (this, interp_values, field)
 Evalute the interpolated value in the points given a field on the dofmap. More...
 

Detailed Description

Note
This modules uses functions from gslib, namely findpts_setup, findpts, and findpts_eval. A full description of these subroutines can be found at https://github.com/Nek5000/gslib/blob/master/src/findpts.c

Function/Subroutine Documentation

◆ global_interpolation_evaluate()

subroutine global_interpolation::global_interpolation_evaluate ( class(global_interpolation_t), intent(inout)  this,
real(kind=rp), dimension(this%n_points), intent(inout)  interp_values,
real(kind=rp), dimension(this%nelv*this%xh%lxyz), intent(inout)  field 
)
private
Parameters
interp_valuesArray of values in the given points.
fieldArray of values used for interpolation.

Definition at line 566 of file global_interpolation.F90.

◆ global_interpolation_find_and_redist()

subroutine global_interpolation::global_interpolation_find_and_redist ( class(global_interpolation_t), intent(inout)  this,
real(kind=rp), dimension(:,:), intent(inout), allocatable  xyz,
integer, intent(inout)  n_points 
)
private
  • error_code: returns 0 if point found, 1 if closest point on a border (check dist2), 2 if not found.
  • dist2: distance squared (used to compare the points found by each processor)
    Parameters
    xyzThe coordinates of the points.
    n_pointsThe number of points.

make deep copy incase xyz goes out of scope or deallocated

Sets new points and redistributes them

Definition at line 443 of file global_interpolation.F90.

Here is the call graph for this function:

◆ global_interpolation_find_common()

subroutine global_interpolation::global_interpolation_find_common ( class(global_interpolation_t), intent(inout)  this)
private

Definition at line 236 of file global_interpolation.F90.

Here is the caller graph for this function:

◆ global_interpolation_find_coords()

subroutine global_interpolation::global_interpolation_find_coords ( class(global_interpolation_t), intent(inout)  this,
real(kind=rp), dimension(n_points,1,1,1)  x,
real(kind=rp), dimension(n_points,1,1,1)  y,
real(kind=rp), dimension(n_points,1,1,1)  z,
integer  n_points 
)
private
  • error_code: returns 0 if point found, 1 if closest point on a border (check dist2), 2 if not found
  • dist2: distance squared (used to compare the points found by each processor)
    Parameters
    xThe x-coordinates of the points.
    yThe y-coordinates of the points.
    zThe z-coordinates of the points.
    n_pointsThe number of points.

Definition at line 360 of file global_interpolation.F90.

Here is the call graph for this function:

◆ global_interpolation_find_xyz()

subroutine global_interpolation::global_interpolation_find_xyz ( class(global_interpolation_t), intent(inout)  this,
real(kind=rp), dimension(3, n_points), intent(inout)  xyz,
integer, intent(in)  n_points 
)
private
  • error_code: returns 0 if point found, 1 if closest point on a border (check dist2), 2 if not found
  • dist2: distance squared (used to compare the points found by each processor)
    Parameters
    xyzThe coordinates of the points.
    n_pointsThe number of points.

make deep copy incase xyz goes out of scope or deallocated

Definition at line 412 of file global_interpolation.F90.

Here is the call graph for this function:

◆ global_interpolation_free()

subroutine global_interpolation::global_interpolation_free ( class(global_interpolation_t), intent(inout)  this)
private

Definition at line 193 of file global_interpolation.F90.

◆ global_interpolation_free_points()

subroutine global_interpolation::global_interpolation_free_points ( class(global_interpolation_t), intent(inout)  this)
private

Definition at line 216 of file global_interpolation.F90.

◆ global_interpolation_init_dof()

subroutine global_interpolation::global_interpolation_init_dof ( class(global_interpolation_t), intent(inout)  this,
type(dofmap_t), target  dof,
real(kind=rp), optional  tol 
)
Parameters
dofDofmap on which the interpolation is to be carried out.
tolTolerance for Newton iterations.

Definition at line 126 of file global_interpolation.F90.

◆ global_interpolation_init_point_arrays()

subroutine global_interpolation::global_interpolation_init_point_arrays ( class(global_interpolation_t this)
private

Definition at line 387 of file global_interpolation.F90.

Here is the caller graph for this function:

◆ global_interpolation_init_xyz()

subroutine global_interpolation::global_interpolation_init_xyz ( class(global_interpolation_t), intent(inout)  this,
real(kind=rp), dimension(:), intent(in), target  x,
real(kind=rp), dimension(:), intent(in), target  y,
real(kind=rp), dimension(:), intent(in), target  z,
integer, intent(in)  gdim,
integer, intent(in)  nelv,
type(space_t), intent(in), target  Xh,
real(kind=rp), intent(in), optional  tol 
)
private
Parameters
xx-coordinates.
yy-coordinates.
zz-coordinates.
gdimGeometric dimension.
nelvNumber of elements of the mesh in which to search for the points.
XhSpace on which to interpolate.
tolTolerance for Newton iterations.

Definition at line 148 of file global_interpolation.F90.

◆ global_interpolation_redist()

subroutine global_interpolation::global_interpolation_redist ( class(global_interpolation_t), intent(inout)  this)
private

Calculate which processes this proc has points on

Sum number of points on all pes to compute n_new_points Store how many points to receive from each pe

This could be avoided by adding all indices to a list

Definition at line 487 of file global_interpolation.F90.

Here is the call graph for this function:
Here is the caller graph for this function: