|
Neko 1.99.3
A portable framework for high-order spectral element flow simulations
|
Implements global interpolation for arbitrary points in the domain. More...

Public Member Functions | |
| procedure, pass(this) | init_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(this) | init_dof (this, dof, comm, tol, pad, mask) |
| Initialize the global interpolation object based on a dofmap. | |
| procedure, pass(this) | free (this) |
| Destructor. | |
| procedure, pass(this) | free_points (this) |
| Destructor for arrays related to evaluation points. | |
| procedure, pass(this) | free_points_local (this) |
| procedure, pass(this) | find_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(this) | find_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(this) | find_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(this) | check_points (this, x, y, z) |
| Subroutine to check if the points are within the tolerance. | |
| procedure, pass(this) | find_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(this) | evaluate (this, interp_values, field, on_host) |
| Evaluate the value of the field in each point. | |
| procedure, pass(this) | evaluate_masked (this, interp_values, field, mask, on_host) |
| Evaluate the interpolated value in a masked field. | |
| generic | init (this, dof, comm, tol, pad, mask) |
| Generic constructor. | |
| generic | init (this, x, y, z, gdim, nelv, xh, comm, tol, pad) |
| Generic constructor. | |
Public Attributes | |
| type(vector_t) | x |
| X coordinates from which to interpolate. | |
| type(vector_t) | y |
| Y coordinates from which to interpolate. | |
| type(vector_t) | z |
| 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_t) | xh |
| 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_t) | local_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_t) | rst_finder |
| Object to find rst coordinates. | |
| type(glb_intrp_comm_t) | glb_intrp_comm |
| Things for communication operation (sending interpolated values back and forth) | |
| type(vector_t) | temp_local |
| Working vectors for global interpolation. | |
| type(vector_t) | temp |
| integer | n_dof = -1 |
| type(vector_t) | masked_field |
Definition at line 73 of file global_interpolation.f90.
| 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 169 of file global_interpolation.f90.
| 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 | ||
| ) |
| interp_values | Array of values in the given points. |
| field | Array of values used for interpolation. |
| on_host | If interpolation should be carried out on the host |
Definition at line 174 of file global_interpolation.f90.
| procedure, pass(this) global_interpolation::global_interpolation_t::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 | ||
| ) |
| interp_values | Array of values in the given points. |
| field | Array of values used for interpolation. |
| on_host | If interpolation should be carried out on the host |
| mask | Mask for the field. Should coincide to that given at initialization of the global_interpolation object. |
Definition at line 175 of file global_interpolation.f90.
| 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 | ||
| ) |
| x | The x-coordinates of the points. |
| y | The y-coordinates of the points. |
| z | The z-coordinates of the points. |
| n_points | The number of points. |
Definition at line 172 of file global_interpolation.f90.
| 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 | ||
| ) |
| x | The x-coordinates of the points. |
| y | The y-coordinates of the points. |
| z | The z-coordinates of the points. |
| n_points | The number of points. |
Definition at line 172 of file global_interpolation.f90.
| 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 | ||
| ) |
| xyz | The coordinates of the points. |
| n_points | The number of points. |
Definition at line 172 of file global_interpolation.f90.
| 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 | ||
| ) |
| xyz | The coordinates of the points. |
| n_points | The number of points. |
Definition at line 159 of file global_interpolation.f90.
| 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 | ||
| ) |
| x | The x-coordinates of the points. |
| y | The y-coordinates of the points. |
| z | The z-coordinates of the points. |
| n_points | The number of points. |
Definition at line 164 of file global_interpolation.f90.
| 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 | ||
| ) |
| x | The x-coordinates of the points. |
| y | The y-coordinates of the points. |
| z | The z-coordinates of the points. |
| n_points | The number of points. |
Definition at line 166 of file global_interpolation.f90.
| 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 | ||
| ) |
| xyz | The coordinates of the points. |
| n_points | The number of points. |
Definition at line 171 of file global_interpolation.f90.
| procedure, pass(this) global_interpolation::global_interpolation_t::free | ( | class(global_interpolation_t), intent(inout), target | this | ) |
Definition at line 155 of file global_interpolation.f90.
| procedure, pass(this) global_interpolation::global_interpolation_t::free_points | ( | class(global_interpolation_t), intent(inout), target | this | ) |
Definition at line 157 of file global_interpolation.f90.
| procedure, pass(this) global_interpolation::global_interpolation_t::free_points_local | ( | class(global_interpolation_t), intent(inout), target | this | ) |
Definition at line 158 of file global_interpolation.f90.
| 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, | ||
| type(mask_t), intent(in), optional | mask | ||
| ) |
| dof | Dofmap on which the interpolation is to be carried out. |
| tol | Tolerance for Newton iterations. |
| pad | Padding of the bounding boxes. @mask Mask that indicates which portions of the domain to include |
Definition at line 178 of file global_interpolation.f90.
| 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 | ||
| ) |
| x | x-coordinates. |
| y | y-coordinates. |
| z | z-coordinates. |
| gdim | Geometric dimension. |
| nelv | Number of elements of the mesh in which to search for the points. |
| Xh | Space on which to interpolate. |
| tol | Tolerance for Newton iterations. |
| pad | Padding of the bounding boxes. |
Definition at line 178 of file global_interpolation.f90.
| 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, | ||
| type(mask_t), intent(in), optional | mask | ||
| ) |
| dof | Dofmap on which the interpolation is to be carried out. |
| tol | Tolerance for Newton iterations. |
| pad | Padding of the bounding boxes. @mask Mask that indicates which portions of the domain to include |
Definition at line 153 of file global_interpolation.f90.
| 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 | ||
| ) |
| x | x-coordinates. |
| y | y-coordinates. |
| z | z-coordinates. |
| gdim | Geometric dimension. |
| nelv | Number of elements of the mesh in which to search for the points. |
| Xh | Space on which to interpolate. |
| tol | Tolerance for Newton iterations. |
| pad | Padding of the bounding boxes. |
Definition at line 151 of file global_interpolation.f90.
| logical global_interpolation::global_interpolation_t::all_points_local = .false. |
Definition at line 120 of file global_interpolation.f90.
| type(mpi_comm) global_interpolation::global_interpolation_t::comm |
Definition at line 87 of file global_interpolation.f90.
| class(el_finder_t), allocatable global_interpolation::global_interpolation_t::el_finder |
Definition at line 139 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::el_owner0 |
Definition at line 107 of file global_interpolation.f90.
| type(c_ptr) global_interpolation::global_interpolation_t::el_owner0_d = C_NULL_PTR |
Definition at line 108 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::el_owner0_local |
Definition at line 112 of file global_interpolation.f90.
| type(c_ptr) global_interpolation::global_interpolation_t::el_owner0_local_d = C_NULL_PTR |
Definition at line 113 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::gdim |
Definition at line 81 of file global_interpolation.f90.
| type(glb_intrp_comm_t) global_interpolation::global_interpolation_t::glb_intrp_comm |
Definition at line 143 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::glb_nelv |
Definition at line 85 of file global_interpolation.f90.
| type(local_interpolator_t) global_interpolation::global_interpolation_t::local_interp |
Definition at line 117 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::masked_field |
Definition at line 147 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::n_dof = -1 |
Definition at line 146 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::n_points |
Definition at line 96 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::n_points_local |
Definition at line 111 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_offset_pe |
Definition at line 130 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_offset_pe_local |
Definition at line 134 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_pe |
Definition at line 129 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_pe_local |
Definition at line 133 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::nelv |
Definition at line 83 of file global_interpolation.f90.
Definition at line 124 of file global_interpolation.f90.
| class(pe_finder_t), allocatable global_interpolation::global_interpolation_t::pe_finder |
Definition at line 137 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::pe_owner |
Definition at line 102 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::pe_rank |
Definition at line 89 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::pe_size |
Definition at line 91 of file global_interpolation.f90.
| type(stack_i4_t), dimension(:), allocatable global_interpolation::global_interpolation_t::points_at_pe |
Definition at line 104 of file global_interpolation.f90.
| real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::rst |
Definition at line 100 of file global_interpolation.f90.
| type(legendre_rst_finder_t) global_interpolation::global_interpolation_t::rst_finder |
Definition at line 141 of file global_interpolation.f90.
| real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::rst_local |
Definition at line 114 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::temp |
Definition at line 145 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::temp_local |
Definition at line 145 of file global_interpolation.f90.
Definition at line 122 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::x |
Definition at line 75 of file global_interpolation.f90.
| type(space_t) global_interpolation::global_interpolation_t::xh |
Definition at line 93 of file global_interpolation.f90.
| real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::xyz |
Definition at line 98 of file global_interpolation.f90.
| real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::xyz_local |
Definition at line 115 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::y |
Definition at line 77 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::z |
Definition at line 79 of file global_interpolation.f90.