Simple module to handle fld file series. Provides an interface to the different fields sotred in a fld file Also provides simple functions to scale and add different fld files. An example of using this module is shown in contrib/average_fields.f90 The fld_file_data_t should dynamically update each time one reads a new fld file. Martin Karp 1/2-2023.
|
| subroutine | fld_file_data_import_fields (this, u, v, w, p, t, s_target_list, s_index_list, interpolate, tolerance) |
| | Imports fields from an fld_file_data object, potentially with interpolation.
|
| |
| subroutine | fld_file_data_init (this, nelv, offset_el) |
| | Initializes a fld_file_data object.
|
| |
| integer function | fld_file_data_size (this) |
| | Get the number of initialized fields in this fld file.
|
| |
| subroutine | fld_file_data_init_same (this, fld_file, n) |
| | Genereate same fields as in another fld_file.
|
| |
| subroutine | fld_file_data_init_n_fields (this, n_fields, n) |
| | Generate same fields as in another fld_file.
|
| |
| subroutine | fld_file_data_get_list (this, ptr_list, n) |
| | Get a list with pointers to the fields in the fld file.
|
| |
| subroutine | fld_file_data_scale (this, c) |
| | Scale the values stored in this fld_file_data.
|
| |
| subroutine | fld_file_data_add (this, other) |
| | Add the values in another fld file to this.
|
| |
| subroutine | fld_file_data_free (this) |
| | Deallocate fld file data type.
|
| |
| subroutine | fld_file_data_generate_interpolator (this, global_interp, to_dof, to_msh, tolerance) |
| | Generates a global_interpolation object to interpolate the fld data.
|
| |
◆ fld_file_data_add()
◆ fld_file_data_free()
◆ fld_file_data_generate_interpolator()
| subroutine fld_file_data::fld_file_data_generate_interpolator |
( |
class(fld_file_data_t), intent(in) |
this, |
|
|
type(global_interpolation_t), intent(inout) |
global_interp, |
|
|
type(dofmap_t), intent(in), target |
to_dof, |
|
|
type(mesh_t), intent(in), target |
to_msh, |
|
|
real(kind=rp), intent(in) |
tolerance |
|
) |
| |
|
private |
- Parameters
-
| global_interp | Global interpolation object which will be initialized and ready to be used for interpolation. |
| to_dof | Dofmap on which to interpolate. |
| to_msh | Mesh on which to interpolate. |
| tolerance | Tolerance for the newton iterations. |
To ensure that each point is within an element Remedies issue with points on the boundary Technically gives each point a slightly different value but still within the specified tolerance
Definition at line 484 of file fld_file_data.f90.
◆ fld_file_data_get_list()
◆ fld_file_data_import_fields()
| subroutine fld_file_data::fld_file_data_import_fields |
( |
class(fld_file_data_t), intent(inout) |
this, |
|
|
type(field_t), intent(inout), optional, pointer |
u, |
|
|
type(field_t), intent(inout), optional, pointer |
v, |
|
|
type(field_t), intent(inout), optional, pointer |
w, |
|
|
type(field_t), intent(inout), optional, pointer |
p, |
|
|
type(field_t), intent(inout), optional, pointer |
t, |
|
|
type(field_list_t), intent(inout), optional |
s_target_list, |
|
|
integer, dimension(:), intent(in), optional |
s_index_list, |
|
|
logical, intent(in), optional |
interpolate, |
|
|
real(kind=rp), intent(in), optional |
tolerance |
|
) |
| |
- Parameters
-
| this | fld_data object. Must already be initialized, no checks are done. |
| u | The field on which to import the u component of the fld data. |
| v | The field on which to import the v component of the fld data. |
| w | The field on which to import the w component of the fld data. |
| p | The field on which to import the pressure field of the fld data. |
| t | The field on which to import the temperature field of the fld data. |
| s_target_list | Field list containing the fields on which to import the scalar fields of the fld data. Unless a list of target indices is provided in s_index_list, assigns field at position i in the list to scalar i in the fld file. |
| s_index_list | The list of scalars indices from which to load the fields provided in s_target_list. Must have the same size as s_target_list. For example, s_index_list = (/2,3/) will load scalar #2 in s_target_listitems(1) and scalar #3 in s_target_listitems(2). Index 0 corresponds to temperature by default. Therefore using s_index_list = (/0/) is equivalent to using the argument t=.... |
| interpolate | Whether or not to interpolate the fld data. |
| tolerance | If interpolation is enabled, the tolerance to use for the point finding. |
- Note
- If interpolation is disabled, space-to-space interpolation is still performed within each element to allow for seamless change of polynomial order for the same given mesh.
- Attention
- No data movement between CPU and GPU is done in this subroutine. The required data must be copied manually beforehand (see import_field_utils.f90).
Definition at line 99 of file fld_file_data.f90.
◆ fld_file_data_init()
- Parameters
-
| nelv | Number of elements (on this rank). |
| offset_el | Element offset for this rank. |
Definition at line 288 of file fld_file_data.f90.
◆ fld_file_data_init_n_fields()
◆ fld_file_data_init_same()
◆ fld_file_data_scale()
◆ fld_file_data_size()