Neko  0.8.99
A portable framework for high-order spectral element flow simulations
probes Module Reference

Implements probes. More...

Data Types

type  probes_t
 

Functions/Subroutines

subroutine probes_init_from_json (this, json, case)
 Constructor from json. More...
 
subroutine read_file (this, json)
 Read a list of points from a csv file. More...
 
subroutine read_point (this, json)
 Read a list of points from the json file. More...
 
subroutine read_line (this, json)
 Construct a list of points from a line. More...
 
subroutine read_circle (this, json)
 Construct a list of points from a circle. More...
 
subroutine read_point_zone (this, json, dof)
 Construct a list of points from a point zone. More...
 
subroutine add_points (this, new_points)
 Append a new list of points to the exsiting list. More...
 
subroutine probes_init_from_attributes (this, dof, output_file)
 Initialize without json things. More...
 
subroutine probes_free (this)
 Destructor. More...
 
subroutine probes_show (this)
 Print current probe status, with number of probes and coordinates. More...
 
subroutine probes_debug (this)
 Show the status of processor/element owner and error code for each point. More...
 
subroutine probes_setup_offset (this)
 Setup offset for rank 0. More...
 
subroutine probes_evaluate_and_write (this, t, tstep)
 Interpolate each probe from its r,s,t coordinates. More...
 
subroutine read_probe_locations (this, xyz, n_local_probes, n_global_probes, points_file)
 Initialize the physical coordinates from a csv input file. More...
 
subroutine read_xyz_from_csv (xyz, n_local_probes, n_global_probes, f)
 Read and initialize the number of probes from a csv input file. More...
 

Detailed Description

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

Function/Subroutine Documentation

◆ add_points()

subroutine probes::add_points ( class(probes_t), intent(inout)  this,
real(kind=rp), dimension(:,:), intent(in)  new_points 
)
private
Parameters
[in,out]thisThe probes object.
[in]new_pointsThe new points to be appended.

Definition at line 430 of file probes.F90.

◆ probes_debug()

subroutine probes::probes_debug ( class(probes_t this)
private

Definition at line 601 of file probes.F90.

◆ probes_evaluate_and_write()

subroutine probes::probes_evaluate_and_write ( class(probes_t), intent(inout)  this,
real(kind=rp), intent(in)  t,
integer, intent(in)  tstep 
)
private
Note
The final interpolated field is only available on rank 0.
Parameters
tCurrent simulation time.
tstepCurrent time step.

Check controller to determine if we must write

Definition at line 643 of file probes.F90.

◆ probes_free()

subroutine probes::probes_free ( class(probes_t), intent(inout)  this)
private

Definition at line 537 of file probes.F90.

◆ probes_init_from_attributes()

subroutine probes::probes_init_from_attributes ( class(probes_t), intent(inout)  this,
type(dofmap_t), intent(in)  dof,
character(len=:), intent(inout), allocatable  output_file 
)
private
Parameters
dofDofmap to probe @output_file Name of output file, current must be CSV

Init interpolator

find probes and redistribute them

Allocate output array

Initialize the output file

Necessary for not-parallel csv format... offsets and n points per pe Needed at root for sequential csv i/o

Definition at line 462 of file probes.F90.

◆ probes_init_from_json()

subroutine probes::probes_init_from_json ( class(probes_t), intent(inout)  this,
type(json_file), intent(inout)  json,
class(case_t), intent(inout), target  case 
)

Read from case file

Definition at line 123 of file probes.F90.

Here is the call graph for this function:

◆ probes_setup_offset()

subroutine probes::probes_setup_offset ( class(probes_t this)
private

Definition at line 619 of file probes.F90.

◆ probes_show()

subroutine probes::probes_show ( class(probes_t), intent(in)  this)
private

Definition at line 571 of file probes.F90.

Here is the caller graph for this function:

◆ read_circle()

subroutine probes::read_circle ( class(probes_t), intent(inout)  this,
type(json_file), intent(inout)  json 
)
private

The general structure of the circle is defined by a center point, a radius and a normal to the plane it lies on. The circle is then discretized into a number of points, based on the amount parameter. The points are added clockwise starting from a chosen axis, which is defined by the axis parameter.

Note
The axis must be one of the following: x, y, or z.
Parameters
[in,out]thisThe probes object.
[in,out]jsonThe json file object.

Definition at line 313 of file probes.F90.

◆ read_file()

subroutine probes::read_file ( class(probes_t), intent(inout)  this,
type(json_file), intent(inout)  json 
)
private
Note
The points are expected to be in the form of a list of coordinates.
Parameters
[in,out]thisThe probes object.
[in,out]jsonThe json file object.

Definition at line 217 of file probes.F90.

Here is the call graph for this function:

◆ read_line()

subroutine probes::read_line ( class(probes_t), intent(inout)  this,
type(json_file), intent(inout)  json 
)
private
Parameters
[in,out]thisThe probes object.
[in,out]jsonThe json file object.

Definition at line 269 of file probes.F90.

◆ read_point()

subroutine probes::read_point ( class(probes_t), intent(inout)  this,
type(json_file), intent(inout)  json 
)
private
Note
The points are expected to be in the form of a list of coordinates.
Parameters
[in,out]thisThe probes object.
[in,out]jsonThe json file object.

Definition at line 238 of file probes.F90.

◆ read_point_zone()

subroutine probes::read_point_zone ( class(probes_t), intent(inout)  this,
type(json_file), intent(inout)  json,
type(dofmap_t), intent(in)  dof 
)
private

The GLL points are read from the point zone and added to the probe list.

Parameters
[in,out]thisThe probes object.
[in,out]jsonThe json file object.

Definition at line 389 of file probes.F90.

Here is the call graph for this function:

◆ read_probe_locations()

subroutine probes::read_probe_locations ( class(probes_t), intent(inout)  this,
real(kind=rp), dimension(:,:), allocatable  xyz,
integer, intent(inout)  n_local_probes,
integer, intent(inout)  n_global_probes,
character(len=:), allocatable  points_file 
)
private
Parameters
points_fileA csv file containing probes.

Supporting variables

Reads on rank 0 and distributes the probes across the different ranks

Close the file

Definition at line 691 of file probes.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_xyz_from_csv()

subroutine probes::read_xyz_from_csv ( real(kind=rp), dimension(:,:), allocatable  xyz,
integer, intent(inout)  n_local_probes,
integer, intent(inout)  n_global_probes,
type(csv_file_t), intent(inout)  f 
)
private
Parameters
xyzxyz coordinates of the probes
n_local_probesThe number of probes local to this process
n_global_probesThe number of total probes on all processes
fThe csv file we read from

Definition at line 721 of file probes.F90.

Here is the caller graph for this function: