#include <inttypes.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include "exodusII.h"
#include "exodusII_int.h"
#include "netcdf.h"
|
#define | EX_GET_IDS_STATUS(TNAME, NUMVAR, DNAME, DID, DVAL, VIDS, EIDS, VSTAT, VSTATVAL) |
|
#define | EX_DEFINE_VARS(TID, STNAME, TNAME, NUMVAR, DNAME, DID1, DID2, DVAL, VIDS, VNOV, VTV, VSTATVAL, VTABVAL, VTABVAR) |
|
|
static int | define_dimension (int exoid, const char *DIMENSION, int count, const char *label, int *dimid) |
|
static int | define_variable_name_variable (int exoid, const char *VARIABLE, int dimension, const char *label) |
|
static int * | get_status_array (int exoid, int count, const char *VARIABLE, const char *label) |
|
static int | put_truth_table (int exoid, int varid, int *table, const char *label) |
|
static int | define_truth_table (ex_entity_type obj_type, int exoid, int num_ent, int num_var, int *var_tab, int *status, void_int *ids, const char *label) |
|
int | ex_put_all_var_param_ext (int exoid, const ex_var_params *vp) |
|
◆ EX_DEFINE_VARS
#define EX_DEFINE_VARS |
( |
|
TID, |
|
|
|
STNAME, |
|
|
|
TNAME, |
|
|
|
NUMVAR, |
|
|
|
DNAME, |
|
|
|
DID1, |
|
|
|
DID2, |
|
|
|
DVAL, |
|
|
|
VIDS, |
|
|
|
VNOV, |
|
|
|
VTV, |
|
|
|
VSTATVAL, |
|
|
|
VTABVAL, |
|
|
|
VTABVAR |
|
) |
| |
Value: if (NUMVAR > 0) { \
if (status != NC_NOERR) goto error_ret; \
\
\
goto error_ret; \
\
goto error_ret; \
\
\
\
\
dims[0] = DID1; \
dims[1] = DID2; \
\
if ((status = nc_def_var(
exoid, VTV, NC_INT, 2, dims, &VTABVAR)) != NC_NOERR) { \
exerrval = status; \
sprintf(errmsg, \
"Error: failed to define " STNAME " variable truth table in file id %d", \
ex_err(
"ex_put_all_var_param_ext",errmsg,
exerrval); \
goto error_ret; \
} \
}
◆ EX_GET_IDS_STATUS
#define EX_GET_IDS_STATUS |
( |
|
TNAME, |
|
|
|
NUMVAR, |
|
|
|
DNAME, |
|
|
|
DID, |
|
|
|
DVAL, |
|
|
|
VIDS, |
|
|
|
EIDS, |
|
|
|
VSTAT, |
|
|
|
VSTATVAL |
|
) |
| |
Value: if (NUMVAR > 0) { \
if (status != NC_NOERR) \
goto error_ret; \
\
\
if (!(VIDS = malloc(DVAL*sizeof(int64_t)))) { \
sprintf(errmsg, \
"Error: failed to allocate memory for " TNAME " id array for file id %d", \
ex_err(
"ex_put_all_var_param_ext",errmsg,
exerrval); \
goto error_ret; \
} \
ex_get_ids (
exoid, EIDS, VIDS); \
\
\
if (VSTATVAL ==
NULL) { \
goto error_ret; \
} \
}
◆ define_dimension()
static int define_dimension |
( |
int |
exoid, |
|
|
const char * |
DIMENSION, |
|
|
int |
count, |
|
|
const char * |
label, |
|
|
int * |
dimid |
|
) |
| |
|
static |
◆ define_truth_table()
static int define_truth_table |
( |
ex_entity_type |
obj_type, |
|
|
int |
exoid, |
|
|
int |
num_ent, |
|
|
int |
num_var, |
|
|
int * |
var_tab, |
|
|
int * |
status, |
|
|
void_int * |
ids, |
|
|
const char * |
label |
|
) |
| |
|
static |
◆ define_variable_name_variable()
static int define_variable_name_variable |
( |
int |
exoid, |
|
|
const char * |
VARIABLE, |
|
|
int |
dimension, |
|
|
const char * |
label |
|
) |
| |
|
static |
◆ get_status_array()
static int * get_status_array |
( |
int |
exoid, |
|
|
int |
count, |
|
|
const char * |
VARIABLE, |
|
|
const char * |
label |
|
) |
| |
|
static |
◆ put_truth_table()
static int put_truth_table |
( |
int |
exoid, |
|
|
int |
varid, |
|
|
int * |
table, |
|
|
const char * |
label |
|
) |
| |
|
static |
static int define_dimension(int exoid, const char *DIMENSION, int count, const char *label, int *dimid)
Definition: ex_put_all_var_param_ext.c:381
static int * get_status_array(int exoid, int count, const char *VARIABLE, const char *label)
Definition: ex_put_all_var_param_ext.c:431
static int define_variable_name_variable(int exoid, const char *VARIABLE, int dimension, const char *label)
Definition: ex_put_all_var_param_ext.c:402
int exoid
Definition: exodusII_int.h:640
#define NULL
Definition: exodusII_int.h:86
#define EX_MEMFAIL
Definition: exodusII.h:1994
void * ex_safe_free(void *array)
Definition: ex_utils.c:1558
int exerrval
Definition: ex_err.c:91
int ex_get_dimension(int exoid, const char *dimtype, const char *label, size_t *count, int *dimid, const char *routine)
Definition: ex_utils.c:1478
static int define_truth_table(ex_entity_type obj_type, int exoid, int num_ent, int num_var, int *var_tab, int *status, void_int *ids, const char *label)
Definition: ex_put_all_var_param_ext.c:487