Neko  0.8.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 (this, dof, tol)
 Evaluate only local points. 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%dof%size()), intent(inout)  field 
)
private
Parameters
interp_valuesArray of values in the given points.
fieldArray of values used for interpolation.

Definition at line 516 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 397 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 191 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 315 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 367 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 152 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 171 of file global_interpolation.F90.

◆ global_interpolation_init()

subroutine global_interpolation::global_interpolation_init ( class(global_interpolation_t), intent(inout)  this,
type(dofmap_t), target  dof,
real(kind=rp), optional  tol 
)

Initialize user defined variables.

Parameters
dofDofmap on which the interpolation is to be carried out.
tolTolerance for Newton iterations.

Definition at line 114 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 342 of file global_interpolation.F90.

Here is the caller graph for this function:

◆ 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 439 of file global_interpolation.F90.

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