Input-Ouput Utilities
[Utilities]

Collaboration diagram for Input-Ouput Utilities:

Functions

int utr_io_initialize_mesh (FILE *Interactive_output, const char *Work_dir, char Mesh_type, const char *Mesh_file)
 For file io.
int utr_io_read_mesh (const int Mesh_id, const char *Working_dir, const char *Mesh_files_regex, const char Mesh_type)
 Definitions:.
int utr_io_write_img_to_pbm (const char *Work_dir, const char *Filename, const char *Comment, const int Width, const int Height, const int Max_color_component_value, const int Magic_number, const unsigned char *Img_data, FILE *Interactive_output)
int utr_io_write_mesh_info_to_PAM (int Mesh_id, const char *Work_dir, const char *Filename, const char *Comment, FILE *Interactive_output)
int utr_io_write_img_to_pam (const char *Work_dir, const char *Filename, const int Width, const int Height, const int Depth, const int Maxval, const char *TUPLTYPE, const char *Img_data, FILE *Interactive_output)
int utr_io_write_img_to_pnm (const char *Work_dir, const char *Filename, const char *Comment, const int Width, const int Height, const int Max_color_component_value, const int Magic_number, const char *Img_data, FILE *Interactive_output)

Function Documentation

int utr_io_initialize_mesh ( FILE *  Interactive_output,
const char *  Work_dir,
char  Mesh_type,
const char *  Mesh_file 
)

For file io.

--------------------------------------------------------- utr_io_initialize_mesh - to initialize mesh of a specified type ---------------------------------------------------------

Contains definitions of routines:

Interface routines: utr_io_read_mesh - to read mesh from given filename(s) History: Kazimierz.Michalik@agh.edu.pl - initial version For portable filesystem For portable regex (should be C++11 <regex>, but not yet supported) For not making all stuff again Includes: --------------------------------------------------------- utr_io_initialize_mesh - to initialize mesh of a specified type ---------------------------------------------------------

switch(mesh_type)

Here MODFEM_NEW_MPI define that switches old and new version of I/O handling.

!MODFEM_NEW_MPI

Parameters:
Interactive_output > returns mesh_id */
Work_dir > file or stdout to write messages */
Mesh_type > path to working directory
Mesh_file > letter symbol denoting mesh_type (j, p, t or h) */> mesh file name - conforming to naming convention */

Here is the call graph for this function:

Here is the caller graph for this function:

int utr_io_read_mesh ( const int  Mesh_id,
const char *  Working_dir,
const char *  Mesh_files_regex,
const char  Mesh_type 
)

Definitions:.

-------------------------------------------------------- utr_io_read_mesh - to read mesh with given filename(s) Reads all mesh files from current working directory that matches with passed regular expression Mesh_files_regex. All files HAVE TO be the same type (ex. nas,dat,in etc.). NOTE: single filename ex. "mesh.dat" is also a valid regular expression. --------------------------------------------------------

-------------------------------------------------------- utr_io_read_mesh - to read mesh with given filename(s) ------------------------------------------------------- Reads all mesh files from current working directory that matches with passed regular expression Mesh_files_regex. All files HAVE TO be the same type (ex. nas,dat,in etc.). NOTE: single filename ex. "mesh.dat" is also a valid regular expression. ------------------------------------------------------- What this function does in short: 1. Gather files list form directory. 2. Filter files list with mesh filename regex. 3. Sort in alphabetic order. 4. Loop over selected files and read each one. -------------------------------------------------------- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE: if there is available more than one process, then each process will recive one file to read. NOTE: if there is more processes than files, mesh needs to be redistributed (balancing)! NOTE: if there is more files than processes, processes will recive (in continues manner) more files to read. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

1. Gather files list form directory.

2. Filter files list with mesh filename regex.

1B. Gather files list form directory.

2B. Filter files list with mesh filename regex.

3. Sort in alphabetic order.

4. Loop over selected files and read each one.

!PARALLEL

Make filename a valid path to file.

Parameters:
Mesh_id returns: > 0 - number of files correctly read; <=0 - error
Working_dir IN: id of mesh to write to
Mesh_files_regex IN: directory with mesh files
Mesh_type IN: regular expression pattern NOTE: using regex 'POSIX grep' standardIN: mesh type character (the same for all files!)

Here is the call graph for this function:

int utr_io_write_img_to_pam ( const char *  Work_dir,
const char *  Filename,
const int  Width,
const int  Height,
const int  Depth,
const int  Maxval,
const char *  TUPLTYPE,
const char *  Img_data,
FILE *  Interactive_output 
)

utr_io_write_img_to_pam - to write data into PAM image file. http://en.wikipedia.org/wiki/Netpbm Allowed combinations of parameters: ----------------------------------------------------------- TUPLTYPE |MAXVAL |DEPTH |comment ----------------------------------------------------------- BLACKANDWHITE 1 1 special case of GRAYSCALE GRAYSCALE 2…65535 1 2 bytes per pixel for MAXVAL > 255 RGB 1…65535 3 6 bytes per pixel for MAXVAL > 255 BLACKANDWHITE_ALPHA 1 2 2 bytes per pixel GRAYSCALE_ALPHA 2…65535 2 4 bytes per pixel for MAXVAL > 255 RGB_ALPHA 1…65535 4 8 bytes per pixel for MAXVAL > 255s of parameters: -----------------------------------------------------------

utr_io_write_img_to_pam - to write data into PAM image file. http:///en.wikipedia.org/wiki/Netpbm Allowed combinations of parameters: ----------------------------------------------------------- TUPLTYPE |MAXVAL |DEPTH |comment ----------------------------------------------------------- BLACKANDWHITE 1 1 special case of GRAYSCALE GRAYSCALE 2…65535 1 2 bytes per pixel for MAXVAL > 255 RGB 1…65535 3 6 bytes per pixel for MAXVAL > 255 BLACKANDWHITE_ALPHA 1 2 2 bytes per pixel GRAYSCALE_ALPHA 2…65535 2 4 bytes per pixel for MAXVAL > 255 RGB_ALPHA 1…65535 4 8 bytes per pixel for MAXVAL > 255 -----------------------------------------------------------

Parameters:
Work_dir returns 0 if all ok.
Filename Directory to write in.
Width without extension
Height >0
Depth >0
Maxval <1:4>
TUPLTYPE <1:65535>,
Interactive_output [Width*Height*byte per pixel] pointer to the array with image data
int utr_io_write_img_to_pbm ( const char *  Work_dir,
const char *  Filename,
const char *  Comment,
const int  Width,
const int  Height,
const int  Max_color_component_value,
const int  Magic_number,
const unsigned char *  Img_data,
FILE *  Interactive_output 
)

bit per pixel = 1

Parameters:
Work_dir returns 0 if all ok.
Filename Directory to write in.
Comment without extension
Width written into img file header, can be NULL if no comment.
Height >0
Max_color_component_value >0
Img_data {4,5,6}
Interactive_output pointer to the array with image data
int utr_io_write_img_to_pnm ( const char *  Work_dir,
const char *  Filename,
const char *  Comment,
const int  Width,
const int  Height,
const int  Max_color_component_value,
const int  Magic_number,
const char *  Img_data,
FILE *  Interactive_output 
)

utr_io_write_img_to_pnm - to write data into PNM image file. The Portable Bit/Grey/PixMap formats PBM, PGM, PPM. They are collectively referred to as PNM (Portable aNy Map). http://en.wikipedia.org/wiki/Netpbm_format Allowed combinations: ----------------------------------------------------------- Type Magic number Extension Colors ----------------------------------------------------------- Portable BitMap P4 binary .pbm 0–1 (black & white) Portable GrayMap P5 binary .pgm 0–255 (gray scale) Portable PixMap P6 binary .ppm 0–255 (RGB) -----------------------------------------------------------

utr_io_write_img_to_pnm - to write data into PNM image file. The Portable Bit/Grey/PixMap formats PBM, PGM, PPM. They are collectively referred to as PNM (Portable aNy Map). http:///en.wikipedia.org/wiki/Netpbm_format Allowed combinations: ----------------------------------------------------------- Type Magic number Extension Colors ----------------------------------------------------------- Portable BitMap P4 binary .pbm 0–1 (black & white) Portable GrayMap P5 binary .pgm 0–255 (gray scale) Portable PixMap P6 binary .ppm 0–255 (RGB) -----------------------------------------------------------

bytes per pixel = 1

Parameters:
Work_dir returns 0 if all ok.
Filename Directory to write in.
Comment without extension
Width written into img file header, can be NULL if no comment.
Height >0
Max_color_component_value >0
Magic_number see Colors above
Img_data {4,5,6}
Interactive_output pointer to the array with image data
int utr_io_write_mesh_info_to_PAM ( int  Mesh_id,
const char *  Work_dir,
const char *  Filename,
const char *  Comment,
FILE *  Interactive_output 
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Jun 2020 for ModFEM by  doxygen 1.6.1