#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv)
{
int CPU_word_size = 0;
int IO_word_size = 4;
&CPU_word_size,
&IO_word_size);
printf("after ex_create for test.exo, exoid = %d\n", exoid);
printf(" cpu word size: %d io word size: %d\n", CPU_word_size, IO_word_size);
{
int num_dim = 3;
int num_nodes = 14;
int num_elem = 3;
int num_elem_blk = 1;
int num_node_sets = 0;
char *title = "This is a test";
printf("after ex_put_init_ext, error = %d\n", error);
if (error) {
exit(-1);
}
}
float x[100], y[100], z[100];
x[0] = 0.00000e+00;
y[0] = 0.00000e+00;
z[0] = 0.00000e+00;
x[1] = 2.00000e+00;
y[1] = 0.00000e+00;
z[1] = 0.00000e+00;
x[2] = 0.00000e+00;
y[2] = 2.00000e+00;
z[2] = 0.00000e+00;
x[3] = 2.00000e+00;
y[3] = 2.00000e+00;
z[3] = 0.00000e+00;
x[4] = 0.00000e+00;
y[4] = 0.00000e+00;
z[4] = 2.00000e+00;
x[5] = 2.00000e+00;
y[5] = 0.00000e+00;
z[5] = 2.00000e+00;
x[6] = 0.00000e+00;
y[6] = 2.00000e+00;
z[6] = 2.00000e+00;
x[7] = 2.00000e+00;
y[7] = 2.00000e+00;
z[7] = 2.00000e+00;
x[8] = 0.00000e+00;
y[8] = 3.50000e+00;
z[8] = 1.00000e+00;
x[9] = 2.00000e+00;
y[9] = 3.50000e+00;
z[9] = 1.00000e+00;
x[10] = 0.00000e+00;
y[10] = 3.00000e+00;
z[10] = 1.50000e+00;
x[11] = 2.00000e+00;
y[11] = 3.00000e+00;
z[11] = 1.50000e+00;
x[12] = 0.00000e+00;
y[12] = 3.00000e+00;
z[12] = 0.50000e+00;
x[13] = 2.00000e+00;
y[13] = 3.00000e+00;
z[13] = 0.50000e+00;
printf("after ex_put_coord, error = %d\n", error);
if (error) {
exit(-1);
}
char *coord_names[3];
coord_names[0] = "x";
coord_names[1] = "y";
coord_names[2] = "z";
printf("after ex_put_coord_names, error = %d\n", error);
if (error) {
exit(-1);
}
char *block_names[10];
block_names[0] = "face_block_1";
int num_face_in_block[10];
num_face_in_block[0] = 15;
int num_total_nodes_per_blk[10];
num_total_nodes_per_blk[0] = 58;
int bids = 10;
num_total_nodes_per_blk[0], 0, 0, 0);
printf("after ex_put_block, error = %d\n", error);
if (error) {
exit(-1);
}
printf("after ex_put_names, error = %d\n", error);
if (error) {
exit(-1);
}
int *connect = (int *)calloc(num_total_nodes_per_blk[0], sizeof(int));
int i = 0;
int j = 0;
int nnpe[20];
connect[i++] = 5;
connect[i++] = 6;
connect[i++] = 8;
nnpe[j++] = 3;
connect[i++] = 2;
connect[i++] = 1;
connect[i++] = 4;
nnpe[j++] = 3;
connect[i++] = 6;
connect[i++] = 2;
connect[i++] = 4;
connect[i++] = 8;
nnpe[j++] = 4;
connect[i++] = 8;
connect[i++] = 4;
connect[i++] = 1;
connect[i++] = 5;
nnpe[j++] = 4;
connect[i++] = 1;
connect[i++] = 2;
connect[i++] = 6;
connect[i++] = 5;
nnpe[j++] = 4;
connect[i++] = 5;
connect[i++] = 8;
connect[i++] = 7;
nnpe[j++] = 3;
connect[i++] = 1;
connect[i++] = 3;
connect[i++] = 4;
nnpe[j++] = 3;
connect[i++] = 7;
connect[i++] = 8;
connect[i++] = 4;
connect[i++] = 3;
nnpe[j++] = 4;
connect[i++] = 7;
connect[i++] = 3;
connect[i++] = 1;
connect[i++] = 5;
nnpe[j++] = 4;
connect[i++] = 8;
connect[i++] = 4;
connect[i++] = 14;
connect[i++] = 10;
connect[i++] = 12;
nnpe[j++] = 5;
connect[i++] = 7;
connect[i++] = 11;
connect[i++] = 9;
connect[i++] = 13;
connect[i++] = 3;
nnpe[j++] = 5;
connect[i++] = 7;
connect[i++] = 8;
connect[i++] = 12;
connect[i++] = 11;
nnpe[j++] = 4;
connect[i++] = 11;
connect[i++] = 12;
connect[i++] = 10;
connect[i++] = 9;
nnpe[j++] = 4;
connect[i++] = 9;
connect[i++] = 10;
connect[i++] = 14;
connect[i++] = 13;
nnpe[j++] = 4;
connect[i++] = 13;
connect[i++] = 14;
connect[i++] = 4;
connect[i++] = 3;
nnpe[j++] = 4;
assert(i == num_total_nodes_per_blk[0]);
assert(j == num_face_in_block[0]);
printf("after ex_put_conn, error = %d\n", error);
if (error) {
exit(-1);
}
free(connect);
connect = NULL;
printf("after ex_put_entity_count_per_polyhedra, error = %d\n", error);
if (error) {
exit(-1);
}
block_names[0] = "nfaced_1";
int num_elem_in_block[10];
num_elem_in_block[0] = 3;
int num_total_faces_per_blk[10];
num_total_faces_per_blk[0] = 5 + 5 + 7;
bids = 10;
num_total_faces_per_blk[0], 0);
printf("after ex_put_block, error = %d\n", error);
if (error) {
exit(-1);
}
printf("after ex_put_names, error = %d\n", error);
if (error) {
exit(-1);
}
connect = (int *)calloc(num_total_faces_per_blk[0], sizeof(int));
i = 0;
j = 0;
connect[i++] = 1;
connect[i++] = 2;
connect[i++] = 3;
connect[i++] = 4;
connect[i++] = 5;
nnpe[j++] = 5;
connect[i++] = 4;
connect[i++] = 6;
connect[i++] = 7;
connect[i++] = 8;
connect[i++] = 9;
nnpe[j++] = 5;
connect[i++] = 8;
connect[i++] = 10;
connect[i++] = 11;
connect[i++] = 12;
connect[i++] = 13;
connect[i++] = 14;
connect[i++] = 15;
nnpe[j++] = 7;
assert(i == num_total_faces_per_blk[0]);
assert(j == num_elem_in_block[0]);
printf("after ex_put_conn, error = %d\n", error);
if (error) {
exit(-1);
}
free(connect);
printf("after ex_put_entity_count_per_polyhedra, error = %d\n", error);
if (error) {
exit(-1);
}
int num_qa_rec = 2;
char *qa_record[2][4];
qa_record[0][0] = "TESTWT-NFACED";
qa_record[0][1] = "testwt-nfaced";
qa_record[0][2] = "2010/02/15";
qa_record[0][3] = "06:35:15";
qa_record[1][0] = "";
qa_record[1][1] = " ";
qa_record[1][2] = "";
qa_record[1][3] = " ";
error =
ex_put_qa(exoid, num_qa_rec, qa_record);
printf("after ex_put_qa, error = %d\n", error);
if (error) {
exit(-1);
}
int num_info = 3;
char *info[3];
info[0] = "This is the first information record.";
info[1] = "";
info[2] = " ";
printf("after ex_put_info, error = %d\n", error);
if (error) {
exit(-1);
}
printf("after ex_close, error = %d\n", error);
if (error) {
exit(-1);
}
return 0;
}
@ EX_FACE_BLOCK
Definition exodusII.h:273
@ EX_ELEM_BLOCK
Definition exodusII.h:275
@ EX_ABORT
Definition exodusII.h:392
@ EX_VERBOSE
Definition exodusII.h:390
char * ex_copy_string(char *dest, char const *source, size_t elements)
Definition ex_utils.c:2447
#define EX_CLOBBER
Definition exodusII.h:101
int ex_put_names(int exoid, ex_entity_type obj_type, char *const names[])
Definition ex_put_names.c:37
int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const void_int *node_conn, const void_int *elem_edge_conn, const void_int *elem_face_conn)
Definition ex_put_conn.c:44
int ex_put_init_ext(int exoid, const ex_init_params *model)
Definition ex_put_init_ext.c:210
int ex_put_coord_names(int exoid, char *const coord_names[])
Definition ex_put_coord_names.c:46
int ex_put_coord(int exoid, const void *x_coor, const void *y_coor, const void *z_coor)
Definition ex_put_coord.c:87
int ex_put_entity_count_per_polyhedra(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const int *entity_counts)
Definition ex_put_entity_count_per_polyhedra.c:26
int ex_put_block(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const char *entry_descrip, int64_t num_entries_this_blk, int64_t num_nodes_per_entry, int64_t num_edges_per_entry, int64_t num_faces_per_entry, int64_t num_attr_per_entry)
Definition ex_put_block.c:47
#define MAX_LINE_LENGTH
Definition exodusII.h:415
#define ex_create(path, mode, comp_ws, io_ws)
Definition exodusII.h:591
int ex_put_qa(int exoid, int num_qa_records, char *qa_record[][4])
Definition ex_put_qa.c:63
int ex_opts(int options)
Definition ex_opts.c:56
int ex_put_info(int exoid, int num_info, char *const info[])
Definition ex_put_info.c:73
int ex_close(int exoid)
Definition ex_close.c:47
Definition exodusII.h:438
int64_t num_edge
Definition exodusII.h:442
int64_t num_node_sets
Definition exodusII.h:448
int64_t num_face
Definition exodusII.h:444
int64_t num_nodes
Definition exodusII.h:441
int64_t num_face_maps
Definition exodusII.h:455
int64_t num_elem_sets
Definition exodusII.h:452
int64_t num_dim
Definition exodusII.h:440
int64_t num_edge_sets
Definition exodusII.h:449
int64_t num_elem
Definition exodusII.h:446
int64_t num_elem_blk
Definition exodusII.h:447
int64_t num_face_blk
Definition exodusII.h:445
int64_t num_node_maps
Definition exodusII.h:453
int64_t num_edge_maps
Definition exodusII.h:454
int64_t num_side_sets
Definition exodusII.h:451
int64_t num_elem_maps
Definition exodusII.h:456
int64_t num_face_sets
Definition exodusII.h:450
int64_t num_edge_blk
Definition exodusII.h:443
char title[MAX_LINE_LENGTH+1]
Definition exodusII.h:439