Neko  0.9.0
A portable framework for high-order spectral element flow simulations
utils Module Reference

Utilities. More...

Data Types

interface  neko_error
 

Functions/Subroutines

pure integer function, public filename_suffix_pos (fname)
 Find position (in the string) of a filename's suffix. More...
 
pure integer function, public filename_tslash_pos (fname)
 Find position (in the string) of a filename's trailing slash. More...
 
subroutine, public filename_suffix (fname, suffix)
 Extract a filename's suffix. More...
 
subroutine, public filename_chsuffix (fname, new_fname, new_suffix)
 Change a filename's suffix. More...
 
integer function, public extract_fld_file_index (fld_filename, default_index)
 Extracts the index of a field file. For example, "myfield.f00045" will return 45. If the suffix of the file name is invalid, returns a default index value. More...
 
character(len=100) function, dimension(:), allocatable, public split_string (string, delimiter)
 Split a string based on delimiter (tokenizer) OBS: very hacky, this should really be improved, it is rather embarrasing code. More...
 
pure integer function, public linear_index (i, j, k, l, lx, ly, lz)
 Compute the address of a (i,j,k,l) array with sizes (1:lx, 1:ly, 1:lz, :) More...
 
pure integer function, dimension(4), public nonlinear_index (linear_index, lx, ly, lz)
 Compute (i,j,k,l) array given linear index with sizes (1:lx, 1:ly, 1:lz, :) More...
 
pure logical function, public index_is_on_facet (i, j, k, lx, ly, lz, facet)
 
subroutine neko_error_plain (error_code)
 Reports an error and stops execution. More...
 
subroutine neko_error_msg (error_msg)
 Reports an error and stops execution. More...
 
subroutine, public neko_warning (warning_msg)
 Reports a warning to standard output. More...
 
character(:) function, allocatable, public concat_string_array (array, sep, prepend)
 Concatenate an array of strings into one string with array items separated by spaces. More...
 

Variables

integer, parameter, public neko_fname_len = 1024
 

Detailed Description

Various utility functions

Function/Subroutine Documentation

◆ concat_string_array()

character(:) function, allocatable, public utils::concat_string_array ( character(len=*), dimension(:), intent(in)  array,
character(len=*), intent(in)  sep,
logical, intent(in)  prepend 
)
Parameters
arrayThe array of strings.
sepThe separator put between the strings in the array.
prependWhether to also prepend the string with the separator.

Definition at line 254 of file utils.f90.

◆ extract_fld_file_index()

integer function, public utils::extract_fld_file_index ( character(len=*), intent(in)  fld_filename,
integer, intent(in)  default_index 
)
Parameters
fld_filenameName of the fld file, e.g. myfield0.f00035.
default_indexThe index to return in case the suffix of fld_filename is invalid.

Definition at line 93 of file utils.f90.

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

◆ filename_chsuffix()

subroutine, public utils::filename_chsuffix ( character(len=*)  fname,
character(len=*)  new_fname,
character(len=*)  new_suffix 
)

Definition at line 76 of file utils.f90.

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

◆ filename_suffix()

subroutine, public utils::filename_suffix ( character(len=*)  fname,
character(len=*)  suffix 
)

Definition at line 69 of file utils.f90.

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

◆ filename_suffix_pos()

pure integer function, public utils::filename_suffix_pos ( character(len=*), intent(in)  fname)

Definition at line 55 of file utils.f90.

Here is the caller graph for this function:

◆ filename_tslash_pos()

pure integer function, public utils::filename_tslash_pos ( character(len=*), intent(in)  fname)

Definition at line 62 of file utils.f90.

◆ index_is_on_facet()

pure logical function, public utils::index_is_on_facet ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  k,
integer, intent(in)  lx,
integer, intent(in)  ly,
integer, intent(in)  lz,
integer, intent(in)  facet 
)

Definition at line 198 of file utils.f90.

◆ linear_index()

pure integer function, public utils::linear_index ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  k,
integer, intent(in)  l,
integer, intent(in)  lx,
integer, intent(in)  ly,
integer, intent(in)  lz 
)

Definition at line 173 of file utils.f90.

Here is the caller graph for this function:

◆ neko_error_msg()

subroutine utils::neko_error_msg ( character(len=*)  error_msg)
private
Parameters
error_msgThe error message to report.

Definition at line 237 of file utils.f90.

◆ neko_error_plain()

subroutine utils::neko_error_plain ( integer, optional  error_code)
private
Parameters
[optional]error_code The error code to report.

Definition at line 222 of file utils.f90.

◆ neko_warning()

subroutine, public utils::neko_warning ( character(len=*)  warning_msg)

Definition at line 244 of file utils.f90.

Here is the caller graph for this function:

◆ nonlinear_index()

pure integer function, dimension(4), public utils::nonlinear_index ( integer, intent(in)  linear_index,
integer, intent(in)  lx,
integer, intent(in)  ly,
integer, intent(in)  lz 
)

Definition at line 182 of file utils.f90.

Here is the call graph for this function:

◆ split_string()

character(len=100) function, dimension(:), allocatable, public utils::split_string ( character(len=*)  string,
character(len=*)  delimiter 
)

Definition at line 135 of file utils.f90.

Here is the caller graph for this function:

Variable Documentation

◆ neko_fname_len

integer, parameter, public utils::neko_fname_len = 1024

Definition at line 40 of file utils.f90.