FMS  v0.2
Field and Mesh Specification
Functions
fmsio.h File Reference

FMS file I/O functions. More...

#include <fms.h>
Include dependency graph for fmsio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int FmsIOWrite (const char *filename, const char *protocol, FmsDataCollection dc)
 Writes the provided FmsDataCollection to a file. More...
 
int FmsIORead (const char *filename, const char *protocol, FmsDataCollection *dc)
 Reads an FmsDataCollection from a file. More...
 

Detailed Description

FMS file I/O functions.

Header file added in version: v0.2.

Definition in file fmsio.h.

Function Documentation

◆ FmsIORead()

int FmsIORead ( const char *  filename,
const char *  protocol,
FmsDataCollection dc 
)

Reads an FmsDataCollection from a file.

Parameters
filenameThe name of the file to read.
protocolThe type of file to be read. By default, the protocol should be "ascii". If FMS is compiled with Conduit support then the protocol can match the supported Conduit protocols, which can include: "json", "yaml", "conduit_bin", "hdf5". Adding a protocol will help FMS and Conduit decide which method is appropriate for reading the file. If Conduit support is enabled and protocol is NULL an educated guess will be made for which protocol to use.
[out]dcThe FMS object that was read from the file.
Returns
The function returns 0 on success and non-zero for failure. If Conduit support is enabled then a return value of 2 indicates the given protocol is unsupported by the Conduit runtime.

Added in version: v0.2.

Definition at line 3524 of file fmsio.c.

◆ FmsIOWrite()

int FmsIOWrite ( const char *  filename,
const char *  protocol,
FmsDataCollection  dc 
)

Writes the provided FmsDataCollection to a file.

Parameters
filenameThe name of the file to save. If the filename does not include an appropriate file extension, one may be added.
protocolThe type of file to be saved. By default, the protocol should be "ascii". If FMS is compiled with Conduit support then the protocol can match the supported Conduit protocols, which can include: "json", "yaml", "conduit_bin", "hdf5".
dcThe FMS object that will be written to the file.
Returns
The function returns 0 on success and non-zero for failure. If Conduit support is enabled then a return value of 2 indicates the given protocol is unsupported by the Conduit runtime.

Added in version: v0.2.

Definition at line 3471 of file fmsio.c.