|
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_json_xyz (this, x, y, z, gdim, nelv, xh, params_subdict, comm) |
| Initialize the global interpolation object from a JSON subdict (xyz version). | |
| procedure, pass(this) | init_json_dof (this, dof, params_subdict, comm, mask) |
| Initialize the global interpolation object from a JSON subdict (dof version). | |
| 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. | |
| generic | init (this, x, y, z, gdim, nelv, xh, params_subdict, comm) |
| Generic constructor. | |
| generic | init (this, dof, params_subdict, comm, mask) |
| 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=dp) | tolerance = GLOB_INTERP_TOL |
| Tolerance for Newton solve to find the correct rst coordinates. | |
| real(kind=dp) | padding = GLOB_INTERP_PAD |
| 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 77 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 184 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 190 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 191 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 187 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 187 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 187 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 174 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 179 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 181 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 186 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 169 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 171 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 172 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=dp), optional | tol, | ||
| real(kind=dp), 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 instead of tol and pad. |
Definition at line 195 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(json_file), intent(inout) | params_subdict, | ||
| type(mpi_comm), intent(in), optional | comm, | ||
| type(mask_t), intent(in), optional | mask | ||
| ) |
| dof | Dofmap on which the interpolation is to be carried out. |
| params_subdict | A JSON object containing parameters to use for initialization. |
| comm | Communicator to use for initialization. If not given, NEKO_COMM is used. |
| mask | Mask that indicates which portions of the domain to include. |
Definition at line 195 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=dp), intent(in), optional | tol, | ||
| real(kind=dp), 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 195 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(json_file), intent(inout) | params_subdict, | ||
| type(mpi_comm), intent(in), optional | comm | ||
| ) |
| 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. |
| params_subdict | A JSON object containing parameters to use for initialization instead of tol and pad. |
| comm | Communicator to use for initialization. If not given, NEKO_COMM is used. |
Definition at line 195 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=dp), optional | tol, | ||
| real(kind=dp), 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 instead of tol and pad. |
Definition at line 167 of file global_interpolation.f90.
| procedure, pass(this) global_interpolation::global_interpolation_t::init_json_dof | ( | class(global_interpolation_t), intent(inout), target | this, |
| type(dofmap_t) | dof, | ||
| type(json_file), intent(inout) | params_subdict, | ||
| type(mpi_comm), intent(in), optional | comm, | ||
| type(mask_t), intent(in), optional | mask | ||
| ) |
| dof | Dofmap on which the interpolation is to be carried out. |
| params_subdict | A JSON object containing parameters to use for initialization. |
| comm | Communicator to use for initialization. If not given, NEKO_COMM is used. |
| mask | Mask that indicates which portions of the domain to include. |
Definition at line 161 of file global_interpolation.f90.
| procedure, pass(this) global_interpolation::global_interpolation_t::init_json_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(json_file), intent(inout) | params_subdict, | ||
| type(mpi_comm), intent(in), optional | comm | ||
| ) |
| 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. |
| params_subdict | A JSON object containing parameters to use for initialization instead of tol and pad. |
| comm | Communicator to use for initialization. If not given, NEKO_COMM is used. |
Definition at line 157 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=dp), intent(in), optional | tol, | ||
| real(kind=dp), 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 165 of file global_interpolation.f90.
| logical global_interpolation::global_interpolation_t::all_points_local = .false. |
Definition at line 124 of file global_interpolation.f90.
| type(mpi_comm) global_interpolation::global_interpolation_t::comm |
Definition at line 91 of file global_interpolation.f90.
| class(el_finder_t), allocatable global_interpolation::global_interpolation_t::el_finder |
Definition at line 143 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::el_owner0 |
Definition at line 111 of file global_interpolation.f90.
| type(c_ptr) global_interpolation::global_interpolation_t::el_owner0_d = C_NULL_PTR |
Definition at line 112 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::el_owner0_local |
Definition at line 116 of file global_interpolation.f90.
| type(c_ptr) global_interpolation::global_interpolation_t::el_owner0_local_d = C_NULL_PTR |
Definition at line 117 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::gdim |
Definition at line 85 of file global_interpolation.f90.
| type(glb_intrp_comm_t) global_interpolation::global_interpolation_t::glb_intrp_comm |
Definition at line 148 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::glb_nelv |
Definition at line 89 of file global_interpolation.f90.
| type(local_interpolator_t) global_interpolation::global_interpolation_t::local_interp |
Definition at line 121 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::masked_field |
Definition at line 152 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::n_dof = -1 |
Definition at line 151 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::n_points |
Definition at line 100 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::n_points_local |
Definition at line 115 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_offset_pe |
Definition at line 134 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_offset_pe_local |
Definition at line 138 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_pe |
Definition at line 133 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::n_points_pe_local |
Definition at line 137 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::nelv |
Definition at line 87 of file global_interpolation.f90.
| real(kind=dp) global_interpolation::global_interpolation_t::padding = GLOB_INTERP_PAD |
Definition at line 128 of file global_interpolation.f90.
| class(pe_finder_t), allocatable global_interpolation::global_interpolation_t::pe_finder |
Definition at line 141 of file global_interpolation.f90.
| integer, dimension(:), allocatable global_interpolation::global_interpolation_t::pe_owner |
Definition at line 106 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::pe_rank |
Definition at line 93 of file global_interpolation.f90.
| integer global_interpolation::global_interpolation_t::pe_size |
Definition at line 95 of file global_interpolation.f90.
| type(stack_i4_t), dimension(:), allocatable global_interpolation::global_interpolation_t::points_at_pe |
Definition at line 108 of file global_interpolation.f90.
| real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::rst |
Definition at line 104 of file global_interpolation.f90.
| type(legendre_rst_finder_t) global_interpolation::global_interpolation_t::rst_finder |
Definition at line 145 of file global_interpolation.f90.
| real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::rst_local |
Definition at line 118 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::temp |
Definition at line 150 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::temp_local |
Definition at line 150 of file global_interpolation.f90.
| real(kind=dp) global_interpolation::global_interpolation_t::tolerance = GLOB_INTERP_TOL |
Definition at line 126 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::x |
Definition at line 79 of file global_interpolation.f90.
| type(space_t) global_interpolation::global_interpolation_t::xh |
Definition at line 97 of file global_interpolation.f90.
| real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::xyz |
Definition at line 102 of file global_interpolation.f90.
| real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::xyz_local |
Definition at line 119 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::y |
Definition at line 81 of file global_interpolation.f90.
| type(vector_t) global_interpolation::global_interpolation_t::z |
Definition at line 83 of file global_interpolation.f90.