Neko 1.99.11
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
local_interpolation::local_interpolator_t Type Reference

Interpolation on a set of points with known rst coordinates in elements local to this process. Similar to point_interpolator, but prioritizes performance Only works with arrays of coordinates Performs interpolation with the configured NEKO_BCKND. More...

Collaboration diagram for local_interpolation::local_interpolator_t:

Public Member Functions

procedure, pass(this) init_3arrays (this, xh, r, s, t, n_points)
 Constructor.
procedure, pass(this) init_1array (this, xh, rst, n_points)
 Initialization of point interpolation.
procedure, pass(this) free (this)
 Destructor.
procedure, pass(this) evaluate (this, interp_values, el_list, field, nel, on_host)
 Interpolates the scalar field \( X \) on the specified coordinates.
procedure, pass(this) compute_weights (this, r, s, t)
 COmputes weights based on rst coordinates.
generic init (this, xh, r, s, t, n_points)
 Constructor.
generic init (this, xh, rst, n_points)
 Initialization of point interpolation.

Public Attributes

type(space_t), pointer xh => null()
 First space.
integer n_points
 Number of points to interpolate on.
real(kind=rp), dimension(:,:), allocatable weights_r
 Weights for local interpolation.
real(kind=rp), dimension(:,:), allocatable weights_s
real(kind=rp), dimension(:,:), allocatable weights_t
type(c_ptr) weights_r_d = c_null_ptr
type(c_ptr) weights_s_d = c_null_ptr
type(c_ptr) weights_t_d = c_null_ptr

Detailed Description

Definition at line 58 of file local_interpolation.f90.

Member Function/Subroutine Documentation

◆ compute_weights()

procedure, pass(this) local_interpolation::local_interpolator_t::compute_weights ( class(local_interpolator_t), intent(inout) this,
real(kind=rp), dimension(:), intent(in) r,
real(kind=rp), dimension(:), intent(in) s,
real(kind=rp), dimension(:), intent(in) t )
Parameters
rlocal r-coordinates.
slocal s-coordinates.
tlocal t-coordinates.
wrWeights in the r-direction.
wsWeights in the s-direction.
wtWeights in the t-direction.
Note
wr, ws and wt must be arrays of dimensions (lx, N) where N is the number of points (size of the r,s,t arrays).

Definition at line 79 of file local_interpolation.f90.

◆ evaluate()

procedure, pass(this) local_interpolation::local_interpolator_t::evaluate ( class(local_interpolator_t), intent(inout) this,
real(kind=rp), dimension(this%n_points), intent(inout) interp_values,
integer, dimension(this%n_points), intent(in) el_list,
real(kind=rp), dimension(this%xh%lxyz, nel), intent(inout) field,
integer, intent(in) nel,
logical, intent(in) on_host )
Parameters
rstr,s,t coordinates.
el_ownersArray of element ids that "own" a given point i.
sampled_fields_listA list of fields to interpolate.
wrWeights in the r-direction of shape (lx, N) where N is the number of points to interpolate.
wsWeights in the s-direction of shape (lx, N) where N is the number of points to interpolate.
wtWeights in the t-direction of shape (lx, N) where N is the number of points to interpolate.
Note
The weights can be generated with the subroutine compute_weights. Assumes weights have been computed for these points.

Definition at line 77 of file local_interpolation.f90.

◆ free()

procedure, pass(this) local_interpolation::local_interpolator_t::free ( class(local_interpolator_t), intent(inout) this)

Definition at line 75 of file local_interpolation.f90.

◆ init() [1/2]

generic local_interpolation::local_interpolator_t::init ( class(local_interpolator_t), intent(inout), target this,
type(space_t), intent(in), target xh,
real(kind=rp), dimension(n_points) r,
real(kind=rp), dimension(n_points) s,
real(kind=rp), dimension(n_points) t,
integer, intent(in) n_points )
Parameters
xhFunction space.

Definition at line 81 of file local_interpolation.f90.

◆ init() [2/2]

generic local_interpolation::local_interpolator_t::init ( class(local_interpolator_t), intent(inout), target this,
type(space_t), intent(in), target xh,
real(kind=rp), dimension(3, n_points), intent(in) rst,
integer, intent(in) n_points )
Parameters
xhFunction space.

Definition at line 81 of file local_interpolation.f90.

◆ init_1array()

procedure, pass(this) local_interpolation::local_interpolator_t::init_1array ( class(local_interpolator_t), intent(inout), target this,
type(space_t), intent(in), target xh,
real(kind=rp), dimension(3, n_points), intent(in) rst,
integer, intent(in) n_points )
Parameters
xhFunction space.

Definition at line 73 of file local_interpolation.f90.

◆ init_3arrays()

procedure, pass(this) local_interpolation::local_interpolator_t::init_3arrays ( class(local_interpolator_t), intent(inout), target this,
type(space_t), intent(in), target xh,
real(kind=rp), dimension(n_points) r,
real(kind=rp), dimension(n_points) s,
real(kind=rp), dimension(n_points) t,
integer, intent(in) n_points )
Parameters
xhFunction space.

Definition at line 72 of file local_interpolation.f90.

Member Data Documentation

◆ n_points

integer local_interpolation::local_interpolator_t::n_points

Definition at line 62 of file local_interpolation.f90.

◆ weights_r

real(kind=rp), dimension(:,:), allocatable local_interpolation::local_interpolator_t::weights_r

Definition at line 64 of file local_interpolation.f90.

◆ weights_r_d

type(c_ptr) local_interpolation::local_interpolator_t::weights_r_d = c_null_ptr

Definition at line 67 of file local_interpolation.f90.

◆ weights_s

real(kind=rp), dimension(:,:), allocatable local_interpolation::local_interpolator_t::weights_s

Definition at line 65 of file local_interpolation.f90.

◆ weights_s_d

type(c_ptr) local_interpolation::local_interpolator_t::weights_s_d = c_null_ptr

Definition at line 68 of file local_interpolation.f90.

◆ weights_t

real(kind=rp), dimension(:,:), allocatable local_interpolation::local_interpolator_t::weights_t

Definition at line 66 of file local_interpolation.f90.

◆ weights_t_d

type(c_ptr) local_interpolation::local_interpolator_t::weights_t_d = c_null_ptr

Definition at line 69 of file local_interpolation.f90.

◆ xh

type(space_t), pointer local_interpolation::local_interpolator_t::xh => null()

Definition at line 60 of file local_interpolation.f90.


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