Functions

Two-dimensional Surfaces

Functions


Function Documentation

F5_API void F5Cwrite_quad_surface ( hid_t  file_id,
double  time,
const char *  name,
const F5_vec3_point_t Coords,
int  nCoords,
const F5_quad_t Quads,
int  nQuads,
const char *  coordinate_system 
)

Write a surface constructed by cells with four points (quads).

Similar to F5write_quad_surface(), but allow specification of non-standard cartesian coordinate system.

F5_API void F5Cwrite_regular_surface ( hid_t  file_id,
double  time,
const char *  name,
const F5_vec3_point_t Coords,
int  Xdims,
int  Ydims,
const char *  coordinate_system 
)

Write a regular surface.

Similar to F5write_regular_surface(), but allow specification of non-standard cartesian coordinate system.

Todo:
merge with F5Cwrite_regular_surface
F5_API F5Path* F5Cwrite_triangular_surface ( hid_t  file_id,
double  time,
const char *  name,
const F5_vec3_point_t Coords,
int  nCoords,
const F5_triangle32_t Triangles,
int  nTriangles,
const char *  coordinate_system 
)

Write a triangular surface.

Similar to F5write_triangular_surface(), but allow specification of non-standard cartesian coordinate system.

Todo:
merge with F5write_triangular_surface
F5_API F5Path* F5Flink_triangular_surface ( F5Path target,
double  time,
const char *  gridname,
const F5_vec3_point_t Coords,
int  nCoords,
const F5_triangle_t Triangles,
int  nTriangles,
const char *  coordinate_system 
)

Similar to F5write_triangular_surface(), but instead of writing the vertices and triangles as its own dataset, it references those of another surface object.

The vertices and triangles are then shared (in HDF5: symbolic links to the target surface).

Parameters:
Coords The vertices of this surface; if none are given, re-use the vertices from the target surface.
Triangles The triangles of this surfaces; if none are given, reuse the triangles from the target surface.
Note:
Only the Vertex coordinates and Triangle connectivity are shared, all other fields remain separate.
Todo:
make F5Flink_triangular_surface() failsafe. Extend the concept of linking datasets for sharing available for other grid types as well.
Examples:
ADCIRCtoF5.cpp.
F5_API void F5write_regular_surface ( hid_t  file_id,
double  time,
const char *  name,
const F5_vec3_point_t Coords,
int  Xdims,
int  Ydims 
)

Write a regular surface.

Parameters:
file_id Some HDF5 id corresponding to some already opened HDF5 file.
time The physical time for this data set.
name Some textual description of this surface; should be simple (avoid spaces, special characters and extensively long names). It is used to identify surfaces over multiple timesteps, so must be identical for subsequent calls on evolving surfaces.
Coords The cartesian coordinates of the points
Xdims Extension in first dimension
Ydims Extension in first dimension
F5_API void F5write_regular_surface_cell_field_dbl ( hid_t  file_id,
double  time,
const char *  name,
const F5_vec3_point_t Coords,
int  Xdims,
int  Ydims,
const char *  fieldname,
double *  data 
)

A regular surface with a data field on the cells.

Note:
Put data into the `Cell_Rep_hid'
Todo:
use newer field interface
F5_API void F5write_regular_surface_vertex_field_dbl ( hid_t  file_id,
double  time,
const char *  name,
const F5_vec3_point_t Coords,
int  Xdims,
int  Ydims,
const char *  fieldname,
double *  data 
)

A regular surface with a data field on the vertices.

Note:
Put data into the `Rep_hid'
F5_API void F5write_regular_surface_vertex_field_rgb ( hid_t  file_id,
double  time,
const char *  name,
const F5_vec3_point_t Coords,
int  Xdims,
int  Ydims,
const char *  fieldname,
F5_rgb_t data 
)

A field of colors given on the vertices.

Todo:
use newer field interface
F5_API F5Path* F5write_triangular_surface ( hid_t  file_id,
double  time,
const char *  name,
const F5_vec3_point_t Coords,
int  nCoords,
const F5_triangle32_t Triangles,
int  nTriangles 
)

Write a triangular surface.

Parameters:
file_id Some HDF5 id corresponding to some already opened HDF5 file.
time The physical time for this data set.
name Some textual description of this surface; should be simple (avoid spaces, special characters and extensively long names). It is used to identify surfaces over multiple timesteps, so must be identical for subsequent calls on evolving surfaces.
Coords The cartesian coordinates of the points
nCoords How many points are there
Triangles The connectivity of the triangles, ie. which points belong to each triangle
nTriangles How many triangles are there
Todo:
Use the new Field interface from uniform grids
Note:
This version saves data in SINGLE PRECISION, both for coordinates as well as triangle indices. If you need another precision, inspect the source of this function and do it manually.
Examples:
ADCIRCtoF5.cpp, and ObjtoF5.c.