Neko 0.9.99
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, tol)
 Initialize the global interpolation object on a dofmap.
 
procedure, pass(thisinit_dof (this, dof, tol)
 Initialize the global interpolation object on a dofmap.
 
procedure, pass(thisfree (this)
 Destructor.
 
procedure, pass(thisfree_points (this)
 Destructor for arrays related to evaluation points.
 
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. After this the values at these points can be evaluated. If the locations of the points change this must be called again.
 
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_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.
 
procedure, pass(thisevaluate (this, interp_values, field)
 Evaluate the value of the field in each point.
 
generic init (this, dof, tol)
 Generic constructor.
 
generic init (this, x, y, z, gdim, nelv, xh, tol)
 Generic constructor.
 

Public Attributes

type(array_ptr_tx
 X coordinates from which to interpolate.
 
type(array_ptr_ty
 Y coordinates from which to interpolate.
 
type(array_ptr_tz
 Z coordinates from which to interpolate.
 
integer gdim
 Geometric dimension of the simulation.
 
integer nelv
 Number of elements.
 
type(space_t), pointer xh
 Space.
 
type(local_interpolator_tlocal_interp
 Interpolator for local points.
 
logical all_points_local = .false.
 If all points are local on this PE.
 
integer gs_handle
 
logical gs_init = .false.
 
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, findpts format.
 
integer, dimension(:), allocatable proc_owner
 List of owning processes.
 
integer, dimension(:), allocatable el_owner
 List of owning elements.
 
type(c_ptr) el_owner_d = c_null_ptr
 
real(kind=rp), dimension(:,:), allocatable rst
 r,s,t coordinates findpts format.
 
real(kind=rp), dimension(:), allocatable dist2
 Distance squared between original and interpolated point. (in xyz space) (according to gslib)
 
integer, dimension(:), allocatable error_code
 Error code for each point, needed for gslib.
 
real(kind=rp) tol = 5d-13
 Tolerance for distance squared between original and interpolated point.
 

Detailed Description

Definition at line 54 of file global_interpolation.F90.

Member Function/Subroutine Documentation

◆ evaluate()

procedure, pass(this) global_interpolation::global_interpolation_t::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 
)
Parameters
interp_valuesArray of values in the given points.
fieldArray of values used for interpolation.

Definition at line 114 of file global_interpolation.F90.

◆ find_points() [1/2]

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 
)
  • 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 112 of file global_interpolation.F90.

◆ find_points() [2/2]

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 
)
  • 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.

Definition at line 112 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 
)
  • 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.

Definition at line 104 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 
)
  • 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 109 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 
)
  • 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.

Definition at line 111 of file global_interpolation.F90.

◆ free()

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

Definition at line 101 of file global_interpolation.F90.

◆ free_points()

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

Definition at line 103 of file global_interpolation.F90.

◆ init() [1/2]

generic global_interpolation::global_interpolation_t::init ( 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 117 of file global_interpolation.F90.

◆ init() [2/2]

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

◆ init_dof()

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

◆ init_xyz()

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

Member Data Documentation

◆ all_points_local

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

Definition at line 70 of file global_interpolation.F90.

◆ dist2

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

Definition at line 91 of file global_interpolation.F90.

◆ el_owner

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

Definition at line 84 of file global_interpolation.F90.

◆ el_owner_d

type(c_ptr) global_interpolation::global_interpolation_t::el_owner_d = c_null_ptr

Definition at line 85 of file global_interpolation.F90.

◆ error_code

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

Definition at line 93 of file global_interpolation.F90.

◆ gdim

integer global_interpolation::global_interpolation_t::gdim

Definition at line 62 of file global_interpolation.F90.

◆ gs_handle

integer global_interpolation::global_interpolation_t::gs_handle

Definition at line 73 of file global_interpolation.F90.

◆ gs_init

logical global_interpolation::global_interpolation_t::gs_init = .false.

Definition at line 74 of file global_interpolation.F90.

◆ local_interp

type(local_interpolator_t) global_interpolation::global_interpolation_t::local_interp

Definition at line 68 of file global_interpolation.F90.

◆ n_points

integer global_interpolation::global_interpolation_t::n_points

Definition at line 77 of file global_interpolation.F90.

◆ nelv

integer global_interpolation::global_interpolation_t::nelv

Definition at line 64 of file global_interpolation.F90.

◆ proc_owner

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

Definition at line 82 of file global_interpolation.F90.

◆ rst

real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::rst
Note
: When replacing gs we can change format

Definition at line 88 of file global_interpolation.F90.

◆ tol

real(kind=rp) global_interpolation::global_interpolation_t::tol = 5d-13

Definition at line 95 of file global_interpolation.F90.

◆ x

type(array_ptr_t) global_interpolation::global_interpolation_t::x

Definition at line 56 of file global_interpolation.F90.

◆ xh

type(space_t), pointer global_interpolation::global_interpolation_t::xh

Definition at line 66 of file global_interpolation.F90.

◆ xyz

real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::xyz
Note
: When replacing gs we can change format

Definition at line 80 of file global_interpolation.F90.

◆ y

type(array_ptr_t) global_interpolation::global_interpolation_t::y

Definition at line 58 of file global_interpolation.F90.

◆ z

type(array_ptr_t) global_interpolation::global_interpolation_t::z

Definition at line 60 of file global_interpolation.F90.


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