Neko 1.99.1
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
global_interpolation::global_interpolation_t Type Reference

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

Collaboration diagram for global_interpolation::global_interpolation_t:

Public Member Functions

procedure, pass(thisinit_xyz (this, x, y, z, gdim, nelv, xh, comm, tol, pad)
 Initialize the global interpolation object based on a set of spectral elements.
 
procedure, pass(thisinit_dof (this, dof, comm, tol, pad)
 Initialize the global interpolation object based on a dofmap.
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thisfree_points (this)
 Destructor for arrays related to evaluation points.
 
procedure, pass(thisfree_points_local (this)
 
procedure, pass(thisfind_points_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.
 
procedure, pass(thisfind_points_coords (this, x, y, z, n_points)
 Finds the process owner, global element number, and local rst coordinates for each point. Sets up correct values to be able to evalute the points.
 
procedure, pass(thisfind_points_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.
 
procedure, pass(thischeck_points (this, x, y, z)
 Subroutine to check if the points are within the tolerance.
 
procedure, pass(thisfind_points_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.
 
generic find_points (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.
 
generic find_points (this, x, y, z, n_points)
 Finds the process owner, global element number, and local rst coordinates for each point. Sets up correct values to be able to evalute the points.
 
generic find_points (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.
 
procedure, pass(thisevaluate (this, interp_values, field, on_host)
 Evaluate the value of the field in each point.
 
generic init (this, dof, comm, tol, pad)
 Generic constructor.
 
generic init (this, x, y, z, gdim, nelv, xh, comm, tol, pad)
 Generic constructor.
 

Public Attributes

type(vector_tx
 X coordinates from which to interpolate.
 
type(vector_ty
 Y coordinates from which to interpolate.
 
type(vector_tz
 Z coordinates from which to interpolate.
 
integer gdim
 Geometric dimension of the simulation.
 
integer nelv
 Number of elements.
 
integer glb_nelv
 Global number of elements.
 
type(mpi_comm) comm
 Which communicator to do interpolation on.
 
integer pe_rank
 pe_rank in comm
 
integer pe_size
 pe_size of comm
 
type(space_txh
 Space.
 
integer n_points
 Components related to the points we want to evalute Number of points we want to evaluate.
 
real(kind=rp), dimension(:,:), allocatable xyz
 x,y,z coordinates
 
real(kind=rp), dimension(:,:), allocatable rst
 r,s,t coordinates
 
integer, dimension(:), allocatable pe_owner
 List of owning processes.
 
type(stack_i4_t), dimension(:), allocatable points_at_pe
 array of stacks (to avoid expensive reinitialization)
 
integer, dimension(:), allocatable el_owner0
 List of owning elements. Note this is 0 indexed.
 
type(c_ptr) el_owner0_d = C_NULL_PTR
 
integer n_points_local
 Local points (points in this ranks domain)
 
integer, dimension(:), allocatable el_owner0_local
 
type(c_ptr) el_owner0_local_d = C_NULL_PTR
 
real(kind=rp), dimension(:,:), allocatable rst_local
 
real(kind=rp), dimension(:,:), allocatable xyz_local
 
type(local_interpolator_tlocal_interp
 Interpolator for local points.
 
logical all_points_local = .false.
 If all points are local on this PE. Turns true if points are redistributed to their respective owners.
 
real(kind=rp) tol = NEKO_EPS*1e3_rp
 Tolerance for Newton solve to find the correct rst coordinates.
 
real(kind=rp) padding = 1e-2_rp
 Padding.
 
integer, dimension(:), allocatable n_points_pe
 Mapping of points to ranks. n_points_pe(pe_rank) = n_points I have at this rank Sum(n_points_pe) = n_points.
 
integer, dimension(:), allocatable n_points_offset_pe
 
integer, dimension(:), allocatable n_points_pe_local
 n_points_pe_local(pe_rank) = Number local points to send to this rank. Sum(n_points_pe_local) = n_points_local
 
integer, dimension(:), allocatable n_points_offset_pe_local
 
class(pe_finder_t), allocatable pe_finder
 Finding elements Structure to find rank candidates.
 
class(el_finder_t), allocatable el_finder
 Structure to find element candidates.
 
type(legendre_rst_finder_trst_finder
 Object to find rst coordinates.
 
type(glb_intrp_comm_tglb_intrp_comm
 Things for communication operation (sending interpolated values back and forth)
 
type(vector_ttemp_local
 Working vectors for global interpolation.
 
type(vector_ttemp
 

Detailed Description

Definition at line 71 of file global_interpolation.f90.

Member Function/Subroutine Documentation

◆ check_points()

procedure, pass(this) global_interpolation::global_interpolation_t::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 
)

Definition at line 165 of file global_interpolation.f90.

◆ evaluate()

procedure, pass(this) global_interpolation::global_interpolation_t::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 
)
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 170 of file global_interpolation.f90.

◆ find_points() [1/3]

generic global_interpolation::global_interpolation_t::find_points ( 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 
)
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 168 of file global_interpolation.f90.

◆ find_points() [2/3]

generic global_interpolation::global_interpolation_t::find_points ( 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 
)
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 168 of file global_interpolation.f90.

◆ find_points() [3/3]

generic global_interpolation::global_interpolation_t::find_points ( class(global_interpolation_t), intent(inout this,
real(kind=rp), dimension(3, n_points), intent(inout xyz,
integer, intent(in n_points 
)
Parameters
xyzThe coordinates of the points.
n_pointsThe number of points.

Definition at line 168 of file global_interpolation.f90.

◆ find_points_and_redist()

procedure, pass(this) global_interpolation::global_interpolation_t::find_points_and_redist ( class(global_interpolation_t), intent(inout this,
real(kind=rp), dimension(:,:), intent(inout), allocatable  xyz,
integer, intent(inout n_points 
)
Parameters
xyzThe coordinates of the points.
n_pointsThe number of points.

Definition at line 155 of file global_interpolation.f90.

◆ find_points_coords()

procedure, pass(this) global_interpolation::global_interpolation_t::find_points_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 
)
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 160 of file global_interpolation.f90.

◆ find_points_coords1d()

procedure, pass(this) global_interpolation::global_interpolation_t::find_points_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 
)
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 162 of file global_interpolation.f90.

◆ find_points_xyz()

procedure, pass(this) global_interpolation::global_interpolation_t::find_points_xyz ( class(global_interpolation_t), intent(inout this,
real(kind=rp), dimension(3, n_points), intent(inout xyz,
integer, intent(in n_points 
)
Parameters
xyzThe coordinates of the points.
n_pointsThe number of points.

Definition at line 167 of file global_interpolation.f90.

◆ free()

procedure, pass(this) global_interpolation::global_interpolation_t::free ( class(global_interpolation_t), intent(inout), target  this)

Definition at line 151 of file global_interpolation.f90.

◆ free_points()

procedure, pass(this) global_interpolation::global_interpolation_t::free_points ( class(global_interpolation_t), intent(inout), target  this)

Definition at line 153 of file global_interpolation.f90.

◆ free_points_local()

procedure, pass(this) global_interpolation::global_interpolation_t::free_points_local ( class(global_interpolation_t), intent(inout), target  this)

Definition at line 154 of file global_interpolation.f90.

◆ init() [1/2]

generic global_interpolation::global_interpolation_t::init ( 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 
)
Parameters
dofDofmap on which the interpolation is to be carried out.
tolTolerance for Newton iterations.

Definition at line 173 of file global_interpolation.f90.

◆ init() [2/2]

generic global_interpolation::global_interpolation_t::init ( 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 
)
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 173 of file global_interpolation.f90.

◆ init_dof()

procedure, pass(this) global_interpolation::global_interpolation_t::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 
)
Parameters
dofDofmap on which the interpolation is to be carried out.
tolTolerance for Newton iterations.

Definition at line 149 of file global_interpolation.f90.

◆ init_xyz()

procedure, pass(this) global_interpolation::global_interpolation_t::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 
)
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 147 of file global_interpolation.f90.

Member Data Documentation

◆ all_points_local

logical global_interpolation::global_interpolation_t::all_points_local = .false.

Definition at line 118 of file global_interpolation.f90.

◆ comm

type(mpi_comm) global_interpolation::global_interpolation_t::comm

Definition at line 85 of file global_interpolation.f90.

◆ el_finder

class(el_finder_t), allocatable global_interpolation::global_interpolation_t::el_finder

Definition at line 137 of file global_interpolation.f90.

◆ el_owner0

integer, dimension(:), allocatable global_interpolation::global_interpolation_t::el_owner0

Definition at line 105 of file global_interpolation.f90.

◆ el_owner0_d

type(c_ptr) global_interpolation::global_interpolation_t::el_owner0_d = C_NULL_PTR

Definition at line 106 of file global_interpolation.f90.

◆ el_owner0_local

integer, dimension(:), allocatable global_interpolation::global_interpolation_t::el_owner0_local

Definition at line 110 of file global_interpolation.f90.

◆ el_owner0_local_d

type(c_ptr) global_interpolation::global_interpolation_t::el_owner0_local_d = C_NULL_PTR

Definition at line 111 of file global_interpolation.f90.

◆ gdim

integer global_interpolation::global_interpolation_t::gdim

Definition at line 79 of file global_interpolation.f90.

◆ glb_intrp_comm

type(glb_intrp_comm_t) global_interpolation::global_interpolation_t::glb_intrp_comm

Definition at line 141 of file global_interpolation.f90.

◆ glb_nelv

integer global_interpolation::global_interpolation_t::glb_nelv

Definition at line 83 of file global_interpolation.f90.

◆ local_interp

type(local_interpolator_t) global_interpolation::global_interpolation_t::local_interp

Definition at line 115 of file global_interpolation.f90.

◆ n_points

integer global_interpolation::global_interpolation_t::n_points

Definition at line 94 of file global_interpolation.f90.

◆ n_points_local

integer global_interpolation::global_interpolation_t::n_points_local

Definition at line 109 of file global_interpolation.f90.

◆ n_points_offset_pe

integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_offset_pe

Definition at line 128 of file global_interpolation.f90.

◆ n_points_offset_pe_local

integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_offset_pe_local

Definition at line 132 of file global_interpolation.f90.

◆ n_points_pe

integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_pe

Definition at line 127 of file global_interpolation.f90.

◆ n_points_pe_local

integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_pe_local

Definition at line 131 of file global_interpolation.f90.

◆ nelv

integer global_interpolation::global_interpolation_t::nelv

Definition at line 81 of file global_interpolation.f90.

◆ padding

real(kind=rp) global_interpolation::global_interpolation_t::padding = 1e-2_rp

Definition at line 122 of file global_interpolation.f90.

◆ pe_finder

class(pe_finder_t), allocatable global_interpolation::global_interpolation_t::pe_finder

Definition at line 135 of file global_interpolation.f90.

◆ pe_owner

integer, dimension(:), allocatable global_interpolation::global_interpolation_t::pe_owner

Definition at line 100 of file global_interpolation.f90.

◆ pe_rank

integer global_interpolation::global_interpolation_t::pe_rank

Definition at line 87 of file global_interpolation.f90.

◆ pe_size

integer global_interpolation::global_interpolation_t::pe_size

Definition at line 89 of file global_interpolation.f90.

◆ points_at_pe

type(stack_i4_t), dimension(:), allocatable global_interpolation::global_interpolation_t::points_at_pe

Definition at line 102 of file global_interpolation.f90.

◆ rst

real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::rst

Definition at line 98 of file global_interpolation.f90.

◆ rst_finder

type(legendre_rst_finder_t) global_interpolation::global_interpolation_t::rst_finder

Definition at line 139 of file global_interpolation.f90.

◆ rst_local

real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::rst_local

Definition at line 112 of file global_interpolation.f90.

◆ temp

type(vector_t) global_interpolation::global_interpolation_t::temp

Definition at line 143 of file global_interpolation.f90.

◆ temp_local

type(vector_t) global_interpolation::global_interpolation_t::temp_local

Definition at line 143 of file global_interpolation.f90.

◆ tol

real(kind=rp) global_interpolation::global_interpolation_t::tol = NEKO_EPS*1e3_rp

Definition at line 120 of file global_interpolation.f90.

◆ x

type(vector_t) global_interpolation::global_interpolation_t::x

Definition at line 73 of file global_interpolation.f90.

◆ xh

type(space_t) global_interpolation::global_interpolation_t::xh

Definition at line 91 of file global_interpolation.f90.

◆ xyz

real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::xyz

Definition at line 96 of file global_interpolation.f90.

◆ xyz_local

real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::xyz_local

Definition at line 113 of file global_interpolation.f90.

◆ y

type(vector_t) global_interpolation::global_interpolation_t::y

Definition at line 75 of file global_interpolation.f90.

◆ z

type(vector_t) global_interpolation::global_interpolation_t::z

Definition at line 77 of file global_interpolation.f90.


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