YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
Typedefs | Functions
vtk_output.h File Reference

general routines for writing vtk files More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct YAC_VTK_FILE_ YAC_VTK_FILE
 

Functions

YAC_VTK_FILEyac_vtk_open (const char *filename, const char *title)
 
void yac_vtk_write_point_data (YAC_VTK_FILE *vtk_file, double *point_data, unsigned num_points)
 
void yac_vtk_write_point_data_ll (YAC_VTK_FILE *vtk_file, double *point_data_lon, double *point_data_lat, unsigned num_points)
 
void yac_vtk_write_cell_data (YAC_VTK_FILE *vtk_file, unsigned *cell_corners, unsigned *num_points_per_cell, unsigned num_cells)
 
void yac_vtk_write_cell_scalars_uint (YAC_VTK_FILE *vtk_file, unsigned *scalars, unsigned num_cells, char *name)
 
void yac_vtk_write_point_scalars_uint (YAC_VTK_FILE *vtk_file, unsigned *scalars, unsigned num_points, char *name)
 
void yac_vtk_write_cell_scalars_int (YAC_VTK_FILE *vtk_file, int *scalars, unsigned num_cells, char *name)
 
void yac_vtk_write_point_scalars_int (YAC_VTK_FILE *vtk_file, int *scalars, unsigned num_points, char *name)
 
void yac_vtk_write_cell_scalars_float (YAC_VTK_FILE *vtk_file, float *scalars, unsigned num_cells, char *name)
 
void yac_vtk_write_point_scalars_float (YAC_VTK_FILE *vtk_file, float *scalars, unsigned num_points, char *name)
 
void yac_vtk_write_cell_scalars_double (YAC_VTK_FILE *vtk_file, double *scalars, unsigned num_cells, char *name)
 
void yac_vtk_write_point_scalars_double (YAC_VTK_FILE *vtk_file, double *scalars, unsigned num_points, char *name)
 
void yac_vtk_close (YAC_VTK_FILE *vtk_file)
 

Detailed Description

general routines for writing vtk files

To create a vtk file you have to execute the following steps in the specified order:

  1. generate a vtk file (yac_vtk_open)
  2. define the grid
    1. write the point data (yac_vtk_write_point_data)
    2. write the cell data (yac_vtk_write_cell_data)
  3. provide the field data (these routines can be called in any order)
    1. field cell data
      1. yac_vtk_write_cell_scalars_uint
      2. yac_vtk_write_cell_scalars_int
      3. yac_vtk_write_cell_scalars_float
      4. yac_vtk_write_cell_scalars_double
    2. field point data
      1. yac_vtk_write_point_scalars_uint
      2. yac_vtk_write_point_scalars_int
      3. yac_vtk_write_point_scalars_float
      4. yac_vtk_write_point_scalars_double
  4. close the vtk file (yac_vtk_close)

Definition in file vtk_output.h.

Typedef Documentation

◆ YAC_VTK_FILE

typedef struct YAC_VTK_FILE_ YAC_VTK_FILE

Definition at line 38 of file vtk_output.h.

Function Documentation

◆ yac_vtk_close()

void yac_vtk_close ( YAC_VTK_FILE vtk_file)

closes a vtk file

Parameters
[in]vtk_filefile pointer to an already open file

Definition at line 403 of file vtk_output.c.

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

◆ yac_vtk_open()

YAC_VTK_FILE * yac_vtk_open ( const char *  filename,
const char *  title 
)

initialises a vtk file

Parameters
[in]filenamename of the vtk file
[in]titletitle for the data inside the file
Returns
handle the the vtk file

Definition at line 45 of file vtk_output.c.

Here is the caller graph for this function:

◆ yac_vtk_write_cell_data()

void yac_vtk_write_cell_data ( YAC_VTK_FILE vtk_file,
unsigned *  cell_corners,
unsigned *  num_points_per_cell,
unsigned  num_cells 
)

writes the cell data (which cell consists of which points) to the vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]cell_cornerscontains for all cells the indices of points the respective cells are made up of
[in]num_points_per_cellcontains contains for each cell the number of corners it is made up of
[in]num_cellsnumber of cells
Remarks
the indices in cell_corners refere to the index in points array passed to yac_vtk_write_point_data
the size of num_points_per_cell should be num_cells
the size of cell_corners is the sum of all num_points_per_cell[i] for 0<=i<num_cells

Definition at line 88 of file vtk_output.c.

Here is the caller graph for this function:

◆ yac_vtk_write_cell_scalars_double()

void yac_vtk_write_cell_scalars_double ( YAC_VTK_FILE vtk_file,
double *  scalars,
unsigned  num_cells,
char *  name 
)

writes an array of double scalar cell data values for each cell to a vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]scalarsand array containing a scalar value for each cell
[in]num_cellsnumber of cells
[in]namename of the written field

/remark num_cells should be identically to the number of cells passed to a previous call to yac_vtk_write_cell_data /remark the size of scalars should be num_cells

Definition at line 264 of file vtk_output.c.

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

◆ yac_vtk_write_cell_scalars_float()

void yac_vtk_write_cell_scalars_float ( YAC_VTK_FILE vtk_file,
float *  scalars,
unsigned  num_cells,
char *  name 
)

writes an array of float scalar cell data values for each cell to a vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]scalarsand array containing a scalar value for each cell
[in]num_cellsnumber of cells
[in]namename of the written field

/remark num_cells should be identically to the number of cells passed to a previous call to yac_vtk_write_cell_data /remark the size of scalars should be num_cells

Definition at line 257 of file vtk_output.c.

Here is the call graph for this function:

◆ yac_vtk_write_cell_scalars_int()

void yac_vtk_write_cell_scalars_int ( YAC_VTK_FILE vtk_file,
int *  scalars,
unsigned  num_cells,
char *  name 
)

writes an array of integer scalar cell data values for each cell to a vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]scalarsand array containing a scalar value for each cell
[in]num_cellsnumber of cells
[in]namename of the written field

/remark num_cells should be identically to the number of cells passed to a previous call to yac_vtk_write_cell_data /remark the size of scalars should be num_cells

Definition at line 250 of file vtk_output.c.

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

◆ yac_vtk_write_cell_scalars_uint()

void yac_vtk_write_cell_scalars_uint ( YAC_VTK_FILE vtk_file,
unsigned *  scalars,
unsigned  num_cells,
char *  name 
)

writes an array of unsigned integer scalar cell data values for each cell to a vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]scalarsand array containing a scalar value for each cell
[in]num_cellsnumber of cells
[in]namename of the written field

/remark num_cells should be identically to the number of cells passed to a previous call to yac_vtk_write_cell_data /remark the size of scalars should be num_cells

Definition at line 243 of file vtk_output.c.

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

◆ yac_vtk_write_point_data()

void yac_vtk_write_point_data ( YAC_VTK_FILE vtk_file,
double *  point_data,
unsigned  num_points 
)

writes the 3d coordinates of all points into the vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]point_dataarray containing the 3d coordinates of all points
[in]num_pointsnumber of points to be written
Remarks
the array associated to point_data should have the size 3 * num_points
points[i*3+0], points[i*3+1] and points[i*3+2] should contain the x, y and z coordinate of the i'th point

Definition at line 69 of file vtk_output.c.

Here is the caller graph for this function:

◆ yac_vtk_write_point_data_ll()

void yac_vtk_write_point_data_ll ( YAC_VTK_FILE vtk_file,
double *  point_data_lon,
double *  point_data_lat,
unsigned  num_points 
)

writes the 3d coordinates of all points into the vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]point_data_lonarray containing the longitude coordinates of all points (in rad)
[in]point_data_latarray containing the latitude coordinates of all points (in rad)
[in]num_pointsnumber of points to be written
Remarks
the array associated to point_data should have the size 3 * num_points
points[i*3+0], points[i*3+1] and points[i*3+2] should contain the x, y and z coordinate of the i'th point

Definition at line 149 of file vtk_output.c.

Here is the call graph for this function:

◆ yac_vtk_write_point_scalars_double()

void yac_vtk_write_point_scalars_double ( YAC_VTK_FILE vtk_file,
double *  scalars,
unsigned  num_points,
char *  name 
)

writes an array of double scalar point data values for each point to a vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]scalarsand array containing a scalar value for each point
[in]num_pointsnumber of points
[in]namename of the written field

/remark num_points should be identically to the number of points passed to a previous call to yac_vtk_write_point_data /remark the size of scalars should be num_points

Definition at line 292 of file vtk_output.c.

Here is the call graph for this function:

◆ yac_vtk_write_point_scalars_float()

void yac_vtk_write_point_scalars_float ( YAC_VTK_FILE vtk_file,
float *  scalars,
unsigned  num_points,
char *  name 
)

writes an array of float scalar point data values for each point to a vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]scalarsand array containing a scalar value for each point
[in]num_pointsnumber of points
[in]namename of the written field

/remark num_points should be identically to the number of points passed to a previous call to yac_vtk_write_point_data /remark the size of scalars should be num_points

Definition at line 285 of file vtk_output.c.

Here is the call graph for this function:

◆ yac_vtk_write_point_scalars_int()

void yac_vtk_write_point_scalars_int ( YAC_VTK_FILE vtk_file,
int *  scalars,
unsigned  num_points,
char *  name 
)

writes an array of integer scalar point data values for each point to a vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]scalarsand array containing a scalar value for each point
[in]num_pointsnumber of points
[in]namename of the written field

/remark num_points should be identically to the number of points passed to a previous call to yac_vtk_write_point_data /remark the size of scalars should be num_points

Definition at line 278 of file vtk_output.c.

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

◆ yac_vtk_write_point_scalars_uint()

void yac_vtk_write_point_scalars_uint ( YAC_VTK_FILE vtk_file,
unsigned *  scalars,
unsigned  num_points,
char *  name 
)

writes an array of unsigned integer scalar point data values for each point to a vtk file

Parameters
[in]vtk_filefile pointer to an already open file
[in]scalarsand array containing a scalar value for each point
[in]num_pointsnumber of points
[in]namename of the written field

/remark num_points should be identically to the number of points passed to a previous call to yac_vtk_write_point_data /remark the size of scalars should be num_points

Definition at line 271 of file vtk_output.c.

Here is the call graph for this function: