YetAnotherCoupler 3.5.2
|
#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.
Data Structures | |
struct | scalars_data |
struct | YAC_VTK_FILE_ |
Macros | |
#define | WRITE_ASCII |
Enumerations | |
enum | scalars_dt { INT = 0 , UINT = 1 , FLOAT = 2 , DOUBLE = 3 } |
Functions | |
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) |
Variables | |
const char * | scalars_dt_names [4] |
#define WRITE_ASCII |
Definition at line 13 of file vtk_output.c.
enum scalars_dt |
Enumerator | |
---|---|
INT | |
UINT | |
FLOAT | |
DOUBLE |
Definition at line 15 of file vtk_output.c.
|
static |
Definition at line 355 of file vtk_output.c.
|
static |
|
static |
Definition at line 379 of file vtk_output.c.
void yac_vtk_close | ( | YAC_VTK_FILE * | vtk_file | ) |
closes a vtk file
[in] | vtk_file | file pointer to an already open file |
Definition at line 403 of file vtk_output.c.
YAC_VTK_FILE * yac_vtk_open | ( | const char * | filename, |
const char * | title ) |
initialises a vtk file
[in] | filename | name of the vtk file |
[in] | title | title for the data inside the file |
Definition at line 45 of file vtk_output.c.
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
[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.
|
static |
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
[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.
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
[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.
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
[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.
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
[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.
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
[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.
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
[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.
|
static |
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
[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.
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
[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.
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
[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.
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
[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.
const char* scalars_dt_names[4] |
Definition at line 22 of file vtk_output.c.