![]() |
FMS
v0.2
Field and Mesh Specification
|
#include <fmsio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <ctype.h>
#include <inttypes.h>
Go to the source code of this file.
Macros | |
#define | _XOPEN_SOURCE 600 |
#define | FREE(PTR) |
#define | FMS_ELE_PER_LINE 3u |
#define | FMS_LU "%" PRIu64 |
#define | StrToFmsInt strtoull |
#define | FOR_EACH_INT_TYPE(macro) |
#define | FOR_EACH_SCALAR_TYPE(macro) |
#define | FMS_PRETTY_FUNCTION __func__ |
#define | E_RETURN(code) |
#define | PRINT_MACRO(typename, T, format) |
#define | CASES(typename, T, format) |
#define | PRINT_MACRO(typename, T, format) |
#define | CASES(typename, T, format) |
#define | FMS_BUFFER_SIZE 512 |
#define | READ_ARRAY_DATA(DEST_T, FUNC) |
#define | READ_ARRAY_DATA(DEST_T, FUNC, SIZE) |
#define | CASES(typename, T, format) |
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... | |
#define CASES | ( | typename, | |
T, | |||
format | |||
) |
#define CASES | ( | typename, | |
T, | |||
format | |||
) |
#define CASES | ( | typename, | |
T, | |||
format | |||
) |
#define E_RETURN | ( | code | ) |
#define FOR_EACH_INT_TYPE | ( | macro | ) |
#define FOR_EACH_SCALAR_TYPE | ( | macro | ) |
#define FREE | ( | PTR | ) |
#define PRINT_MACRO | ( | typename, | |
T, | |||
format | |||
) |
#define PRINT_MACRO | ( | typename, | |
T, | |||
format | |||
) |
#define READ_ARRAY_DATA | ( | DEST_T, | |
FUNC | |||
) |
#define READ_ARRAY_DATA | ( | DEST_T, | |
FUNC, | |||
SIZE | |||
) |
int FmsIORead | ( | const char * | filename, |
const char * | protocol, | ||
FmsDataCollection * | dc | ||
) |
Reads an FmsDataCollection from a file.
filename | The name of the file to read. | |
protocol | The 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] | dc | The FMS object that was read from the file. |
Added in version: v0.2.
int FmsIOWrite | ( | const char * | filename, |
const char * | protocol, | ||
FmsDataCollection | dc | ||
) |
Writes the provided FmsDataCollection to a file.
filename | The name of the file to save. If the filename does not include an appropriate file extension, one may be added. |
protocol | The 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". |
dc | The FMS object that will be written to the file. |
Added in version: v0.2.