Implements global_interpolation given a dofmap.
More...
|
subroutine | global_interpolation_init (this, dof, tol) |
| Evaluate only local points. More...
|
|
subroutine | global_interpolation_free (this) |
| Destructor. More...
|
|
subroutine | global_interpolation_free_points (this) |
| Destructor for point arrays. More...
|
|
subroutine | global_interpolation_find_common (this) |
| Common routine for finding the points. More...
|
|
subroutine | global_interpolation_find_coords (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. If the locations of the points change this must be called again. More...
|
|
subroutine | global_interpolation_init_point_arrays (this) |
|
subroutine | global_interpolation_find_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. More...
|
|
subroutine | global_interpolation_find_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. More...
|
|
subroutine | global_interpolation_redist (this) |
|
subroutine | global_interpolation_evaluate (this, interp_values, field) |
| Evalute the interpolated value in the points given a field on the dofmap. More...
|
|
- Note
- This modules uses functions from
gslib
, namely findpts_setup
, findpts
, and findpts_eval
. A full description of these subroutines can be found at https://github.com/Nek5000/gslib/blob/master/src/findpts.c
◆ global_interpolation_evaluate()
subroutine global_interpolation::global_interpolation_evaluate |
( |
class(global_interpolation_t), intent(inout) |
this, |
|
|
real(kind=rp), dimension(this%n_points), intent(inout) |
interp_values, |
|
|
real(kind=rp), dimension(this%dof%size()), intent(inout) |
field |
|
) |
| |
|
private |
- Parameters
-
interp_values | Array of values in the given points. |
field | Array of values used for interpolation. |
Definition at line 516 of file global_interpolation.F90.
◆ global_interpolation_find_and_redist()
subroutine global_interpolation::global_interpolation_find_and_redist |
( |
class(global_interpolation_t), intent(inout) |
this, |
|
|
real(kind=rp), dimension(:,:), intent(inout), allocatable |
xyz, |
|
|
integer, intent(inout) |
n_points |
|
) |
| |
|
private |
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
-
xyz | The coordinates of the points. |
n_points | The number of points. |
make deep copy incase xyz goes out of scope or deallocated
Sets new points and redistributes them
Definition at line 397 of file global_interpolation.F90.
◆ global_interpolation_find_common()
subroutine global_interpolation::global_interpolation_find_common |
( |
class(global_interpolation_t), intent(inout) |
this | ) |
|
|
private |
◆ global_interpolation_find_coords()
subroutine global_interpolation::global_interpolation_find_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 |
|
) |
| |
|
private |
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
-
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 315 of file global_interpolation.F90.
◆ global_interpolation_find_xyz()
subroutine global_interpolation::global_interpolation_find_xyz |
( |
class(global_interpolation_t), intent(inout) |
this, |
|
|
real(kind=rp), dimension(3,n_points), intent(inout) |
xyz, |
|
|
integer, intent(in) |
n_points |
|
) |
| |
|
private |
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
-
xyz | The coordinates of the points. |
n_points | The number of points. |
make deep copy incase xyz goes out of scope or deallocated
Definition at line 367 of file global_interpolation.F90.
◆ global_interpolation_free()
subroutine global_interpolation::global_interpolation_free |
( |
class(global_interpolation_t), intent(inout) |
this | ) |
|
|
private |
◆ global_interpolation_free_points()
subroutine global_interpolation::global_interpolation_free_points |
( |
class(global_interpolation_t), intent(inout) |
this | ) |
|
|
private |
◆ global_interpolation_init()
Initialize user defined variables.
- Parameters
-
dof | Dofmap on which the interpolation is to be carried out. |
tol | Tolerance for Newton iterations. |
Definition at line 114 of file global_interpolation.F90.
◆ global_interpolation_init_point_arrays()
◆ global_interpolation_redist()
subroutine global_interpolation::global_interpolation_redist |
( |
class(global_interpolation_t), intent(inout) |
this | ) |
|
|
private |
Calculate which processes this proc has points on
Sum number of points on all pes to compute n_new_points Store how many points to receive from each pe
This could be avoided by adding all indices to a list
Definition at line 439 of file global_interpolation.F90.