Neko 0.9.99
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, tol) |
Initialize the global interpolation object on a dofmap. | |
procedure, pass(this) | init_dof (this, dof, tol) |
Initialize the global interpolation object 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) | 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. After this the values at these points can be evaluated. If the locations of the points change this must be called again. | |
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_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(this) | evaluate (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_t) | x |
X coordinates from which to interpolate. | |
type(array_ptr_t) | y |
Y coordinates from which to interpolate. | |
type(array_ptr_t) | z |
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_t) | local_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. | |
Definition at line 54 of file global_interpolation.F90.
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 | ||
) |
interp_values | Array of values in the given points. |
field | Array of values used for interpolation. |
Definition at line 114 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 | ||
) |
error_code
: returns 0
if point found, 1
if closest point on a border (check dist2), 2
if not founddist2
: distance squared (used to compare the points found by each processor) 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 112 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 | ||
) |
error_code
: returns 0
if point found, 1
if closest point on a border (check dist2), 2
if not founddist2
: distance squared (used to compare the points found by each processor) xyz | The coordinates of the points. |
n_points | The number of points. |
Definition at line 112 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 | ||
) |
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) xyz | The coordinates of the points. |
n_points | The number of points. |
Definition at line 104 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 | ||
) |
error_code
: returns 0
if point found, 1
if closest point on a border (check dist2), 2
if not founddist2
: distance squared (used to compare the points found by each processor) 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 109 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 | ||
) |
error_code
: returns 0
if point found, 1
if closest point on a border (check dist2), 2
if not founddist2
: distance squared (used to compare the points found by each processor) xyz | The coordinates of the points. |
n_points | The number of points. |
Definition at line 111 of file global_interpolation.F90.
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.
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.
generic global_interpolation::global_interpolation_t::init | ( | class(global_interpolation_t), intent(inout) | this, |
type(dofmap_t), target | dof, | ||
real(kind=rp), optional | tol | ||
) |
dof | Dofmap on which the interpolation is to be carried out. |
tol | Tolerance for Newton iterations. |
Definition at line 117 of file global_interpolation.F90.
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 | ||
) |
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. |
Definition at line 117 of file global_interpolation.F90.
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 | ||
) |
dof | Dofmap on which the interpolation is to be carried out. |
tol | Tolerance for Newton iterations. |
Definition at line 99 of file global_interpolation.F90.
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 | ||
) |
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. |
Definition at line 98 of file global_interpolation.F90.
logical global_interpolation::global_interpolation_t::all_points_local = .false. |
Definition at line 70 of file global_interpolation.F90.
real(kind=rp), dimension(:), allocatable global_interpolation::global_interpolation_t::dist2 |
Definition at line 91 of file global_interpolation.F90.
integer, dimension(:), allocatable global_interpolation::global_interpolation_t::el_owner |
Definition at line 84 of file global_interpolation.F90.
type(c_ptr) global_interpolation::global_interpolation_t::el_owner_d = c_null_ptr |
Definition at line 85 of file global_interpolation.F90.
integer, dimension(:), allocatable global_interpolation::global_interpolation_t::error_code |
Definition at line 93 of file global_interpolation.F90.
integer global_interpolation::global_interpolation_t::gdim |
Definition at line 62 of file global_interpolation.F90.
integer global_interpolation::global_interpolation_t::gs_handle |
Definition at line 73 of file global_interpolation.F90.
logical global_interpolation::global_interpolation_t::gs_init = .false. |
Definition at line 74 of file global_interpolation.F90.
type(local_interpolator_t) global_interpolation::global_interpolation_t::local_interp |
Definition at line 68 of file global_interpolation.F90.
integer global_interpolation::global_interpolation_t::n_points |
Definition at line 77 of file global_interpolation.F90.
integer global_interpolation::global_interpolation_t::nelv |
Definition at line 64 of file global_interpolation.F90.
integer, dimension(:), allocatable global_interpolation::global_interpolation_t::proc_owner |
Definition at line 82 of file global_interpolation.F90.
real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::rst |
Definition at line 88 of file global_interpolation.F90.
Definition at line 95 of file global_interpolation.F90.
type(array_ptr_t) global_interpolation::global_interpolation_t::x |
Definition at line 56 of file global_interpolation.F90.
Definition at line 66 of file global_interpolation.F90.
real(kind=rp), dimension(:,:), allocatable global_interpolation::global_interpolation_t::xyz |
Definition at line 80 of file global_interpolation.F90.
type(array_ptr_t) global_interpolation::global_interpolation_t::y |
Definition at line 58 of file global_interpolation.F90.
type(array_ptr_t) global_interpolation::global_interpolation_t::z |
Definition at line 60 of file global_interpolation.F90.