FiberBundleHDF5  FiberHDF5 Documentation, Revision 2026
High-Performance Fiber Bundle Data Model for Scientific Visualization
Loading...
Searching...
No Matches
F5F.c File Reference
#include "F5F.h"
#include "F5X.h"
#include "F5A.h"
#include "F5private.h"
#include "F5Bchart.h"
#include "F5L.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>

Go to the source code of this file.

Macros

#define DO_DATASPACE_CONSISTENCY_CHECK

Functions

ArrayType F5Fget_field_enum (const F5Path *fpath, const char *fieldname, int *major_version, int *minor_version, int *release_version)
int F5Fopen (F5Path *f, const char *fieldname)
void F5Fclose (F5Path *f)
hid_t F5Fgrab (F5Path *f)
int F5Fis_group (const F5Path *fpath)
int F5Ffragment_is_group (const F5Path *fpath, const char *fragment_name)
hid_t F5Fget_type (F5Path *f)
hid_t F5Fget_type2 (F5Path *f, hid_t elink_fapl_id)
hid_t F5Tget_space (F5Path *f)
int F5Tget_extent (F5Path *f, hsize_t *dims, int maxDims)
int F5Tget_index_depth (F5Path *f, int *result)
F5_API hsize_t * F5Tpermute_dimensions (F5Path *fpath, int rank, hsize_t *target_dims, const hsize_t *source_dims)
int F5Fcreate (F5Path *fpath, const char *fieldname, int rank, hsize_t *dims, hid_t fieldtype, hid_t property_id)
const char * F5Fwhatsup (F5ErrorCode EC)
F5ErrorCode F5Fwrite_flexible (F5Path *fpath, const char *fieldname, int rank, hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t property_id, int do_check)
F5ErrorCode F5Fwrite (F5Path *fpath, const char *fieldname, int rank, hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t property_id)
F5ErrorCode F5FwriteHyperDimensional (F5Path *fpath, const char *fieldname, int rank, hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t property_id)
F5_API F5ErrorCode F5FwriteIMAGE (F5Path *fpath, const char *fieldname, int rank, hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t dcpl_id)
F5_API F5ErrorCode F5Fwrite_1D (F5Path *fpath, const char *fieldname, hsize_t nElements, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t property_id)
F5_API int F5Fwrites (F5Path *fpath, const char *fieldname, int rank, hsize_t *dims, hid_t fieldtype, hid_t memtype, const void **dataPtr, hid_t property_id)
int F5Fexpand_dataspace (F5Path *fpath, int rank, hsize_t *Dims)
F5ErrorCode F5Fwrite_fraction (F5Path *fpath, const char *fieldname, int rank, const hsize_t *Dims, const hsize_t *fraction_dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t property_id)
F5ErrorCode F5Fwrite_fractionS (F5Path *fpath, const char *fieldname, int rank, const hsize_t *Dims, const hsize_t *fraction_dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t property_id)
F5ErrorCode F5Fwrite_fraction_external (F5Path *fpath, const char *fieldname, const char *target_file_name, const char *target_obj_name, const char *prefix, int rank, const hsize_t *Dims, const hsize_t *fraction_dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t property_id)
int F5Fis_fragmented (F5Path *fpath, const char *fieldname)
int F5Fis_separatedcompound (F5Path *fpath, const char *fieldname)
int F5B_iszero_dims (int rank, hsize_t *dims)
int F5FSwrite_fraction (F5Path *fpath, const char *fieldname, int rank, const hsize_t *dims, const hsize_t *frag_dims, hid_t fieldtype, hid_t memtype, const void *const *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t property_id, int AllowFullCoverage)
void F5FevalX (double *result, int Mrank, const int index[], int components, const double *const polynomials[], const int polynom_order[], const int component_map[])
F5ErrorCode F5FwriteX (F5Path *fpath, const char *fieldname, int rank, const hsize_t dims[], hid_t fieldtype, hid_t memtype, const void *const dataPtr[], const int polynom_order[], const int component_map[], hid_t property_id)
int F5Fwrite_linear_fraction_overlap (F5Path *myPath, int rank, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name)
int F5Fwrite_linear_fraction (F5Path *fpath, const char *fieldname, int rank, const hsize_t *full_dims, const hsize_t *local_dims, hid_t fieldtype, const void *base, const void *delta, const hsize_t *datastart, const char *fraction_name)
F5_API int F5Fwrite_linear (F5Path *fpath, const char *fieldname, int rank, hsize_t *dims, hid_t fieldtype, const void *base, const void *delta)
int F5Fis_linear (F5Path *fpath, const char *fieldname)
int F5Fread_linear (F5Path *fpath, hsize_t *dims, hid_t fieldtype, void *base, void *delta)
int F5Fread_linear_fragment (F5Path *fpath, hid_t fragment_hid, hsize_t *dims, hid_t fieldtype, void *base, void *delta)
int F5Fget_attribute_byname (F5Path *f, const char *attribute_name, void *data, hsize_t N, hid_t mem_type_id, const char *fragment_name)
int F5Fget_range (F5Path *f, const char *fragment_name, void *minmax)
int F5Fset_attribute_byname (F5Path *f, const char *attribute_name, const void *data, hsize_t N, hid_t mem_type_id, const char *fragment_name)
F5_API int F5Fset_range (F5Path *f, const char *fragment_name, const void *minmax)

Macro Definition Documentation

◆ DO_DATASPACE_CONSISTENCY_CHECK

#define DO_DATASPACE_CONSISTENCY_CHECK

Definition at line 15 of file F5F.c.

Function Documentation

◆ F5B_iszero_dims()

int F5B_iszero_dims ( int rank,
hsize_t * dims )

Definition at line 1148 of file F5F.c.

1149{
1150int i;
1151 for(i=0; i<rank; i++)
1152 if (dims[i]>0) return 0;
1153
1154 return 1;
1155}

Referenced by F5FSwrite_fraction().

◆ F5FevalX()

void F5FevalX ( double * result,
int Mrank,
const int index[],
int components,
const double *const polynomials[],
const int polynom_order[],
const int component_map[] )

Definition at line 1293 of file F5F.c.

1296{
1297int i;
1298 for(i=0; i<Mrank; i++)
1299 {
1300 int c = component_map[ i ];
1301 result[ c ] = poly_eval( polynomials[c], polynom_order[c], index[ i ] );
1302 }
1303/*
1304 for(i=0; i<components; i++)
1305 {
1306 result[i] = poly_eval( polynomials[i], polynom_order[i], index[ component_map[ i ] ] );
1307 }
1308*/
1309}

◆ F5Fexpand_dataspace()

int F5Fexpand_dataspace ( F5Path * fpath,
int rank,
hsize_t * Dims )

Definition at line 768 of file F5F.c.

769{
770hsize_t full_dims[FIBER_MAX_RANK];
771int retval;
772 F5Tpermute_dimensions(fpath, rank, full_dims , Dims);
773 retval = F5LTexpand_dataspace(fpath, rank, full_dims);
774 F5Tpermute_dimensions(fpath, rank, Dims, full_dims);
775 return retval;
776}
F5_API hsize_t * F5Tpermute_dimensions(F5Path *fpath, int rank, hsize_t *target_dims, const hsize_t *source_dims)
Definition F5F.c:277
F5_API int F5LTexpand_dataspace(F5Path *f, int rank, hsize_t *dims)
Definition F5LT.c:120
#define FIBER_MAX_RANK
Definition F5defs.h:105

References F5LTexpand_dataspace(), F5Tpermute_dimensions(), and FIBER_MAX_RANK.

◆ F5Ffragment_is_group()

int F5Ffragment_is_group ( const F5Path * fpath,
const char * fragment_name )

flag to tell wether the fragment in the current field is a group

Note: The requirement to call this function is likely a design error in the calling code.

Definition at line 135 of file F5F.c.

136{
137 if (!fpath) return 0;
138
139H5G_stat_t info;
140
141 herr_t status = H5Gget_objinfo(fpath->Field_hid, fragment_name, 0, &info);
142
143 if (status < 0)
144 return 0;
145
146 if (info.type == H5G_GROUP)
147 {
148 F5printf(5, "F5Ffragment_is_group == true");
149 return 1;
150 }
151
152 return 0;
153}
#define F5printf(verbosity,...)
Definition F5private.h:60
hid_t Field_hid
Definition F5Path.h:59

References F5printf, and F5Path::Field_hid.

◆ F5Fget_attribute_byname()

int F5Fget_attribute_byname ( F5Path * f,
const char * attribute_name,
void * data,
hsize_t N,
hid_t mem_type_id,
const char * fragment_name )

Get a field's attribute, possibly specifying data conversion.

Parameters
mem_type_idThe type of the attribute as it resides in memory, may be zero to use the type of the attribute in-file.
fragment_nameOptional name of a fragment, null string indicates unfragmented read.

Definition at line 1593 of file F5F.c.

1596{
1597herr_t err;
1598hid_t attr_id, type_id;
1599 if (!f)
1600 {
1601 F5printf(5, "Open attribute %s without path object cannot succeed!", attribute_name);
1602 return 0;
1603 }
1604
1605 if (fragment_name)
1606 {
1607 hid_t frag_id = F5Gtry_to_open(f->Field_hid, fragment_name);
1608 if (frag_id<0)
1609 {
1610 frag_id = F5Dtry_to_open(f->Field_hid, fragment_name);
1611 if (frag_id<0)
1612 {
1613 F5printf(5, "F5Fget_attribute_byname(%s,%s). No such fragment.", attribute_name, fragment_name);
1614 return 0;
1615 }
1616 }
1617
1618 attr_id = F5Atry_to_open( frag_id, attribute_name);
1619 F5Xclose( frag_id );
1620 }
1621 else
1622 attr_id = F5Atry_to_open( f->Field_hid, attribute_name);
1623
1624 if (attr_id<0)
1625 {
1626 /* attribute not found */
1627 F5printf(5, "Open attribute %s in fragment %s not found.", attribute_name, fragment_name);
1628 return 0;
1629 }
1630
1631 {
1632 hid_t space_id = H5Aget_space(attr_id);
1633 hsize_t NumberofExistingAttributeElements = H5Sget_simple_extent_npoints(space_id);
1634 H5Sclose(space_id);
1635 if (NumberofExistingAttributeElements != N)
1636 {
1637 F5printf(1,"F5Fget_attribute_byname() MISMATCH - trying to read %d elements for attribute %s which has %d elements in file.",
1638 (int)N, attribute_name, (int)NumberofExistingAttributeElements);
1639 return 0;
1640 }
1641 }
1642
1643 if (mem_type_id)
1644 type_id = mem_type_id;
1645 else
1646 type_id = H5Aget_type(attr_id);
1647
1648 {
1649 H5E_BEGIN_TRY
1650 err = F_H5Aread(attr_id, type_id, data, attribute_name);
1651 H5E_END_TRY
1652 }
1653
1654 H5Aclose(attr_id);
1655
1656 if (!mem_type_id)
1657 H5Tclose(type_id);
1658
1659 if (err<0)
1660 return 0;
1661 else
1662 return 1;
1663}
hid_t F5Atry_to_open(hid_t location, const char *name)
Definition F5A.c:23
H5Tclose(type_id)
herr_t F_H5Aread(hid_t attr_id, hid_t mem_type_id, void *buf, const char *name)
Definition F5private.c:332
hid_t F5Dtry_to_open(hid_t location, const char *name)
Definition F5X.c:335
hid_t F5Gtry_to_open(hid_t location, const char *name)
Definition F5X.c:297
herr_t F5Xclose(hid_t obj_id)
Definition F5X.c:347

References F5Atry_to_open(), F5Dtry_to_open(), F5Gtry_to_open(), F5printf, F5Xclose(), F_H5Aread(), F5Path::Field_hid, and H5Tclose().

Referenced by F5Fget_range().

◆ F5Fget_field_enum()

ArrayType F5Fget_field_enum ( const F5Path * fpath,
const char * fieldname,
int * major_version,
int * minor_version,
int * release_version )

Get the field enumeration type for a given field. If the fieldname is zero, then the fpath object must contain a valid Field_id. The F5Path object is unchanged.

Definition at line 17 of file F5F.c.

19{
20ArrayType retval;
21int is_group = -1;
22hid_t loc_id;
23
24 F5printf(50, "F5Fget_field_enum(%s)", fieldname);
25
26 if (!fpath)
27 {
28 F5printf(50, "F5Fget_field_enum(%s): No valid F5Path given.", fieldname);
29 *major_version = *minor_version = *release_version = 0;
30 return UnknownArrayType;
31 }
32
33 if (fieldname)
34 {
35 H5E_BEGIN_TRY
36 is_group = 0;
37 loc_id = H5Dopen2(fpath->Representation_hid, fieldname, H5P_DEFAULT);
38 H5E_END_TRY
39 if (loc_id<0)
40 {
41 loc_id = H5Gopen2(fpath->Representation_hid, fieldname, H5P_DEFAULT);
42 if (loc_id<0)
43 {
44 F5printf(50, "F5Fget_field_enum(%s): Cannot determine field type!", fieldname);
45 }
46 is_group = 1;
47 }
48 }
49 else
50 loc_id = fpath->Field_hid;
51
52 retval = F5Tget_field_Array_enum(loc_id,
53 major_version, minor_version, release_version);
54
55 switch(is_group)
56 {
57 case 1: H5Gclose(loc_id); break;
58 case 0: H5Dclose(loc_id); break;
59 }
60
61 F5printf(50, "~F5Fget_field_enum(%s)", fieldname);
62 return retval;
63}
ArrayType
Definition F5defs.h:267
@ UnknownArrayType
Definition F5defs.h:268
ArrayType F5Tget_field_Array_enum(hid_t loc_id, int *major_version, int *minor_version, int *release_version)
Definition F5types.c:305
#define H5Gclose(x)
Definition F5X.h:144
hid_t Representation_hid
Definition F5Path.h:58

References F5printf, F5Tget_field_Array_enum(), F5Path::Field_hid, H5Gclose, F5Path::Representation_hid, and UnknownArrayType.

Referenced by F5Fis_fragmented(), F5Fis_separatedcompound(), and F5iterate_field_fragments().

◆ F5Fget_range()

int F5Fget_range ( F5Path * f,
const char * fragment_name,
void * minmax )

Field attribute (recommended): The min/max of components of a dataset. This two-element attribute is of the same type as a dataset, but contains the respective minimal/maximal value of the data's components. Example: for a set of point locations distributed in space, this gives the bounding box.

Parameters
memtype_idHDF5 Type ID describing the min/max variables. May be zero to use exactly the type of the field. Otherwise, type conversion must be available to HDF5.
Note
WARNING: You should never use the file type for reading, because then you might get values in the wrong bitorder! Usually you want to provide a type that is identically to the file type, but constructed from NATIVE types!
Todo
Write a function that converts types from file type to native type...

Definition at line 1666 of file F5F.c.

1667{
1668hid_t type_id = F5Fget_type(f);
1669
1670int check = F5Fget_attribute_byname( f, FIBER_FIELD_COMPONENT_RANGE, minmax, 2, type_id , fragment_name);
1671
1672 if( H5Iis_valid( type_id ) )
1673 if( H5Iget_type( type_id ) >= 0 )
1674 H5Tclose(type_id);
1675 return check;
1676}
hid_t F5Fget_type(F5Path *f)
Definition F5F.c:156
int F5Fget_attribute_byname(F5Path *f, const char *attribute_name, void *data, hsize_t N, hid_t mem_type_id, const char *fragment_name)
Definition F5F.c:1593
#define FIBER_FIELD_COMPONENT_RANGE
Definition F5defs.h:186

References F5Fget_attribute_byname(), F5Fget_type(), FIBER_FIELD_COMPONENT_RANGE, and H5Tclose().

◆ F5Fget_type()

hid_t F5Fget_type ( F5Path * f)

Definition at line 156 of file F5F.c.

157{
158 return F5Fget_type2(f,0);
159}
hid_t F5Fget_type2(F5Path *f, hid_t elink_fapl_id)
Definition F5F.c:161

References F5Fget_type2().

Referenced by F5Fget_average(), F5Fget_deviation(), F5Fget_fragment_range_ghost2(), F5Fget_range(), F5Fset_average2(), F5Fset_deviation2(), F5Fset_fragment_range_ghost2(), F5Fset_original_type2(), and F5Fset_range().

◆ F5Fis_fragmented()

int F5Fis_fragmented ( F5Path * fpath,
const char * fieldname )

Definition at line 1106 of file F5F.c.

1107{
1108int major_version, minor_version, release_version;
1109ArrayType at = F5Fget_field_enum(fpath, fieldname,
1110 &major_version, &minor_version, &release_version);
1111
1112 if (major_version != FIBER_MAJOR_VERSION ||
1113 minor_version != FIBER_MINOR_VERSION ||
1114 release_version != FIBER_RELEASE_VERSION)
1115 return 0;
1116
1117 switch(at)
1118 {
1122 return 1;
1123
1124 default: return 0;
1125 }
1126}
ArrayType F5Fget_field_enum(const F5Path *fpath, const char *fieldname, int *major_version, int *minor_version, int *release_version)
Definition F5F.c:17
#define FIBER_RELEASE_VERSION
Definition F5defs.h:16
@ FragmentedContiguous
Definition F5defs.h:272
@ FragmentedUniformSampling
Definition F5defs.h:277
@ FragmentedSeparatedCompound
Definition F5defs.h:273
#define FIBER_MAJOR_VERSION
Definition F5defs.h:14
#define FIBER_MINOR_VERSION
Definition F5defs.h:15

References F5Fget_field_enum(), FIBER_MAJOR_VERSION, FIBER_MINOR_VERSION, FIBER_RELEASE_VERSION, FragmentedContiguous, FragmentedSeparatedCompound, and FragmentedUniformSampling.

◆ F5Fis_group()

int F5Fis_group ( const F5Path * fpath)

flag to tell wether the field id is a group

Definition at line 126 of file F5F.c.

127{
128 if (!fpath) return 0;
129 if (H5Iget_type( fpath->Field_hid ) == H5I_GROUP)
130 return 1;
131
132 return 0;
133}

References F5Path::Field_hid.

Referenced by F5close(), F5Fclose(), F5Fget_string_attribute(), F5Fget_type2(), F5Fset_attribute(), F5Fset_string_attribute(), F5iterate_field_fragments(), and F5Tget_space().

◆ F5Fis_separatedcompound()

int F5Fis_separatedcompound ( F5Path * fpath,
const char * fieldname )

Definition at line 1128 of file F5F.c.

1129{
1130int major_version, minor_version, release_version;
1131ArrayType at = F5Fget_field_enum(fpath, fieldname,
1132 &major_version, &minor_version, &release_version);
1133
1134 if (major_version != FIBER_MAJOR_VERSION ||
1135 minor_version != FIBER_MINOR_VERSION ||
1136 release_version != FIBER_RELEASE_VERSION)
1137 return 0;
1138
1139 switch(at)
1140 {
1142 return 1;
1143
1144 default: return 0;
1145 }
1146}

References F5Fget_field_enum(), FIBER_MAJOR_VERSION, FIBER_MINOR_VERSION, FIBER_RELEASE_VERSION, and FragmentedSeparatedCompound.

◆ F5Fread_linear_fragment()

int F5Fread_linear_fragment ( F5Path * fpath,
hid_t fragment_hid,
hsize_t * dims,
hid_t fieldtype,
void * base,
void * delta )

same as F5Fread_linear, but reads a fragment of a field @TODO revise this function as it requires a fragment_hid, which is out of synch with the remaining F5 API: Fragments must never passed as id's but only as name, which may also be a null pointer to indicate unfragmented fields.

Definition at line 1550 of file F5F.c.

1554{
1555hid_t field_id;
1556int rank;
1557hsize_t file_dims[FIBER_MAX_RANK];
1558
1559 F5printf(40, "F5Fread_linear()");
1560 /* F5Fclose( fpath ); */
1561
1562 /* field_id = F5Lread_linear(fpath->Representation_hid, fieldname, */
1563
1564 field_id = F5Lread_linear(fragment_hid,
1565 file_dims,
1566 fieldtype,
1567 base, delta);
1568
1569 if (field_id < 0 )
1570 return 0;
1571
1572 if (dims)
1573 {
1574 rank = H5Tget_nmembers( fieldtype );
1576 F5Tpermute_dimensions(fpath, rank, dims, file_dims );
1578 }
1579
1580 F5printf(40, "~F5Fread_linear()");
1581 return 1;
1582}
int F5printf_indent
Definition F5private.c:349
hid_t F5Lread_linear(hid_t F_id, hsize_t *dims, hid_t fieldtype, void *base, void *delta)
Definition F5L.c:911

References F5Lread_linear(), F5printf, F5printf_indent, F5Tpermute_dimensions(), and FIBER_MAX_RANK.

◆ F5Fset_attribute_byname()

int F5Fset_attribute_byname ( F5Path * f,
const char * attribute_name,
const void * data,
hsize_t N,
hid_t mem_type_id,
const char * fragment_name )

Set a field's attribute.

Parameters
fragment_nameOptional name of a fragment, null string indicates unfragmented read.

Definition at line 1680 of file F5F.c.

1684{
1685hid_t attr_id, space_id;
1686 if (!f)
1687 {
1688 F5printf(5,"F5Fset_attribute() got NULL F5Path, cannot set attribute %s .",attribute_name);
1689 return 0;
1690 }
1691 if (f->Field_hid<1)
1692 {
1693 F5printf(5,"F5Fset_attribute() F5Path has no field ID, cannot set attribute %s .",attribute_name);
1694 return 0;
1695 }
1696
1697 space_id = H5Screate_simple(1, &N, &N );
1698
1699 if (fragment_name)
1700 {
1701 hid_t frag_id;
1702 H5E_BEGIN_TRY
1703 frag_id = H5Gopen2(f->Field_hid, fragment_name, H5P_DEFAULT);
1704 H5E_END_TRY
1705 if (frag_id<0)
1706 {
1707 frag_id = F5Dtry_to_open(f->Field_hid, fragment_name);
1708 }
1709
1710 attr_id = F5Atry_to_open( frag_id, attribute_name);
1711 if (attr_id<0)
1712 attr_id = F5Acreate( frag_id, attribute_name, mem_type_id, space_id, H5P_DEFAULT);
1713
1714 F5Xclose( frag_id );
1715 }
1716 else
1717 {
1718 attr_id = F5Atry_to_open( f->Field_hid, attribute_name);
1719 if (attr_id<0)
1720 attr_id = F5Acreate( f->Field_hid, attribute_name, mem_type_id, space_id, H5P_DEFAULT);
1721 }
1722
1723 H5Sclose( space_id );
1724
1725 if (attr_id<0)
1726 {
1727 F5printf(5,"F5Fset_attribute() Could neither open or create attribute %s .",attribute_name);
1728 return 0;
1729 }
1730
1731 H5Awrite(attr_id, mem_type_id, data );
1732 H5Aclose(attr_id);
1733 return 1;
1734}
hid_t F5Acreate(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t create_plist)
Definition F5private.c:11

References F5Acreate(), F5Atry_to_open(), F5Dtry_to_open(), F5printf, F5Xclose(), and F5Path::Field_hid.

Referenced by F5Fset_range().

◆ F5Fset_range()

F5_API int F5Fset_range ( F5Path * f,
const char * fragment_name,
const void * minmax )

Set the range of values within a dataset. The given min/max values must be of the same type as in the field.

Examples
FragmentedField.c.

Definition at line 1737 of file F5F.c.

1738{
1739hid_t type_id = F5Fget_type(f);
1740int check;
1741 if (type_id<=0)
1742 return 0;
1743
1744 check = F5Fset_attribute_byname(f,
1745 FIBER_FIELD_COMPONENT_RANGE, minmax, 2,
1746 type_id, fragment_name);
1747
1748 H5Tclose(type_id);
1749
1750 return check;
1751}
int F5Fset_attribute_byname(F5Path *f, const char *attribute_name, const void *data, hsize_t N, hid_t mem_type_id, const char *fragment_name)
Definition F5F.c:1680

References F5_API, F5Fget_type(), F5Fset_attribute_byname(), FIBER_FIELD_COMPONENT_RANGE, and H5Tclose().

Referenced by F5Rcreate_uniform_cartesian3D(), and F5Rcreate_uniform_cartesian3Dbbox().

◆ F5Fwrite_1D()

F5_API F5ErrorCode F5Fwrite_1D ( F5Path * fpath,
const char * fieldname,
hsize_t nElements,
hid_t fieldtype,
hid_t memtype,
const void * dataPtr,
hid_t property_id )
Examples
ADCIRCtoF5.cpp, and ObjtoF5.c.

Definition at line 631 of file F5F.c.

634{
635hid_t file_type;
636 F5printf(40,"F5Fwrite1D(%s)", fieldname);
637 if (!fpath)
638 {
639 F5printf(41,"F5Fwrite1D(%s): no fpath given!", fieldname);
641 }
642 if (nElements<1)
643 {
644 F5printf(30,"F5Fwrite1D(%s): No elements given, field not created!",fieldname);
646 }
647 if (fpath->Representation_hid<0)
648 {
649 F5printf(30,"F5Fwrite1D(%s): INVALID Representation ID given!",fieldname);
651 }
652 if (fieldtype<0)
653 {
654 F5printf(30,"F5Fwrite1D(%s): INVALID field type ID given!",fieldname);
656 }
657
658 file_type = F5file_type(fpath, fieldtype);
659 if (file_type<0)
660 {
661 F5printf(30,"F5Fwrite1D(%s): CANNOT created file type from field type %d given!",
662 fieldname, (int)fieldtype );
664 }
665
666 F5Fclose(fpath);
667
668/* TODO: Check the consistency of the number of elements here */
669
670 fpath->Field_hid = F5Lwrite1D(fpath->Representation_hid, fieldname,
671 nElements,
672 file_type, memtype, dataPtr,
673 F5LTmake_enum_type(fpath),
674 property_id);
675
676 if (fpath->Field_hid < 0)
677 {
678 F5printf(30,"F5Fwrite1D(): F5Lwrite1D FAILED!");
680 }
681
683 F5I_add_field(fpath, fieldname);
684 F5printf(40,"F5Fwrite1D() ok");
685
686 return F5_SUCCESS;
687}
hid_t F5file_type(F5Path *fpath, hid_t fieldtype)
Definition F5Bchart.c:941
@ F5_SUCCESS
Definition F5F.h:226
@ F5ERROR_INVALID_FPATH
Definition F5F.h:229
@ F5ERROR_NONSPECIFIED
Definition F5F.h:264
@ F5ERROR_INCONSISTENT_DATASPACE
Definition F5F.h:233
hid_t F5LTmake_enum_type(F5Path *fpath)
Definition F5LT.c:179
@ Contiguous
Definition F5defs.h:269
void F5I_add_field(F5Path *fpath, const char *fieldname)
Definition F5private.c:178
herr_t F5Tset_field_enum(hid_t loc_id, hid_t enum_type_id, ArrayType what)
Definition F5types.c:268
void F5Fclose(F5Path *f)
Definition F5F.c:92
hid_t F5Lwrite1D(hid_t R_id, const char *fieldname, hsize_t nElements, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t enum_type, hid_t property_id)
Definition F5L.c:408

References Contiguous, F5_API, F5_SUCCESS, F5ERROR_INCONSISTENT_DATASPACE, F5ERROR_INVALID_FPATH, F5ERROR_NONSPECIFIED, F5Fclose(), F5file_type(), F5I_add_field(), F5LTmake_enum_type(), F5Lwrite1D(), F5printf, F5Tset_field_enum(), F5Path::Field_hid, and F5Path::Representation_hid.

Referenced by F5Cwrite_triangular_surface_vc(), F5Flink_triangular_surface(), F5write_particle_cartesian3Dv(), F5write_particle_cartesian3DvU(), F5write_particle_double_cartesian3Dv(), and F5write_particle_positions().

◆ F5Fwrite_flexible()

F5ErrorCode F5Fwrite_flexible ( F5Path * fpath,
const char * fieldname,
int rank,
hsize_t * dims,
hid_t fieldtype,
hid_t memtype,
const void * dataPtr,
hid_t property_id,
int do_check )

Definition at line 389 of file F5F.c.

393{
394hsize_t save_dims[FIBER_MAX_RANK];
395
396 F5printf(40,"F5Fwrite(%s, rank=%d, dims=%dx%dx%dx%d)", fieldname, rank, rank>0?(int)dims[0]:1,
397 rank>1?(int)dims[1]:1,rank>2?(int)dims[2]:1, rank>3?(int)dims[3]:1
398 );
399
400 if (!fpath)
402
403 F5Fclose(fpath);
404
405 /*
406 Detect the special case of 2D RGB data, in which case we try to
407 write the data compatible to the official HDF5 specification for
408 images.
409 */
410 if ( (H5Tequal(fieldtype, F5T_RGB_REAL)>0 || H5Tequal(fieldtype, F5T_RGB)>0) && rank == 2)
411 {
412 return F5FwriteIMAGE(fpath, fieldname,
413 rank, dims,
414 fieldtype, memtype, dataPtr,
415 property_id);
416 }
417
419 F5Tpermute_dimensions(fpath, rank, save_dims, dims );
421
422 F5printf(41,"F5Fwrite(%s): permuted dims: rank=%d, dims=%dx%dx%dx%d)", fieldname, rank,
423 rank>0?(int)save_dims[0]:1, rank>1?(int)save_dims[1]:1, rank>2?(int)save_dims[2]:1, rank>3?(int)save_dims[3]:1 );
424
425 if (!F5LTset_dataspace(fpath, rank, save_dims))
426 {
427 if( do_check )
428 {
429 if (rank==3)
430 F5printf(-1, "F5Fwrite(%s): cannot write 3D field, inconsistent 3D dataspace, trying to write %dx%dx%d as HDF5 dataspace %dx%dx%d (run again with F5_VERBOSITY=30 to see more details)!",
431 fieldname, (int)dims[0], (int)dims[1], (int)dims[2],
432 (int)save_dims[0], (int)save_dims[1], (int)save_dims[2]
433 );
434 else
435 F5printf(-1, "F5Fwrite(%s): cannot write field, inconsistent dataspace (run again with F5_VERBOSITY=30 to see more details)!", fieldname);
436
438 }
439 else
440 F5printf(-1, "F5Fwrite(%s): warning during field write, inconsistent dataspace!", fieldname);
441 }
442
443 fpath->Field_hid = 0;
444
445 fpath->Field_hid = F5Lwrite(fpath->Representation_hid, fieldname,
446 rank, save_dims,
447 F5file_type(fpath, fieldtype), memtype, dataPtr,
448 F5LTmake_enum_type(fpath),
449 property_id);
450
451 if (fpath->Field_hid<=0)
452 {
453 F5printf(3,"F5Fwrite(): F5Lwrite() FAILED!");
454 fpath->Field_hid = 0;
455 }
456 else
457 {
459 F5I_add_field(fpath, fieldname);
460 }
461
462 F5printf(40,"F5Fwrite() ok");
463 return F5_SUCCESS;
464}
F5_API int F5LTset_dataspace(F5Path *f, int rank, hsize_t *dims)
Definition F5LT.c:43
#define F5T_RGB
Definition F5types.h:37
#define F5T_RGB_REAL
Definition F5types.h:42
F5_API F5ErrorCode F5FwriteIMAGE(F5Path *fpath, const char *fieldname, int rank, hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t dcpl_id)
Definition F5F.c:487
hid_t F5Lwrite(hid_t R_id, const char *fieldname, int dimension, const hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *dataPtr, hid_t enum_type, hid_t dcpl_id)
Definition F5L.c:357

References Contiguous, F5_SUCCESS, F5ERROR_INCONSISTENT_DATASPACE, F5ERROR_INVALID_FPATH, F5Fclose(), F5file_type(), F5FwriteIMAGE(), F5I_add_field(), F5LTmake_enum_type(), F5LTset_dataspace(), F5Lwrite(), F5printf, F5printf_indent, F5T_RGB, F5T_RGB_REAL, F5Tpermute_dimensions(), F5Tset_field_enum(), FIBER_MAX_RANK, F5Path::Field_hid, and F5Path::Representation_hid.

Referenced by F5Fwrite(), and F5FwriteHyperDimensional().

◆ F5Fwrite_fraction_external()

F5ErrorCode F5Fwrite_fraction_external ( F5Path * fpath,
const char * fieldname,
const char * target_file_name,
const char * target_obj_name,
const char * prefix,
int rank,
const hsize_t * Dims,
const hsize_t * fraction_dims,
hid_t fieldtype,
hid_t memtype,
const void * dataPtr,
const hsize_t * datastart,
const hsize_t * start_border,
const hsize_t * end_border,
const char * fraction_name,
hid_t property_id )

Definition at line 1001 of file F5F.c.

1012{
1013hid_t field_id;
1014int i;
1015hsize_t full_dims[FIBER_MAX_RANK], start_dims[FIBER_MAX_RANK], ldims[FIBER_MAX_RANK],
1016 sborder[FIBER_MAX_RANK], eborder[FIBER_MAX_RANK];
1017
1018 if (!fpath)
1019 return F5ERROR_INVALID_FPATH;
1020
1021 F5printf(30, "F5Fwrite_fraction_external(%s, rank=%d)", fieldname, rank);
1022 if (rank==3)
1023 F5printf(20, "F5Fwrite_fraction_external(%lux%lux%lu)",
1024 (int)fraction_dims[0], (int)fraction_dims[1], (int)fraction_dims[2]);
1025 else if(rank==2)
1026 F5printf(20, "F5Fwrite_fraction_external(%lux%lu)",
1027 (int)fraction_dims[0], (int)fraction_dims[1]);
1028 else if (rank==1)
1029 F5printf(20, "F5Fwrite_fraction_external(%lu)",
1030 (int)fraction_dims[0]);
1031
1033
1034 F5Tpermute_dimensions(fpath, rank, full_dims , Dims );
1035 F5Tpermute_dimensions(fpath, rank, start_dims, datastart );
1036 F5Tpermute_dimensions(fpath, rank, ldims , fraction_dims);
1037 F5Tpermute_dimensions(fpath, rank, sborder , start_border );
1038 F5Tpermute_dimensions(fpath, rank, eborder , end_border );
1040
1041 if (Dims) for(i=0; i<rank; i++)
1042 {
1043 if (datastart[i] >= Dims[i])
1044 {
1045 F5printf(-1, "F5Fwrite_fraction(%s): fragment starts beyond dataspace in dimension %d: %d (max %d allowed)!",
1046 fieldname, i, (int)datastart[i], (int)Dims[i] );
1048 }
1049 if (datastart[i]+fraction_dims[i] > Dims[i])
1050 {
1051 F5printf(-1, "F5Fwrite_fraction(%s): fragment extends beyond dataspace in dimension %d: %d (max %d allowed)!",
1052 fieldname, i, (int)(datastart[i]+fraction_dims[i]), (int)Dims[i] );
1054 }
1055 }
1056 //
1057 // closing the field in the FPath here
1058 // because it will be overwritten with a new field ID soon
1059 //
1060 F5Fclose( fpath );
1061
1062#ifdef DO_DATASPACE_CONSISTENCY_CHECK
1063 if (Dims)
1064 {
1065 if (!F5LTset_dataspace(fpath, rank, full_dims))
1066 {
1067 F5printf(-1, "F5Fwrite_fraction(%s): cannot create, inconsistent dataspace!", fieldname);
1068 return F5_SUCCESS; /* ??? */
1069 }
1070 }
1071#endif
1072 field_id = F5Lwrite_fraction_external(fpath->Representation_hid, fieldname,
1073
1074 target_file_name,
1075 target_obj_name,
1076 prefix,
1077
1078 rank, Dims ? full_dims : NULL, ldims,
1079 F5file_type(fpath, fieldtype), memtype, dataPtr,
1080 start_dims,
1081 start_border?sborder:NULL, end_border?eborder:NULL,
1082 fraction_name, F5LTmake_enum_type(fpath), property_id);
1083
1084 fpath->Field_hid = field_id;
1085
1086/* F5printf(10,"~F5Fwrite_fraction(%s) temporarily set type attribute...", fieldname);
1087 F5Dset_type_attribute(fpath->Field_hid, F5file_type(fpath, fieldtype) );
1088*/
1089#if 0
1090/*
1091 As with HDF5 1.8.14 - 1.8.17, 1.10.0 , saving attributes with a named type that
1092 has been committed to another file than the external file does not work.
1093 */
1095#else
1097#endif
1098
1099 F5I_add_field(fpath, fieldname);
1100
1101 F5printf(30, "~F5Fwrite_fraction(%s) wrote fragmented contigous field", fieldname);
1102 return F5_SUCCESS;
1103}
@ F5ERROR_INVALID_FRAGMENT_START
Definition F5F.h:236
@ F5ERROR_INVALID_FRAGMENT_END
Definition F5F.h:239
hid_t F5Lwrite_fraction_external(hid_t R_id, const char *fieldname, const char *target_file_name, const char *target_obj_name, const char *prefix, int rank, const hsize_t *full_dims, const hsize_t *datasize, hid_t fieldtype, hid_t memtype, const void *dataPtr, const hsize_t *datastart, const hsize_t *start_border, const hsize_t *end_border, const char *fraction_name, hid_t enum_type, hid_t property_id)
Definition F5L.c:738
hid_t F5Ttransient_F5field_Array_enum()
Definition F5types.c:189

References F5_SUCCESS, F5ERROR_INVALID_FPATH, F5ERROR_INVALID_FRAGMENT_END, F5ERROR_INVALID_FRAGMENT_START, F5Fclose(), F5file_type(), F5I_add_field(), F5LTmake_enum_type(), F5LTset_dataspace(), F5Lwrite_fraction_external(), F5printf, F5printf_indent, F5Tpermute_dimensions(), F5Tset_field_enum(), F5Ttransient_F5field_Array_enum(), FIBER_MAX_RANK, F5Path::Field_hid, FragmentedContiguous, and F5Path::Representation_hid.

◆ F5Fwrite_linear_fraction_overlap()

int F5Fwrite_linear_fraction_overlap ( F5Path * myPath,
int rank,
const hsize_t * start_border,
const hsize_t * end_border,
const char * fraction_name )

Write overlap attributes associated with linear fractions.

Definition at line 1383 of file F5F.c.

1388{
1389 if (!myPath ) return 0;
1390 if (!myPath->Field_hid) return 0;
1391 if (!fraction_name) return 0;
1392
1393hid_t B_id = H5Gopen2( myPath->Field_hid, fraction_name, H5P_DEFAULT);
1394 if (start_border)
1395 {
1396 hsize_t sborder[FIBER_MAX_RANK];
1397 if (!is_all_zero(rank, start_border))
1398 {
1399 F5Tpermute_dimensions(myPath, rank, sborder , start_border );
1401 }
1402 }
1403 if (end_border)
1404 {
1405 hsize_t eborder[FIBER_MAX_RANK];
1406 if (!is_all_zero(rank, end_border))
1407 {
1408 F5Tpermute_dimensions(myPath, rank, eborder , end_border );
1410 }
1411 }
1412 F5Xclose(B_id);
1413 return 1;
1414}
#define FIBER_FRAGMENT_NOOVERLAP_START_ATTRIBUTE
Definition F5defs.h:175
#define FIBER_FRAGMENT_NOOVERLAP_END_ATTRIBUTE
Definition F5defs.h:176
int F5LAsave_dimensions(hid_t Field_id, const char *aname, int rank, const hsize_t *dims)
Definition F5A.c:192

References F5LAsave_dimensions(), F5Tpermute_dimensions(), F5Xclose(), FIBER_FRAGMENT_NOOVERLAP_END_ATTRIBUTE, FIBER_FRAGMENT_NOOVERLAP_START_ATTRIBUTE, FIBER_MAX_RANK, and F5Path::Field_hid.

◆ F5Fwrites()

F5_API int F5Fwrites ( F5Path * fpath,
const char * fieldname,
int dimension,
hsize_t * dims,
hid_t fieldtype,
hid_t memtype,
const void ** dataPtr,
hid_t property_id )

Write an array of compound data type as separated components.

Parameters
dataPtrAn array of pointers to the respective arrays for each component
memtypeAn HDF5 compound data type that specifies how the data reside in memory.
Returns
0 if the entry could not be opened, non-zero otherwise.

Definition at line 690 of file F5F.c.

694{
695hsize_t save_dims[FIBER_MAX_RANK];
696hid_t file_type;
697
698 F5printf(40,"F5Fwrites()");
699 if (!fpath) return 0;
700
701 F5Fclose(fpath);
702
704 F5Tpermute_dimensions(fpath, rank, save_dims, dims);
706
707 if (!F5LTset_dataspace(fpath, rank, save_dims))
708 {
709 F5printf(-1, "F5Fwrites(%s): cannot create, inconsistent dataspace!", fieldname);
711 }
712
713 file_type = F5file_type(fpath, fieldtype);
714
715 fpath->Field_hid = F5Lwrites(fpath->Representation_hid, fieldname,
716 rank, save_dims,
717 file_type, memtype, dataPtr,
718 F5LTmake_enum_type(fpath),
719 property_id);
720
721 if (fpath->Field_hid <0)
722 F5printf(1, "**F5Fwrites(%s) could not write separated compound type!", fieldname);
723
724 switch( H5Tget_class(file_type ) )
725 {
726 case H5T_COMPOUND:
728 break;
729
730 case H5T_INTEGER:
731 case H5T_FLOAT:
733 break;
734
735 default:
737 break;
738 }
739
740 F5I_add_field(fpath, fieldname);
741
742 F5printf(40,"F5Fwrites() ok");
743 return F5_SUCCESS;
744}
@ SeparatedCompound
Definition F5defs.h:270
hid_t F5Lwrites(hid_t R_id, const char *fieldname, int dimension, const hsize_t *dims, hid_t fieldtype, hid_t memtype, const void *const *dataPtr, hid_t enum_type, hid_t property_id)
Definition F5L.c:1096

References Contiguous, F5_API, F5_SUCCESS, F5ERROR_INCONSISTENT_DATASPACE, F5Fclose(), F5file_type(), F5I_add_field(), F5LTmake_enum_type(), F5LTset_dataspace(), F5Lwrites(), F5printf, F5printf_indent, F5Tpermute_dimensions(), F5Tset_field_enum(), FIBER_MAX_RANK, F5Path::Field_hid, F5Path::Representation_hid, and SeparatedCompound.

Referenced by F5Fwrite_uniform_cartesian3Ds(), and F5write_uniform_cartesian3Dvs().

◆ F5Tget_extent()

int F5Tget_extent ( F5Path * f,
hsize_t * dims,
int maxDims )

Get the extent (number of elements in each dimension) for a given F5 field. This function is like getting the data space via F5Tget_space() and then performing a F5Tpermute_dimensions() on the result.

Parameters
dimsStorage place for the extension in each dimension.
maxDimsThe maximal number of storage available for the dims array
Returns
The dimension of the current topology.

It is recommended to allocate the storage as

hsize_t dims[FIBER_MAX_RANK];

where FIBER_MAX_RANK is a predefined integer constant from the F5 library which corresponds to the respective HDF5 value.

Todo
Add weblink here to HDF5 docu.

Definition at line 226 of file F5F.c.

227{
228hsize_t mdims[FIBER_MAX_RANK], Dims[FIBER_MAX_RANK];
229int mrank;
230hid_t space_id = F5Tget_space(f);
231
232
233 if (space_id<0)
234 return 0;
235
236 mrank = H5Sget_simple_extent_dims(space_id, mdims, NULL);
237
238 H5Sclose(space_id);
239
240 F5Tpermute_dimensions(f, mrank, Dims, mdims);
241
242 if (mrank>maxDims)
243 mrank = maxDims;
244
245
246 {int i;
247 for(i=0; i<mrank; i++)
248 dims[i] = Dims[i];
249 }
250
251 return mrank;
252}
hid_t F5Tget_space(F5Path *f)
Definition F5F.c:167

References F5Tget_space(), F5Tpermute_dimensions(), and FIBER_MAX_RANK.

◆ F5Tget_index_depth()

int F5Tget_index_depth ( F5Path * f,
int * result )
Parameters
resultpointer to integer which will contain the result value on return.
Returns
non-zero when attribute cold be read, zero if not.

Definition at line 255 of file F5F.c.

256{
257 F5printf(40, "F5Fget_index_depth()");
258
259 if (!f)
260 return 0;
261
262 if (f->Topology_hid<0)
263 return 0;
264
267 result, 1) != 1)
268 {
269 F5printf(40, "F5Fget_index_depth(): could not read index depth attribute");
270 return 0;
271 }
272
273 return 1;
274}
long F5Aget_ints(hid_t loc_id, const char *name, int *data, hsize_t n)
Definition F5A.c:406
#define FIBER_HDF5_INDEXDEPTH_ATTRIB
Definition F5defs.h:228
hid_t Topology_hid
Definition F5Path.h:57

References F5Aget_ints(), F5printf, FIBER_HDF5_INDEXDEPTH_ATTRIB, and F5Path::Topology_hid.

◆ F5Tpermute_dimensions()

F5_API hsize_t * F5Tpermute_dimensions ( F5Path * fpath,
int rank,
hsize_t * target_dims,
const hsize_t * source_dims )

Permute a given dimensions array according to the memory ordering of the current coordinate system.

Parameters
source_dimsThe source dimensions.
target_dimsThe target dimensions array, may be identical to the source dimensions array.
Returns
A pointer to the target dimensions array, if successfull, otherwise NULL.
Parameters
fpathAn F5Path object that must contain a valid coordinate system description, e.g. via some F5Rcreate() operation.

Definition at line 277 of file F5F.c.

281{
282int ChartDims;
283 F5printf(50, "F5Tpermute_dimensions()");
284
285 /* added by mr, not sure if this is good */
286 if( !target_dims || !source_dims)
287 {
288 F5printf(40, "F5Tpermute_dimensions() Invalid target or source");
289 return NULL;
290 }
291
292 {
293 int i = 0;
294 for(i=0; i<rank; i++)
295 if (source_dims[i]) break;
296
297 if (i==rank)
298 {
299 for(i=0; i<rank; i++)
300 target_dims[i] = source_dims[i];
301
302 F5printf(40, "F5Tpermute_dimensions() All source data are zero, skipping permutation...");
303 return target_dims;
304 }
305 }
306
307 if (!fpath || !fpath->myChart)
308 {
309 F5printf(50, "F5Tpermute_dimensions() No Chart given, assuming default (FORTRAN) index permutation!");
310 return F5B_permute_dimensions(target_dims, rank, source_dims, NULL, 0);
311 }
312 F5printf(50, "F5Tpermute_dimensions() params ok, rank=%d.", rank);
313 for(int i=0; i<rank; i++)
314 F5printf(50, "F5Tpermute_dimensions() source[%d]=%d.", i, source_dims[i] );
315
316/* cannot occur because perm_vector is static member
317 if (!fpath->myChart->perm_vector )
318 {
319 F5printf(10, "F5Tpermute_dimensions() has no permutation vector!");
320 return NULL;
321 }
322*/
323 ChartDims = F5Bget_chart_dims(fpath->myChart);
324
325 return F5B_permute_dimensions(target_dims, rank, source_dims, fpath->myChart->perm_vector, ChartDims );
326}
int F5Bget_chart_dims(const ChartDomain_IDs *IDs)
Definition F5Bchart.c:899
hsize_t * F5B_permute_dimensions(hsize_t *target_dims, int rank, const hsize_t *source_dims, int perm_vector[FIBER_MAX_RANK], int perm_vector_size)
Definition F5Bchart.c:72
int perm_vector[FIBER_MAX_RANK]
Definition F5Bchart.h:141
ChartDomain_IDs * myChart
Definition F5Path.h:33

References F5_API, F5B_permute_dimensions(), F5Bget_chart_dims(), F5printf, F5Path::myChart, and ChartDomain_IDs::perm_vector.

Referenced by F5Fexpand_dataspace(), F5Fread_linear(), F5Fread_linear_fragment(), F5FSwrite_fraction(), F5Fwrite_flexible(), F5Fwrite_fraction(), F5Fwrite_fraction_external(), F5Fwrite_fractionS(), F5Fwrite_linear(), F5Fwrite_linear_fraction(), F5Fwrite_linear_fraction_overlap(), F5FwriteIMAGE(), F5Fwrites(), F5FwriteX(), and F5Tget_extent().