FiberBundleHDF5  FiberHDF5 Documentation, Revision 2026
High-Performance Fiber Bundle Data Model for Scientific Visualization
Loading...
Searching...
No Matches
F5surface.h
Go to the documentation of this file.
1/*
2 *
3 * $Id: F5surface.h,v 1.16 2008/02/26 23:27:14 werner Exp $
4 *
5 */
6
7#ifndef __F5surface_H
8#define __F5surface_H
9
10#include "F5types.h"
11#include "F5coordinates.h"
12#include "F5F.h"
13
14#include "F5WinDLLApi.h"
15
16#ifdef __cplusplus
17extern "C"
18{
19#endif
20
21/**\defgroup surfaces Two-dimensional Surfaces
22 */
23
24/**\ingroup surfaces
25 A helper struct for vertices and connectivity
26 for surfaces and similar grid types.
27 */
32
33/**\ingroup surfaces
34 */
36
37/**\ingroup surfaces
38 Close whatever can be closed here.
39*/
41
42
43/**\ingroup surfaces
44 Write a triangular surface.
45 @param file_id Some HDF5 id corresponding to some already opened HDF5 file.
46 @param time The physical time for this data set.
47 @param name Some textual description of this surface; should be simple
48 (avoid spaces, special characters and extensively long names).
49 It is used to identify surfaces over multiple timesteps,
50 so must be identical for subsequent calls on evolving surfaces.
51 @param Coords The cartesian coordinates of the points
52 @param nCoords How many points are there
53 @param Triangles The connectivity of the triangles, ie. which points belong to
54 each triangle
55 @param nTriangles How many triangles are there
56 \todo Use the new Field interface from uniform grids
57
58 @note This version saves data in SINGLE PRECISION, both for coordinates as
59 well as triangle indices. If you need another precision, inspect the
60 source of this function and do it manually.
61 */
62F5_API F5Path*F5write_triangular_surface(hid_t file_id, double time,
63 const char*name,
64 const F5_point3f_t*Coords, int nCoords,
65 const F5_triangle32_t*Triangles, int nTriangles);
66
68 F5write_triangular_surface_vc(hid_t file_id, double time,
69 const char*name,
70 const F5_point3f_t*Coords, int nCoords,
71 const F5_triangle32_t*Triangles, int nTriangles);
72
73
74
75/**\ingroup surfaces
76 Write a triangular surface.
77 Similar to F5write_triangular_surface(), but allow specification of non-standard cartesian coordinate system.
78 \todo merge with F5write_triangular_surface
79*/
80F5_API F5Path*F5Cwrite_triangular_surface(hid_t file_id, double time,
81 const char*name,
82 const F5_point3f_t*Coords, int nCoords,
83 const F5_triangle32_t*Triangles, int nTriangles,
84 const char*coordinate_system);
85
87 F5Cwrite_triangular_surface_vc(hid_t file_id, double time,
88 const char*name,
89 const F5_point3f_t*Coords, int nCoords,
90 const F5_triangle32_t*Triangles, int nTriangles,
91 const char*coordinate_system);
92
93
94/**\ingroup surfaces
95 Similar to F5write_triangular_surface(), but instead of writing the
96 vertices and triangles as its own dataset, it references those of
97 another surface object. The vertices and triangles are then shared
98 (in HDF5: symbolic links to the target surface).
99 @param Coords The vertices of this surface; if none are given, re-use
100 the vertices from the target surface.
101 @param Triangles The triangles of this surfaces; if none are given,
102 reuse the triangles from the target surface.
103
104 @note Only the Vertex coordinates and Triangle connectivity are shared,
105 all other fields remain separate.
106
107 @todo make F5Flink_triangular_surface() failsafe. Extend the concept
108 of linking datasets for sharing available for other grid
109 types as well.
110 */
112 const char*gridname,
113 const F5_point3f_t*Coords, int nCoords,
114 const F5_triangle_t*Triangles, int nTriangles,
115 const char*coordinate_system
116#ifdef __cplusplus
118#endif
119 );
120
121
122
123
124/**\ingroup surfaces
125 VertexNormals to be added to the Rep_hid_t
126 */
127F5_API void F5write_triangular_surface_vertex_vectors(hid_t file_id, double time,
128 const char*name,
129 const F5_point3f_t*Coords, int nCoords,
130 const F5_triangle_t*Triangles, int nTriangles,
131 const char*fieldname,
132 const F5_vec3_float_t*VertexNormals);
133
134/**\ingroup surfaces
135 CellNormals to be added to the Cell_Rep_hid_t
136 */
137F5_API void F5write_triangular_surface_cell_vectors(hid_t file_id, double time,
138 const char*name,
139 const F5_vec3_point_t*Coords, int nCoords,
140 const F5_triangle_t*Triangles, int nTriangles,
141 const char*fieldname,
142 const F5_vec3_float_t*CellNormals);
143
144
145/**\ingroup surfaces
146 Write a regular surface.
147 @param file_id Some HDF5 id corresponding to some already opened HDF5 file.
148 @param time The physical time for this data set.
149 @param name Some textual description of this surface; should be simple
150 (avoid spaces, special characters and extensively long names).
151 It is used to identify surfaces over multiple timesteps,
152 so must be identical for subsequent calls on evolving surfaces.
153 @param Coords The cartesian coordinates of the points
154 @param Xdims Extension in first dimension
155 @param Ydims Extension in first dimension
156 */
157F5_API void F5write_regular_surface(hid_t file_id, double time,
158 const char*name,
159 const F5_vec3_point_t*Coords,
160 int Xdims, int Ydims);
161
162/**\ingroup surfaces
163 A regular surface with a data field on the vertices.
164 \note Put data into the `Rep_hid'
165 */
166F5_API void F5write_regular_surface_vertex_field_dbl(hid_t file_id, double time,
167 const char*name,
168 const F5_vec3_point_t*Coords,
169 int Xdims, int Ydims,
170 const char*fieldname,
171 double*data);
172
173/**\ingroup surfaces
174 A regular surface with a data field on the cells.
175 \note Put data into the `Cell_Rep_hid'
176 \todo use newer field interface
177 */
178F5_API void F5write_regular_surface_cell_field_dbl(hid_t file_id, double time,
179 const char*name,
180 const F5_vec3_point_t*Coords,
181 int Xdims, int Ydims,
182 const char*fieldname,
183 double*data);
184
185/**\ingroup surfaces
186 A field of colors given on the vertices.
187 \todo use newer field interface
188 */
189F5_API void F5write_regular_surface_vertex_field_rgb(hid_t file_id, double time,
190 const char*name,
191 const F5_vec3_point_t*Coords,
192 int Xdims, int Ydims,
193 const char*fieldname,
194 F5_rgb_t*data);
195
196/**\ingroup surfaces
197 Write a regular surface.
198 Similar to F5write_regular_surface(), but allow specification of non-standard cartesian coordinate system.
199 \todo merge with F5Cwrite_regular_surface
200*/
201F5_API void F5Cwrite_regular_surface(hid_t file_id, double time,
202 const char*name,
203 const F5_vec3_point_t*Coords, int Xdims, int Ydims,
204 const char*coordinate_system);
205
206/**\ingroup surfaces
207 A surface constructed by cells with four points (quads)
208 */
209F5_API void F5write_quad_surface(hid_t file_id, double time,
210 const char*name,
211 const F5_vec3_point_t*Coords, int nCoords,
212 const F5_quad_t*Quads, int nQuads);
213
214
215
216/**\ingroup surfaces
217 Write a surface constructed by cells with four points (quads).
218 Similar to F5write_quad_surface(), but allow specification of non-standard cartesian coordinate system.
219*/
220F5_API void F5Cwrite_quad_surface(hid_t file_id, double time,
221 const char*name,
222 const F5_vec3_point_t*Coords, int nCoords,
223 const F5_quad_t*Quads, int nQuads,
224 const char*coordinate_system);
225
226
227
228/**\ingroup surfaces
229 A surface with changing number of vertices per cell.
230 */
231F5_API void F5write_irregular_surface(hid_t file_id, double time,
232 const char*name,
233 const F5_vec3_point_t*Coords,
234 int nCells,
235 const int*CellSizes,
236 const int**CellVertices);
237
238#ifdef __cplusplus
239} /* extern "C" */
240#endif
241
242#endif /* __F5surface_H */
name
Definition F5P.c:82
#define F5_API
Definition F5WinDLLApi.h:11
F5_triangle32_t F5_triangle_t
F5_point3f_t F5_vec3_point_t
F5_point3_float_t F5_point3f_t
#define FIBER_HDF5_DEFAULT_CHART
Definition F5defs.h:74
F5_API F5Vertices_and_Connectivity_t F5write_triangular_surface_vc(hid_t file_id, double time, const char *name, const F5_point3f_t *Coords, int nCoords, const F5_triangle32_t *Triangles, int nTriangles)
Definition F5surface.c:36
F5_API F5Vertices_and_Connectivity_t F5Cwrite_triangular_surface_vc(hid_t file_id, double time, const char *name, const F5_point3f_t *Coords, int nCoords, const F5_triangle32_t *Triangles, int nTriangles, const char *coordinate_system)
Definition F5surface.c:69
F5_API F5Path * F5write_triangular_surface(hid_t file_id, double time, const char *name, const F5_point3f_t *Coords, int nCoords, const F5_triangle32_t *Triangles, int nTriangles)
Definition F5surface.c:23
F5_API F5Path * F5Cwrite_triangular_surface(hid_t file_id, double time, const char *name, const F5_point3f_t *Coords, int nCoords, const F5_triangle32_t *Triangles, int nTriangles, const char *coordinate_system)
Definition F5surface.c:49
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)
struct F5Vertices_and_Connectivity F5Vertices_and_Connectivity_t
Definition F5surface.h:35
F5_API void F5write_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)
F5_API void F5write_triangular_surface_cell_vectors(hid_t file_id, double time, const char *name, const F5_vec3_point_t *Coords, int nCoords, const F5_triangle_t *Triangles, int nTriangles, const char *fieldname, const F5_vec3_float_t *CellNormals)
F5_API void F5write_irregular_surface(hid_t file_id, double time, const char *name, const F5_vec3_point_t *Coords, int nCells, const int *CellSizes, const int **CellVertices)
F5_API void F5closeVC(F5Vertices_and_Connectivity_t *)
Definition F5surface.c:9
F5_API void F5write_triangular_surface_vertex_vectors(hid_t file_id, double time, const char *name, const F5_point3f_t *Coords, int nCoords, const F5_triangle_t *Triangles, int nTriangles, const char *fieldname, const F5_vec3_float_t *VertexNormals)
F5_API F5Path * F5Flink_triangular_surface(F5Path *target, double time, const char *gridname, const F5_point3f_t *Coords, int nCoords, const F5_triangle_t *Triangles, int nTriangles, const char *coordinate_system)
Definition F5surface.c:100
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)
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)
Definition F5surface.c:167
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)
Definition F5surface.c:154