#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "vtk_output.h"
#include "utils_common.h"
#include "geometry.h"
Go to the source code of this file.
|
| YAC_VTK_FILE * | yac_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_cell_data (YAC_VTK_FILE *vtk_file, unsigned *cell_corners, unsigned *num_points_per_cell, unsigned num_cells) |
| |
| void | yac_vtk_write_point_data_ll (YAC_VTK_FILE *vtk_file, double *point_data_lon, double *point_data_lat, unsigned num_points) |
| |
| static void | yac_vtk_write_cell_scalars (YAC_VTK_FILE *vtk_file, void *scalars, unsigned num_cells, char *name, enum scalars_dt dt) |
| |
| static void | yac_vtk_write_point_scalars (YAC_VTK_FILE *vtk_file, void *scalars, unsigned num_points, char *name, enum scalars_dt dt) |
| |
| void | yac_vtk_write_cell_scalars_uint (YAC_VTK_FILE *vtk_file, unsigned *scalars, unsigned num_cells, 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_cell_scalars_float (YAC_VTK_FILE *vtk_file, float *scalars, unsigned num_cells, 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_uint (YAC_VTK_FILE *vtk_file, unsigned *scalars, unsigned num_points, 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_point_scalars_float (YAC_VTK_FILE *vtk_file, float *scalars, unsigned num_points, char *name) |
| |
| void | yac_vtk_write_point_scalars_double (YAC_VTK_FILE *vtk_file, double *scalars, unsigned num_points, char *name) |
| |
| static void | vtk_flush_scalar_data (FILE *file, struct scalars_data *data, unsigned num_scalars_data, unsigned num_data_points) |
| |
| static void | vtk_flush_scalar_cell_data (YAC_VTK_FILE *vtk_file) |
| |
| static void | vtk_flush_scalar_point_data (YAC_VTK_FILE *vtk_file) |
| |
| void | yac_vtk_close (YAC_VTK_FILE *vtk_file) |
| |
◆ WRITE_ASCII
◆ scalars_dt
| Enumerator |
|---|
| INT | |
| UINT | |
| FLOAT | |
| DOUBLE | |
Definition at line 15 of file vtk_output.c.
◆ vtk_flush_scalar_cell_data()
| static void vtk_flush_scalar_cell_data |
( |
YAC_VTK_FILE * | vtk_file | ) |
|
|
static |
◆ vtk_flush_scalar_data()
| static void vtk_flush_scalar_data |
( |
FILE * | file, |
|
|
struct scalars_data * | data, |
|
|
unsigned | num_scalars_data, |
|
|
unsigned | num_data_points ) |
|
static |
◆ vtk_flush_scalar_point_data()
| static void vtk_flush_scalar_point_data |
( |
YAC_VTK_FILE * | vtk_file | ) |
|
|
static |
◆ yac_vtk_close()
closes a vtk file
- Parameters
-
| [in] | vtk_file | file pointer to an already open file |
Definition at line 403 of file vtk_output.c.
◆ yac_vtk_open()
| YAC_VTK_FILE * yac_vtk_open |
( |
const char * | filename, |
|
|
const char * | title ) |
initialises a vtk file
- Parameters
-
| [in] | filename | name of the vtk file |
| [in] | title | title for the data inside the file |
- Returns
- handle the the vtk file
Definition at line 45 of file vtk_output.c.
◆ 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_file | file pointer to an already open file |
| [in] | cell_corners | contains for all cells the indices of points the respective cells are made up of |
| [in] | num_points_per_cell | contains contains for each cell the number of corners it is made up of |
| [in] | num_cells | number of cells |
Definition at line 88 of file vtk_output.c.
◆ yac_vtk_write_cell_scalars()
| static void yac_vtk_write_cell_scalars |
( |
YAC_VTK_FILE * | vtk_file, |
|
|
void * | scalars, |
|
|
unsigned | num_cells, |
|
|
char * | name, |
|
|
enum scalars_dt | dt ) |
|
static |
◆ 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_file | file pointer to an already open file |
| [in] | scalars | and array containing a scalar value for each cell |
| [in] | num_cells | number of cells |
| [in] | name | name 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.
◆ 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_file | file pointer to an already open file |
| [in] | scalars | and array containing a scalar value for each cell |
| [in] | num_cells | number of cells |
| [in] | name | name 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.
◆ 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_file | file pointer to an already open file |
| [in] | scalars | and array containing a scalar value for each cell |
| [in] | num_cells | number of cells |
| [in] | name | name 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.
◆ 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_file | file pointer to an already open file |
| [in] | scalars | and array containing a scalar value for each cell |
| [in] | num_cells | number of cells |
| [in] | name | name 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.
◆ 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_file | file pointer to an already open file |
| [in] | point_data | array containing the 3d coordinates of all points |
| [in] | num_points | number of points to be written |
Definition at line 69 of file vtk_output.c.
◆ 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_file | file pointer to an already open file |
| [in] | point_data_lon | array containing the longitude coordinates of all points (in rad) |
| [in] | point_data_lat | array containing the latitude coordinates of all points (in rad) |
| [in] | num_points | number of points to be written |
Definition at line 149 of file vtk_output.c.
◆ yac_vtk_write_point_scalars()
| static void yac_vtk_write_point_scalars |
( |
YAC_VTK_FILE * | vtk_file, |
|
|
void * | scalars, |
|
|
unsigned | num_points, |
|
|
char * | name, |
|
|
enum scalars_dt | dt ) |
|
static |
◆ 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_file | file pointer to an already open file |
| [in] | scalars | and array containing a scalar value for each point |
| [in] | num_points | number of points |
| [in] | name | name 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.
◆ 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_file | file pointer to an already open file |
| [in] | scalars | and array containing a scalar value for each point |
| [in] | num_points | number of points |
| [in] | name | name 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.
◆ 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_file | file pointer to an already open file |
| [in] | scalars | and array containing a scalar value for each point |
| [in] | num_points | number of points |
| [in] | name | name 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.
◆ 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_file | file pointer to an already open file |
| [in] | scalars | and array containing a scalar value for each point |
| [in] | num_points | number of points |
| [in] | name | name 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.
◆ scalars_dt_names
| const char* scalars_dt_names[4] |
Initial value:= {
"int",
"unsigned_int",
"float",
"double"
}
Definition at line 22 of file vtk_output.c.