 |
FrontISTR
5.7.0
Large-scale structural analysis program with finit element method
|
Go to the documentation of this file.
19 static void do_logging(
int loglv,
int msgno,
int add_location,
const char *fmt,
27 if (strlen(msg) > 0) s =
": ";
38 static void set_err(
int msgno,
const char *fmt, ...) {
46 static void set_err_token(
int token,
int msgno,
const char *fmt, ...) {
64 static int read_pe(
void) {
106 static int read_node(
void) {
107 int nnode, nninternal, i, token;
128 if (nninternal <= 0) {
132 if (nnode != nninternal) {
137 for (i = 0; i < nnode; i++) {
198 static int read_elem(
void) {
199 int i, j, n, token, nelem;
220 for (i = 0; i < nelem; i++) {
235 for (i = 0; i < nelem; i++) {
253 for (j = 0; j < n; j++) {
290 static int read_import(
void) {
302 static int read_export(
void) {
314 static int read_ngrp(
void) {
315 int i, j, n, token, ngrp;
345 grp_index =
HECMW_malloc(
sizeof(*grp_index) * (ngrp + 1));
346 if (grp_index ==
NULL) {
351 for (i = 0; i < ngrp; i++) {
358 if (grp_index[i + 1] <= 0) {
364 for (i = 0; i < ngrp; i++) {
382 n = grp_index[i + 1] - grp_index[i];
388 for (j = 0; j < n; j++) {
421 static int read_egrp(
void) {
422 int i, j, n, token, ngrp;
452 grp_index =
HECMW_malloc(
sizeof(*grp_index) * (ngrp + 1));
453 if (grp_index ==
NULL) {
458 for (i = 0; i < ngrp; i++) {
465 if (grp_index[i + 1] <= 0) {
471 for (i = 0; i < ngrp; i++) {
489 n = grp_index[i + 1] - grp_index[i];
495 for (j = 0; j < n; j++) {
528 static int read_sgrp(
void) {
529 int i, j, n, token, ngrp;
559 grp_index =
HECMW_malloc(
sizeof(*grp_index) * (ngrp + 1));
560 if (grp_index ==
NULL) {
565 for (i = 0; i < ngrp; i++) {
572 if (grp_index[i + 1] <= 0) {
578 for (i = 0; i < ngrp; i++) {
596 n = grp_index[i + 1] - grp_index[i];
607 for (j = 0; j < n; j++) {
619 for (j = 0; j < n; j++) {
653 static int parse(
void) {
654 if (read_pe())
return -1;
655 if (read_node())
return -1;
656 if (read_elem())
return -1;
657 if (read_import())
return -1;
658 if (read_export())
return -1;
659 if (read_ngrp())
return -1;
660 if (read_egrp())
return -1;
661 if (read_sgrp())
return -1;
672 if (filename ==
NULL) {
674 "Not specified filename for GeoFEM mesh input routine");
684 strcpy(grid_filename, filename);
687 if ((fp = fopen(filename,
"r")) ==
NULL) {
706 strcpy(grid_filename,
"Unknown");
719 if (local_mesh ==
NULL)
return NULL;
722 strcpy(grid_filename,
"Unknown");
struct hecmwST_local_mesh * HECMW_get_geofem_mesh(const char *filename)
int HECMW_gflex_next_token_skip(int skip_token)
int HECMW_io_add_egrp(const char *name, int nelem, int *elem)
#define HECMW_IO_GEOFEM_E0363
#define HECMW_IO_GEOFEM_E0301
#define HECMW_IO_GEOFEM_E0353
int HECMW_snprintf(char *str, size_t size, const char *format,...)
#define HECMW_malloc(size)
int HECMW_log(int loglv, const char *fmt,...)
#define HECMW_IO_GEOFEM_E0004
#define HECMW_IO_GEOFEM_E0351
#define HECMW_IO_GEOFEM_E0361
int HECMW_io_post_process(void)
#define HECMW_IO_GEOFEM_E0313
#define HECMW_IO_HEC_E0001
int HECMW_get_etype_GeoFEM2HECMW(int etype)
int HECMW_io_add_ngrp(const char *name, int nnode, int *node)
#define HECMW_MAX_NODE_MAX
int HECMW_io_set_gridfile(char *gridfile)
#define HECMW_IO_GEOFEM_E0311
#define HECMW_IO_GEOFEM_E0314
int HECMW_io_finalize(void)
#define HECMW_IO_GEOFEM_E0321
int HECMW_vsnprintf(char *str, size_t size, const char *format, va_list ap)
int HECMW_gflex_set_input(FILE *fp)
#define HECMW_IO_GEOFEM_E0362
struct hecmw_io_element * HECMW_io_add_elem(int id, int type, int *node, int nmatitem, double *matitem)
#define HECMW_IO_GEOFEM_E0312
#define HECMW_IO_GEOFEM_E0343
char * HECMW_gflex_get_text(void)
int HECMW_get_max_node(int etype)
#define HECMW_IO_GEOFEM_E0322
#define HECMW_IO_GEOFEM_E0352
#define HECMW_IO_GEOFEM_E0341
#define HECMW_IO_GEOFEM_E0323
double HECMW_gflex_get_number(void)
int HECMW_gflex_get_lineno(void)
struct hecmwST_local_mesh * HECMW_io_make_local_mesh(void)
int HECMW_read_geofem_mesh(const char *filename)
#define HECMW_IO_GEOFEM_E0003
void HECMW_print_msg(int loglv, int msgno, const char *fmt,...)
#define HECMW_IO_GEOFEM_E0324
int HECMW_set_error(int errorno, const char *fmt,...)
int HECMW_io_add_sgrp(const char *name, int n_item, int *elem, int *surf)
#define HECMW_IO_GEOFEM_E0342
#define HECMW_IO_HEC_E0002
#define HECMW_FILENAME_LEN
int HECMW_gflex_next_token(void)
int HECMW_io_pre_process(void)
struct hecmw_io_node * HECMW_io_add_node(int id, double x, double y, double z)