Neko 1.99.3
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
global_interpolation Module Reference

Implements global_interpolation given a dofmap.

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, comm, tol, pad, mask)
 Initialize the global interpolation object on a dofmap.
 
subroutine global_interpolation_init_xyz (this, x, y, z, gdim, nelv, xh, comm, tol, pad)
 Initialize the global interpolation object on a set of coordinates.
 
subroutine global_interpolation_free (this)
 Destructor.
 
subroutine global_interpolation_free_points (this)
 Destructor for point arrays.
 
subroutine global_interpolation_free_points_local (this)
 
subroutine global_interpolation_find_common (this)
 Common routine for finding the points.
 
subroutine global_interpolation_check_points (this, x, y, z)
 Check the points for validity This is used to check that the points are valid and that the interpolation is correct. It checks that the points are within the tolerance.
 
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.
 
subroutine global_interpolation_find_coords1d (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.
 
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.
 
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. There will be some redundancy as for example xyz and xyz_local will have the same values After this the values at these points can be evaluated without MPI.
 
subroutine global_interpolation_evaluate_masked (this, interp_values, field, mask, on_host)
 Evaluate the interpolated value in a masked field.
 
subroutine global_interpolation_evaluate (this, interp_values, field, on_host)
 Evalute the interpolated value in the points given a field.
 
logical function rst_cmp (rst1, rst2, res1, res2, tol)
 Compares two sets of rst coordinates and checks whether rst2 is better than rst1 given a tolerance res1 and res2 are the distances to the interpolated xyz coordinate and true xyz coord for point 1 and 2 tol specifies the range for the rst coordinate to be within: (r,s,t) in (-1+tol,1+tol)^3.
 

Variables

integer, parameter, public glob_map_size = 4096
 

Function/Subroutine Documentation

◆ global_interpolation_check_points()

subroutine global_interpolation::global_interpolation_check_points ( class(global_interpolation_t), intent(inout), target  this,
real(kind=rp), dimension(:), intent(inout x,
real(kind=rp), dimension(:), intent(inout y,
real(kind=rp), dimension(:), intent(inout z 
)
private

Definition at line 926 of file global_interpolation.f90.

◆ global_interpolation_evaluate()

subroutine global_interpolation::global_interpolation_evaluate ( class(global_interpolation_t), intent(inout), target  this,
real(kind=rp), dimension(this%n_points), intent(inout), target  interp_values,
real(kind=rp), dimension(this%nelv*this%xh%lxyz), intent(inout), target  field,
logical, intent(in on_host 
)
private
Parameters
interp_valuesArray of values in the given points.
fieldArray of values used for interpolation.
on_hostIf interpolation should be carried out on the host

Definition at line 1158 of file global_interpolation.f90.

◆ global_interpolation_evaluate_masked()

subroutine global_interpolation::global_interpolation_evaluate_masked ( class(global_interpolation_t), intent(inout), target  this,
real(kind=rp), dimension(this%n_points), intent(inout), target  interp_values,
real(kind=rp), dimension(this%n_dof), intent(inout), target  field,
type(mask_t), intent(in mask,
logical, intent(in on_host 
)
private
Parameters
interp_valuesArray of values in the given points.
fieldArray of values used for interpolation.
on_hostIf interpolation should be carried out on the host
maskMask for the field. Should coincide to that given at initialization of the global_interpolation object.

Definition at line 1141 of file global_interpolation.f90.

Here is the call graph for this function:

◆ 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
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 1095 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), target  this)
private

Find element candidates at this rank

Copy xyz coords to each element candidate

Definition at line 479 of file global_interpolation.f90.

Here is the call graph for this function:
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
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 980 of file global_interpolation.f90.

Here is the call graph for this function:

◆ global_interpolation_find_coords1d()

subroutine global_interpolation::global_interpolation_find_coords1d ( class(global_interpolation_t), intent(inout this,
real(kind=rp), dimension(n_points)  x,
real(kind=rp), dimension(n_points)  y,
real(kind=rp), dimension(n_points)  z,
integer  n_points 
)
private
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 1015 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
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 1066 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), target  this)
private

Definition at line 396 of file global_interpolation.f90.

◆ global_interpolation_free_points()

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

Definition at line 440 of file global_interpolation.f90.

Here is the call graph for this function:

◆ global_interpolation_free_points_local()

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

Definition at line 461 of file global_interpolation.f90.

Here is the call graph for this function:

◆ global_interpolation_init_dof()

subroutine global_interpolation::global_interpolation_init_dof ( class(global_interpolation_t), intent(inout), target  this,
type(dofmap_t dof,
type(mpi_comm), intent(in), optional  comm,
real(kind=rp), optional  tol,
real(kind=rp), optional  pad,
type(mask_t), intent(in), optional  mask 
)
Parameters
dofDofmap on which the interpolation is to be carried out.
tolTolerance for Newton iterations.
padPadding of the bounding boxes. @mask Mask that indicates which portions of the domain to include

Definition at line 189 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 1042 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), target  this,
real(kind=rp), dimension(:), intent(in x,
real(kind=rp), dimension(:), intent(in y,
real(kind=rp), dimension(:), intent(in z,
integer, intent(in gdim,
integer, intent(in nelv,
type(space_t), intent(in xh,
type(mpi_comm), intent(in), optional  comm,
real(kind=rp), intent(in), optional  tol,
real(kind=rp), intent(in), optional  pad 
)
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.
padPadding of the bounding boxes.

Definition at line 245 of file global_interpolation.f90.

Here is the call graph for this function:

◆ rst_cmp()

logical function global_interpolation::rst_cmp ( real(kind=rp), dimension(3)  rst1,
real(kind=rp), dimension(3)  rst2,
real(kind=rp), dimension(3)  res1,
real(kind=rp), dimension(3)  res2,
real(kind=rp)  tol 
)
private
Parameters
rst1local coordinates for point 1
rst2local coordinates for point 2
rst1distance between xyz(rst1) and the true xyz coordinate
rst2distance between xyz(rst2) and the true xyz coordinate
tolTolerance for how much rst1 and rst2 can over/undershoot [-1,1]

Else we check rst2 is inside and has a smaller distance

Definition at line 1198 of file global_interpolation.f90.

Here is the caller graph for this function:

Variable Documentation

◆ glob_map_size

integer, parameter, public global_interpolation::glob_map_size = 4096

Definition at line 70 of file global_interpolation.f90.